Mercurial > mplayer.hg
annotate libass/ass_cache.h @ 19884:7725b85ada9f
Fix compilation, too few arguments to fputs.
author | diego |
---|---|
date | Mon, 18 Sep 2006 14:24:16 +0000 |
parents | 07be98a5dd5f |
children | 70352570e9ae |
rev | line source |
---|---|
18937 | 1 #ifndef __ASS_CACHE_H__ |
2 #define __ASS_CACHE_H__ | |
3 | |
4 #include <ft2build.h> | |
5 #include FT_FREETYPE_H | |
6 #include FT_STROKER_H | |
7 #include FT_GLYPH_H | |
8 | |
9 // font cache | |
10 typedef struct face_desc_s { | |
11 char* family; | |
12 unsigned bold; | |
13 unsigned italic; | |
14 } face_desc_t; | |
15 | |
16 void ass_face_cache_init(void); | |
17 int ass_new_face(FT_Library library, void* fontconfig_priv, face_desc_t* desc, /*out*/ FT_Face* face); | |
18 void ass_face_cache_done(void); | |
19 | |
20 | |
21 // describes a glyph; glyphs with equivalents structs are considered identical | |
22 typedef struct glyph_hash_key_s { | |
23 char bitmap; // bool : true = bitmap, false = outline | |
24 FT_Face face; | |
25 int size; // font size | |
26 int index; // glyph index in the face | |
27 unsigned outline; // border width, 16.16 fixed point value | |
28 int bold, italic; | |
19848 | 29 char be; // blur edges |
18937 | 30 |
31 // the following affects bitmap glyphs only | |
32 unsigned scale_x, scale_y; // 16.16 | |
33 int angle; // signed 16.16 | |
34 | |
35 FT_Vector advance; // subpixel shift vector | |
36 } glyph_hash_key_t; | |
37 | |
38 typedef struct glyph_hash_val_s { | |
19846
bcc792bfa431
Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
19539
diff
changeset
|
39 bitmap_t* bm; // the actual glyph bitmaps |
bcc792bfa431
Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
19539
diff
changeset
|
40 bitmap_t* bm_o; |
18937 | 41 FT_BBox bbox_scaled; // bbox after scaling, but before rotation |
42 FT_Vector advance; // 26.6, advance distance to the next glyph in line | |
43 } glyph_hash_val_t; | |
44 | |
45 void ass_glyph_cache_init(void); | |
46 void cache_add_glyph(glyph_hash_key_t* key, glyph_hash_val_t* val); | |
47 glyph_hash_val_t* cache_find_glyph(glyph_hash_key_t* key); | |
19539 | 48 void ass_glyph_cache_reset(void); |
18937 | 49 void ass_glyph_cache_done(void); |
50 | |
51 #endif | |
52 |