diff options
author | ChrisK2 <spam@kalania.de> | 2013-05-14 19:14:09 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-09-08 03:35:04 +0200 |
commit | 7f398f833e51dd68e175fbc7585fc29e5dc80f6b (patch) | |
tree | 0ad2112a3276d7299b5ff1463ec85b71e066f9de /sub | |
parent | 9a1978b2ee0c68d3992fbc97fb42d462937129f1 (diff) | |
download | mpv-7f398f833e51dd68e175fbc7585fc29e5dc80f6b.tar.bz2 mpv-7f398f833e51dd68e175fbc7585fc29e5dc80f6b.tar.xz |
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.)
Diffstat (limited to 'sub')
-rw-r--r-- | sub/osd_font.otf | bin | 2276 -> 2960 bytes | |||
-rw-r--r-- | sub/osd_libass.c | 6 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sub/osd_font.otf b/sub/osd_font.otf Binary files differindex d8ebec0ad8..a94ed2f66c 100644 --- a/sub/osd_font.otf +++ b/sub/osd_font.otf 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); |