comparison libass/ass_font.h @ 21619:b4b51eb2904f

Keep reselected fonts in an array, adding new ones to the end. Glyph lookup prefers earlier opened fonts. This way glyph lookup is stable, which means that: - cache cleanup is never required after font reselecting; - a single unrecognized char won't change the appearance of all the others.
author eugeni
date Sat, 16 Dec 2006 19:34:00 +0000
parents 8111d4625194
children 1de2a46a0987
comparison
equal deleted inserted replaced
21618:8111d4625194 21619:b4b51eb2904f
29 char* family; 29 char* family;
30 unsigned bold; 30 unsigned bold;
31 unsigned italic; 31 unsigned italic;
32 } ass_font_desc_t; 32 } ass_font_desc_t;
33 33
34 #define ASS_FONT_MAX_FACES 10
35
34 typedef struct ass_font_s { 36 typedef struct ass_font_s {
35 ass_font_desc_t desc; 37 ass_font_desc_t desc;
36 FT_Library ftlibrary; 38 FT_Library ftlibrary;
37 FT_Face face; 39 FT_Face faces[ASS_FONT_MAX_FACES];
40 int n_faces;
38 FT_Matrix m; // current transformation 41 FT_Matrix m; // current transformation
39 FT_Vector v; // current shift 42 FT_Vector v; // current shift
40 int size; 43 int size;
41 #ifdef HAVE_FONTCONFIG 44 #ifdef HAVE_FONTCONFIG
42 FcCharSet* charset; 45 FcCharSet* charset;