1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-21 22:30:22 +00:00

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.)
This commit is contained in:
ChrisK2 2013-05-14 19:14:09 +02:00 committed by wm4
parent 9a1978b2ee
commit 7f398f833e
2 changed files with 2 additions and 4 deletions

Binary file not shown.

View File

@ -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);