From 7f398f833e51dd68e175fbc7585fc29e5dc80f6b Mon Sep 17 00:00:00 2001 From: ChrisK2 Date: Tue, 14 May 2013 19:14:09 +0200 Subject: osc: rename osd_font, add some glyphs Cherry picked from various commits in lua_experiment by ChrisK2. The metrics of the OSD symbols change slightly, possibly due to the font editor that was used, and the metrics were not correct to begin with. (But the real reason seems unknown.) Remove the rescaling of the OSD font in ASS_USE_OSD_FONT, because the height more or less fits now. (This change wasn't in the lua_experiment branch.) --- sub/osd_font.otf | Bin 2276 -> 2960 bytes sub/osd_libass.c | 6 ++---- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'sub') diff --git a/sub/osd_font.otf b/sub/osd_font.otf index d8ebec0ad8..a94ed2f66c 100644 Binary files a/sub/osd_font.otf and b/sub/osd_font.otf differ diff --git a/sub/osd_libass.c b/sub/osd_libass.c index 32edf78f96..36e2a0ca0f 100644 --- a/sub/osd_libass.c +++ b/sub/osd_libass.c @@ -37,14 +37,12 @@ static const char osd_font_pfb[] = #include "mpvcore/options.h" -// NOTE: \fs-5 to reduce the size of the symbols in relation to normal text. -// Done because libass doesn't center characters that are too high. -#define ASS_USE_OSD_FONT "{\\fnOSD\\fs-5}" +#define ASS_USE_OSD_FONT "{\\fnmpv-osd-symbols}" void osd_init_backend(struct osd_state *osd) { osd->osd_ass_library = mp_ass_init(osd->opts); - ass_add_font(osd->osd_ass_library, "OSD", (void *)osd_font_pfb, + ass_add_font(osd->osd_ass_library, "mpv-osd-symbols", (void *)osd_font_pfb, sizeof(osd_font_pfb) - 1); osd->osd_render = ass_renderer_init(osd->osd_ass_library); -- cgit v1.2.3