diff options
author | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-08 16:13:26 +0000 |
---|---|---|
committer | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-08 16:13:26 +0000 |
commit | 79b915673295129c39848765b06972136c82b607 (patch) | |
tree | 1de034b31b899eb12b42537fa6afc418e71c905f /libass/ass_fontconfig.c | |
parent | 686d57168f91e7314a0dc7a3ce95a905e83e49dc (diff) | |
download | mpv-79b915673295129c39848765b06972136c82b607.tar.bz2 mpv-79b915673295129c39848765b06972136c82b607.tar.xz |
Cosmetics: reindent.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28896 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass/ass_fontconfig.c')
-rw-r--r-- | libass/ass_fontconfig.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/libass/ass_fontconfig.c b/libass/ass_fontconfig.c index 9bdca86f31..d0042dcdfd 100644 --- a/libass/ass_fontconfig.c +++ b/libass/ass_fontconfig.c @@ -99,31 +99,31 @@ static char* _select_font(fc_instance_t* priv, const char* family, int treat_fam goto error; if (!treat_family_as_pattern) { - FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)family); - - // In SSA/ASS fonts are sometimes referenced by their "full name", - // which is usually a concatenation of family name and font - // style (ex. Ottawa Bold). Full name is available from - // FontConfig pattern element FC_FULLNAME, but it is never - // used for font matching. - // Therefore, I'm removing words from the end of the name one - // by one, and adding shortened names to the pattern. It seems - // that the first value (full name in this case) has - // precedence in matching. - // An alternative approach could be to reimplement FcFontSort - // using FC_FULLNAME instead of FC_FAMILY. - family_cnt = 1; - { - char* s = strdup(family); - char* p = s + strlen(s); - while (--p > s) - if (*p == ' ' || *p == '-') { - *p = '\0'; - FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)s); - ++ family_cnt; - } - free(s); - } + FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)family); + + // In SSA/ASS fonts are sometimes referenced by their "full name", + // which is usually a concatenation of family name and font + // style (ex. Ottawa Bold). Full name is available from + // FontConfig pattern element FC_FULLNAME, but it is never + // used for font matching. + // Therefore, I'm removing words from the end of the name one + // by one, and adding shortened names to the pattern. It seems + // that the first value (full name in this case) has + // precedence in matching. + // An alternative approach could be to reimplement FcFontSort + // using FC_FULLNAME instead of FC_FAMILY. + family_cnt = 1; + { + char* s = strdup(family); + char* p = s + strlen(s); + while (--p > s) + if (*p == ' ' || *p == '-') { + *p = '\0'; + FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)s); + ++ family_cnt; + } + free(s); + } } FcPatternAddBool(pat, FC_OUTLINE, FcTrue); FcPatternAddInteger(pat, FC_SLANT, italic); |