mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +00:00
Use FcPatternAdd-Type instead of FcNameParse. The latter, as it turns out, requires escaping of some characters ('-', maybe more).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19068 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
32492483c0
commit
8e9ac90c48
@ -43,16 +43,18 @@ static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold
|
||||
int val_i;
|
||||
FcChar8* val_s;
|
||||
FcBool val_b;
|
||||
char buf[2000];
|
||||
|
||||
*index = 0;
|
||||
|
||||
snprintf(buf, 2000, "%s:outline=True:slant=%u:weight=%u", family, italic, bold);
|
||||
|
||||
pat = FcNameParse((const FcChar8*)buf);
|
||||
pat = FcPatternCreate();
|
||||
if (!pat)
|
||||
return 0;
|
||||
|
||||
FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)family);
|
||||
FcPatternAddBool(pat, FC_OUTLINE, FcTrue);
|
||||
FcPatternAddInteger(pat, FC_SLANT, italic);
|
||||
FcPatternAddInteger(pat, FC_WEIGHT, bold);
|
||||
|
||||
FcDefaultSubstitute(pat);
|
||||
|
||||
rc = FcConfigSubstitute(priv->config, pat, FcMatchPattern);
|
||||
|
Loading…
Reference in New Issue
Block a user