1 #ifndef MPLAYER_FONT_LOAD_H
2 #define MPLAYER_FONT_LOAD_H
13 #ifdef CONFIG_FREETYPE
14 int charwidth
,charheight
,pen
,baseline
,padding
;
15 int current_count
, current_alloc
;
19 typedef struct font_desc
{
20 #ifdef CONFIG_FREETYPE
33 int start
[65536]; // short is not enough for unicode fonts
37 #ifdef CONFIG_FREETYPE
41 FT_UInt glyph_index
[65536];
43 int max_width
, max_height
;
64 extern font_desc_t
* vo_font
;
66 extern char *subtitle_font_encoding
;
67 extern float text_font_scale_factor
;
68 extern float osd_font_scale_factor
;
69 extern float subtitle_font_radius
;
70 extern float subtitle_font_thickness
;
71 extern int subtitle_autoscale
;
73 extern int vo_image_width
;
74 extern int vo_image_height
;
76 extern int force_load_font
;
78 int init_freetype(void);
79 int done_freetype(void);
81 font_desc_t
* read_font_desc_ft(const char* fname
,int face_index
,int movie_width
, int movie_height
, float font_scale_factor
);
82 void free_font_desc(font_desc_t
*desc
);
84 void render_one_glyph(font_desc_t
*desc
, int c
);
85 int kerning(font_desc_t
*desc
, int prevc
, int c
);
87 void load_font_ft(int width
, int height
, font_desc_t
**desc
, const char *name
, float font_scale_factor
);
89 void blur(unsigned char *buffer
, unsigned short *tmp2
, int width
, int height
,
90 int stride
, int *m2
, int r
, int mwidth
);
92 raw_file
* load_raw(char *name
,int verbose
);
93 font_desc_t
* read_font_desc(const char* fname
,float factor
,int verbose
);
95 #endif /* MPLAYER_FONT_LOAD_H */