annotate libass/ass_cache.h @ 19314:6f940283e339

Move ID_AUDIO_CODEC printing after codec init again (it didn't get printed otherwise). Thanks to tomber71 in IRC for reporting the problem.
author reimar
date Fri, 04 Aug 2006 18:40:19 +0000
parents 9e95ac641e77
children 64009ae411fb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18937
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
1 #ifndef __ASS_CACHE_H__
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
2 #define __ASS_CACHE_H__
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
3
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
4 #include <ft2build.h>
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
5 #include FT_FREETYPE_H
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
6 #include FT_STROKER_H
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
7 #include FT_GLYPH_H
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
8
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
9 // font cache
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
10 typedef struct face_desc_s {
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
11 char* family;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
12 unsigned bold;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
13 unsigned italic;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
14 } face_desc_t;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
15
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
16 void ass_face_cache_init(void);
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
17 int ass_new_face(FT_Library library, void* fontconfig_priv, face_desc_t* desc, /*out*/ FT_Face* face);
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
18 void ass_face_cache_done(void);
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
19
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
20
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
21 // describes a glyph; glyphs with equivalents structs are considered identical
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
22 typedef struct glyph_hash_key_s {
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
23 char bitmap; // bool : true = bitmap, false = outline
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
24 FT_Face face;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
25 int size; // font size
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
26 int index; // glyph index in the face
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
27 unsigned outline; // border width, 16.16 fixed point value
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
28 int bold, italic;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
29
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
30 // the following affects bitmap glyphs only
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
31 unsigned scale_x, scale_y; // 16.16
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
32 int angle; // signed 16.16
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
33
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
34 FT_Vector advance; // subpixel shift vector
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
35 } glyph_hash_key_t;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
36
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
37 typedef struct glyph_hash_val_s {
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
38 FT_Glyph glyph; // the actual glyphs
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
39 FT_Glyph outline_glyph;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
40 FT_BBox bbox_scaled; // bbox after scaling, but before rotation
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
41 FT_Vector advance; // 26.6, advance distance to the next glyph in line
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
42 } glyph_hash_val_t;
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
43
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
44 void ass_glyph_cache_init(void);
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
45 void cache_add_glyph(glyph_hash_key_t* key, glyph_hash_val_t* val);
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
46 glyph_hash_val_t* cache_find_glyph(glyph_hash_key_t* key);
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
47 void ass_glyph_cache_done(void);
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
48
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
49 #endif
9e95ac641e77 Initial libass release (without mencoder support).
eugeni
parents:
diff changeset
50