Mercurial > mplayer.hg
comparison libass/ass_font.h @ 23980:27bac14b4ce4
More simple and correct font reselection.
Since ass_font_t contains a list of font faces, there is no need to select the
face with maximum charset coverage each time. It is enough to select any face
with the required glyph.
author | eugeni |
---|---|
date | Fri, 03 Aug 2007 13:43:11 +0000 |
parents | 3f0d00abc073 |
children | 705628816d98 |
comparison
equal
deleted
inserted
replaced
23979:33928da6ba62 | 23980:27bac14b4ce4 |
---|---|
19 */ | 19 */ |
20 | 20 |
21 #ifndef ASS_FONT_H | 21 #ifndef ASS_FONT_H |
22 #define ASS_FONT_H | 22 #define ASS_FONT_H |
23 | 23 |
24 #ifdef HAVE_FONTCONFIG | |
25 #include <fontconfig/fontconfig.h> | |
26 #endif | |
27 | |
28 typedef struct ass_font_desc_s { | 24 typedef struct ass_font_desc_s { |
29 char* family; | 25 char* family; |
30 unsigned bold; | 26 unsigned bold; |
31 unsigned italic; | 27 unsigned italic; |
32 } ass_font_desc_t; | 28 } ass_font_desc_t; |
39 FT_Face faces[ASS_FONT_MAX_FACES]; | 35 FT_Face faces[ASS_FONT_MAX_FACES]; |
40 int n_faces; | 36 int n_faces; |
41 double scale_x, scale_y; // current transform | 37 double scale_x, scale_y; // current transform |
42 FT_Vector v; // current shift | 38 FT_Vector v; // current shift |
43 double size; | 39 double size; |
44 #ifdef HAVE_FONTCONFIG | |
45 FcCharSet* charset; | |
46 #endif | |
47 } ass_font_t; | 40 } ass_font_t; |
48 | 41 |
49 ass_font_t* ass_font_new(ass_library_t* library, FT_Library ftlibrary, void* fc_priv, ass_font_desc_t* desc); | 42 ass_font_t* ass_font_new(ass_library_t* library, FT_Library ftlibrary, void* fc_priv, ass_font_desc_t* desc); |
50 void ass_font_set_transform(ass_font_t* font, double scale_x, double scale_y, FT_Vector* v); | 43 void ass_font_set_transform(ass_font_t* font, double scale_x, double scale_y, FT_Vector* v); |
51 void ass_font_set_size(ass_font_t* font, double size); | 44 void ass_font_set_size(ass_font_t* font, double size); |