Mercurial > mplayer.hg
comparison libvo/font_load.h @ 8635:81dbd28ef7c0
these patches let ,,oldstyle'' and freetype subtitle renderers live
together happily. if an oldstyle subtitle (font.desc) is found, it will
be used. otherwise mplayer will choose subfont.ttf, if freetype was
detected during ./configure.
(also you can use -font /path/to/font.desc and -font /path/to/foobar.ttf too)
patch-set by Wojtek Kaniewski <wojtekka@bydg.pdi.net>
author | arpi |
---|---|
date | Sun, 29 Dec 2002 14:59:23 +0000 |
parents | 379852905f31 |
children | b4fcb6c47942 |
comparison
equal
deleted
inserted
replaced
8634:a8c4246b6869 | 8635:81dbd28ef7c0 |
---|---|
29 raw_file* pic_a[16]; | 29 raw_file* pic_a[16]; |
30 raw_file* pic_b[16]; | 30 raw_file* pic_b[16]; |
31 short font[65536]; | 31 short font[65536]; |
32 int start[65536]; // short is not enough for unicode fonts | 32 int start[65536]; // short is not enough for unicode fonts |
33 short width[65536]; | 33 short width[65536]; |
34 int freetype; | |
34 | 35 |
35 #ifdef HAVE_FREETYPE | 36 #ifdef HAVE_FREETYPE |
36 int face_cnt; | 37 int face_cnt; |
37 | 38 |
38 FT_Face faces[16]; | 39 FT_Face faces[16]; |
76 extern int force_load_font; | 77 extern int force_load_font; |
77 | 78 |
78 int init_freetype(); | 79 int init_freetype(); |
79 int done_freetype(); | 80 int done_freetype(); |
80 | 81 |
81 font_desc_t* read_font_desc(char* fname,int movie_width, int movie_height); | 82 font_desc_t* read_font_desc_ft(char* fname,int movie_width, int movie_height); |
82 void free_font_desc(font_desc_t *desc); | 83 void free_font_desc(font_desc_t *desc); |
83 | 84 |
84 void render_one_glyph(font_desc_t *desc, int c); | 85 void render_one_glyph(font_desc_t *desc, int c); |
85 int kerning(font_desc_t *desc, int prevc, int c); | 86 int kerning(font_desc_t *desc, int prevc, int c); |
86 | 87 |
87 void load_font(int width, int height); | 88 void load_font_ft(int width, int height); |
88 | 89 |
89 #else | 90 #else |
91 | |
92 static void render_one_glyph(font_desc_t *desc, int c) {} | |
93 static int kerning(font_desc_t *desc, int prevc, int c) { return 0; } | |
94 | |
95 #endif | |
90 | 96 |
91 raw_file* load_raw(char *name,int verbose); | 97 raw_file* load_raw(char *name,int verbose); |
92 font_desc_t* read_font_desc(char* fname,float factor,int verbose); | 98 font_desc_t* read_font_desc(char* fname,float factor,int verbose); |
93 | 99 |
94 static void inline render_one_glyph(font_desc_t *desc, int c) {} | |
95 static int inline kerning(font_desc_t *desc, int prevc, int c) { return 0; } | |
96 static void inline load_font(int width, int height){} | |
97 | |
98 #endif | |
99 | |
100 #endif /* ! __MPLAYER_FONT_LOAD_H */ | 100 #endif /* ! __MPLAYER_FONT_LOAD_H */ |