Move fonts-related code to a separate file.
[mplayer.git] / libass / ass_cache.h
index b60a651..4fd5f79 100644 (file)
 #include FT_GLYPH_H
 
 // font cache
-typedef struct face_desc_s {
+typedef struct ass_font_desc_s {
        char* family;
        unsigned bold;
        unsigned italic;
-} face_desc_t;
+} ass_font_desc_t;
 
-void ass_face_cache_init(void);
-int ass_new_face(FT_Library library, void* fontconfig_priv, face_desc_t* desc, /*out*/ FT_Face* face);
-void ass_face_cache_done(void);
+typedef struct ass_font_s {
+       ass_font_desc_t desc;
+       char* path;
+       int index;
+       FT_Face face;
+       FT_Matrix m; // current transformation
+       FT_Vector v; // current shift
+       int size;
+} ass_font_t;
+
+void ass_font_cache_init(void);
+ass_font_t* ass_new_font(FT_Library library, void* fontconfig_priv, ass_font_desc_t* desc);
+void ass_font_cache_done(void);
 
 
 // describes a glyph; glyphs with equivalents structs are considered identical