Mercurial > mplayer.hg
changeset 19063:5525af2ee4c7
Use FcPatternAdd-Type instead of FcNameParse. The latter, as it turns out, requires escaping of some characters ('-', maybe more).
author | eugeni |
---|---|
date | Thu, 13 Jul 2006 18:49:06 +0000 |
parents | 83c3afeab35d |
children | 1ca92a0b7703 |
files | libass/ass_fontconfig.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libass/ass_fontconfig.c Thu Jul 13 16:41:13 2006 +0000 +++ b/libass/ass_fontconfig.c Thu Jul 13 18:49:06 2006 +0000 @@ -43,16 +43,18 @@ 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);