Make the check for faux bold match libass's logic for when to embolden

This commit is contained in:
Thomas Goyne 2014-05-07 07:13:32 -07:00
parent 8e5d4c48bc
commit 049142f6f6
1 changed files with 5 additions and 3 deletions

View File

@ -133,9 +133,11 @@ FontFileLister::CollectionResult FontConfigFontFileLister::GetFontPaths(std::str
}
}
if (weight > 80) {
int actual_weight = weight;
if (FcPatternGetInteger(match, FC_WEIGHT, 0, &actual_weight) == FcResultMatch)
ret.fake_bold = actual_weight < weight;
ret.fake_bold = actual_weight <= 80;
}
int actual_slant = slant;
if (FcPatternGetInteger(match, FC_SLANT, 0, &actual_slant) == FcResultMatch)