Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
b5d615ed
Commit
b5d615ed
authored
Oct 25, 2015
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Freetype: rework includes
parent
984e48cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
27 deletions
+32
-27
modules/text_renderer/freetype.h
modules/text_renderer/freetype.h
+31
-12
modules/text_renderer/platform_fonts.h
modules/text_renderer/platform_fonts.h
+1
-15
No files found.
modules/text_renderer/freetype.h
View file @
b5d615ed
...
...
@@ -28,15 +28,36 @@
#ifndef VLC_FREETYPE_H
#define VLC_FREETYPE_H
#include <vlc_text_style.h>
/* text_style_t*/
#include <vlc_arrays.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_text_style.h>
/* text_style_t */
#include <vlc_arrays.h>
/* vlc_dictionary_t */
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include FT_STROKER_H
#include "platform_fonts.h"
/* Consistency between Freetype versions and platforms */
#define FT_FLOOR(X) ((X & -64) >> 6)
#define FT_CEIL(X) (((X + 63) & -64) >> 6)
#ifndef FT_MulFix
# define FT_MulFix(v, s) (((v)*(s))>>16)
#endif
#ifdef __OS2__
typedef
uint16_t
uni_char_t
;
# define FREETYPE_TO_UCS "UCS-2LE"
#else
typedef
uint32_t
uni_char_t
;
# if defined(WORDS_BIGENDIAN)
# define FREETYPE_TO_UCS "UCS-4BE"
# else
# define FREETYPE_TO_UCS "UCS-4LE"
# endif
#endif
/*****************************************************************************
* filter_sys_t: freetype local data
...
...
@@ -44,6 +65,7 @@
* This structure is part of the video output thread descriptor.
* It describes the freetype specific properties of an output thread.
*****************************************************************************/
typedef
struct
vlc_family_t
vlc_family_t
;
struct
filter_sys_t
{
FT_Library
p_library
;
/* handle to library */
...
...
@@ -51,7 +73,7 @@ struct filter_sys_t
FT_Stroker
p_stroker
;
/* handle to path stroker object */
text_style_t
*
p_default_style
;
text_style_t
*
p_forced_style
;
/* Renderer overridings */
text_style_t
*
p_forced_style
;
/* Renderer overridings */
/* More styles... */
float
f_shadow_vector_x
;
...
...
@@ -85,17 +107,20 @@ struct filter_sys_t
int
i_fallback_counter
;
int
i_scale
;
/**
* Select a font, based on the family, the styles and the codepoint
*/
char
*
(
*
pf_select
)
(
filter_t
*
,
const
char
*
family
,
bool
bold
,
bool
italic
,
int
*
index
,
uni_char_t
codepoint
);
/*
/*
*
* Get a pointer to the vlc_family_t in the master list that matches psz_family.
* Add this family to the list if it hasn't been added yet.
*/
const
vlc_family_t
*
(
*
pf_get_family
)
(
filter_t
*
p_filter
,
const
char
*
psz_family
);
/*
/*
*
* Get the fallback list for psz_family from the system and cache
* it in fallback_map.
* On Windows fallback lists are populated progressively as required
...
...
@@ -105,12 +130,6 @@ struct filter_sys_t
uni_char_t
codepoint
);
};
#define FT_FLOOR(X) ((X & -64) >> 6)
#define FT_CEIL(X) (((X + 63) & -64) >> 6)
#ifndef FT_MulFix
#define FT_MulFix(v, s) (((v)*(s))>>16)
#endif
FT_Face
LoadFace
(
filter_t
*
p_filter
,
const
char
*
psz_fontfile
,
int
i_idx
,
const
text_style_t
*
p_style
);
...
...
modules/text_renderer/platform_fonts.h
View file @
b5d615ed
...
...
@@ -45,20 +45,7 @@
# include "config.h"
#endif
#include <ft2build.h>
#include FT_FREETYPE_H
#ifdef __OS2__
typedef
uint16_t
uni_char_t
;
# define FREETYPE_TO_UCS "UCS-2LE"
#else
typedef
uint32_t
uni_char_t
;
# if defined(WORDS_BIGENDIAN)
# define FREETYPE_TO_UCS "UCS-4BE"
# else
# define FREETYPE_TO_UCS "UCS-4LE"
# endif
#endif
#include "freetype.h"
/* Default fonts */
#ifdef __APPLE__
...
...
@@ -121,7 +108,6 @@ struct vlc_font_t
/**
* Representation of font families (linked-list)
*/
typedef
struct
vlc_family_t
vlc_family_t
;
struct
vlc_family_t
{
vlc_family_t
*
p_next
;
/**< next family in the chain */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment