diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-04-01 02:26:34 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-04-01 02:43:47 +0300 |
commit | cf9edda1d370d39bc8a3d020a9c2bc4090d2457e (patch) | |
tree | 1d1bbc529a4e8109fb6aa5cadf0dbbb7bd61013a /libass/ass_fontconfig.c | |
parent | 7af8417ae7beb409f54849956a7037bc66c4c334 (diff) | |
parent | 1c37a6427abef0827c608d328d37ca1b1a0a022d (diff) | |
download | mpv-cf9edda1d370d39bc8a3d020a9c2bc4090d2457e.tar.bz2 mpv-cf9edda1d370d39bc8a3d020a9c2bc4090d2457e.tar.xz |
Merge svn changes up to r29117
Diffstat (limited to 'libass/ass_fontconfig.c')
-rw-r--r-- | libass/ass_fontconfig.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libass/ass_fontconfig.c b/libass/ass_fontconfig.c index d0042dcdfd..a54bc8c4af 100644 --- a/libass/ass_fontconfig.c +++ b/libass/ass_fontconfig.c @@ -160,11 +160,13 @@ static char* _select_font(fc_instance_t* priv, const char* family, int treat_fam goto error; #if (FC_VERSION >= 20297) - // Remove all extra family names from original pattern. - // After this, FcFontRenderPrepare will select the most relevant family - // name in case there are more than one of them. - for (; family_cnt > 1; --family_cnt) - FcPatternRemove(pat, FC_FAMILY, family_cnt - 1); + if (!treat_family_as_pattern) { + // Remove all extra family names from original pattern. + // After this, FcFontRenderPrepare will select the most relevant family + // name in case there are more than one of them. + for (; family_cnt > 1; --family_cnt) + FcPatternRemove(pat, FC_FAMILY, family_cnt - 1); + } #endif rpat = FcFontRenderPrepare(priv->config, pat, fset->fonts[curf]); |