diff options
author | ben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-05-20 16:10:45 +0000 |
---|---|---|
committer | ben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-05-20 16:10:45 +0000 |
commit | 194fc1b15b8c5dfb3b7a5a78e0f83ed9c0e21f3b (patch) | |
tree | 41f7242c3a4d81ed3fe2d9c7df157bff44dd9a57 /libvo/font_load_ft.c | |
parent | b0615f0024c7a7f073e85d7e8b992bd78ee88515 (diff) | |
download | mpv-194fc1b15b8c5dfb3b7a5a78e0f83ed9c0e21f3b.tar.bz2 mpv-194fc1b15b8c5dfb3b7a5a78e0f83ed9c0e21f3b.tar.xz |
add new -subfont option, that allows having a different font for OSD (controls and menu) and subtitles
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23356 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/font_load_ft.c')
-rw-r--r-- | libvo/font_load_ft.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c index 2929de5620..b545eda853 100644 --- a/libvo/font_load_ft.c +++ b/libvo/font_load_ft.c @@ -942,7 +942,7 @@ int kerning(font_desc_t *desc, int prevc, int c) { FT_Vector kern; - if (!vo_font->dynamic) return 0; + if (!desc->dynamic) return 0; if (prevc < 0 || c < 0) return 0; if (desc->font[prevc] != desc->font[c]) return 0; if (desc->font[prevc] == -1 || desc->font[c] == -1) return 0; @@ -1137,7 +1137,7 @@ int done_freetype(void) return 0; } -void load_font_ft(int width, int height) +void load_font_ft(int width, int height, font_desc_t** fontp, const char *font_name) { #ifdef HAVE_FONTCONFIG FcPattern *fc_pattern; @@ -1145,6 +1145,7 @@ void load_font_ft(int width, int height) FcChar8 *s; FcBool scalable; #endif + font_desc_t *vo_font = *fontp; vo_image_width = width; vo_image_height = height; @@ -1177,10 +1178,10 @@ void load_font_ft(int width, int height) } // s doesn't need to be freed according to fontconfig docs FcPatternGetString(fc_pattern, FC_FILE, 0, &s); - vo_font=read_font_desc_ft(s, width, height); + *fontp=read_font_desc_ft(s, width, height); FcPatternDestroy(fc_pattern); } else #endif - vo_font=read_font_desc_ft(font_name, width, height); + *fontp=read_font_desc_ft(font_name, width, height); } |