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:
parent
9a1978b2ee
commit
7f398f833e
BIN
sub/osd_font.otf
BIN
sub/osd_font.otf
Binary file not shown.
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user