Remove unused static variable pass, fixes the warning:
[mplayer/greg.git] / libvo / font_load.h
blob39242eab3866de7d36bfda9fe25c61a97e536532
1 #ifndef MPLAYER_FONT_LOAD_H
2 #define MPLAYER_FONT_LOAD_H
4 #ifdef HAVE_FREETYPE
5 #include <ft2build.h>
6 #include FT_FREETYPE_H
7 #endif
9 typedef struct {
10 unsigned char *bmp;
11 unsigned char *pal;
12 int w,h,c;
13 #ifdef HAVE_FREETYPE
14 int charwidth,charheight,pen,baseline,padding;
15 int current_count, current_alloc;
16 #endif
17 } raw_file;
19 typedef struct {
20 #ifdef HAVE_FREETYPE
21 int dynamic;
22 #endif
23 char *name;
24 char *fpath;
25 int spacewidth;
26 int charspace;
27 int height;
28 // char *fname_a;
29 // char *fname_b;
30 raw_file* pic_a[16];
31 raw_file* pic_b[16];
32 short font[65536];
33 int start[65536]; // short is not enough for unicode fonts
34 short width[65536];
35 int freetype;
37 #ifdef HAVE_FREETYPE
38 int face_cnt;
40 FT_Face faces[16];
41 FT_UInt glyph_index[65536];
43 int max_width, max_height;
45 struct
47 int g_r;
48 int o_r;
49 int g_w;
50 int o_w;
51 int o_size;
52 unsigned volume;
54 unsigned *g;
55 unsigned *gt2;
56 unsigned *om;
57 unsigned char *omt;
58 unsigned short *tmp;
59 } tables;
60 #endif
62 } font_desc_t;
64 extern font_desc_t* vo_font;
65 extern font_desc_t* sub_font;
67 #ifdef HAVE_FREETYPE
69 extern char *subtitle_font_encoding;
70 extern float text_font_scale_factor;
71 extern float osd_font_scale_factor;
72 extern float subtitle_font_radius;
73 extern float subtitle_font_thickness;
74 extern int subtitle_autoscale;
76 extern int vo_image_width;
77 extern int vo_image_height;
79 extern int force_load_font;
81 int init_freetype(void);
82 int done_freetype(void);
84 font_desc_t* read_font_desc_ft(const char* fname,int movie_width, int movie_height);
85 void free_font_desc(font_desc_t *desc);
87 void render_one_glyph(font_desc_t *desc, int c);
88 int kerning(font_desc_t *desc, int prevc, int c);
90 void load_font_ft(int width, int height, font_desc_t **desc, const char *name);
92 void blur(unsigned char *buffer, unsigned short *tmp2, int width, int height,
93 int stride, int *m2, int r, int mwidth);
95 #else
97 static void render_one_glyph(font_desc_t *desc, int c) {}
98 static int kerning(font_desc_t *desc, int prevc, int c) { return 0; }
100 #endif
102 raw_file* load_raw(char *name,int verbose);
103 font_desc_t* read_font_desc(const char* fname,float factor,int verbose);
105 #endif /* ! MPLAYER_FONT_LOAD_H */