mirror of https://github.com/odrling/Aegisub
Fix faux bold logic in font collector for Fontconfig
Based on libass's logic (a requested weight of over 150 more than the matching font).
This commit is contained in:
parent
4b2cd7f170
commit
3dfc553880
|
@ -109,11 +109,9 @@ CollectionResult FontConfigFontFileLister::GetFontPaths(std::string const& facen
|
|||
}
|
||||
}
|
||||
|
||||
if (weight > 80) {
|
||||
int actual_weight = weight;
|
||||
if (FcPatternGetInteger(match, FC_WEIGHT, 0, &actual_weight) == FcResultMatch)
|
||||
ret.fake_bold = actual_weight <= 80;
|
||||
}
|
||||
int actual_weight = 0;
|
||||
if (FcPatternGetInteger(match, FC_WEIGHT, 0, &actual_weight) == FcResultMatch)
|
||||
ret.fake_bold = weight > FcWeightToOpenType(actual_weight) + 150;
|
||||
|
||||
int actual_slant = slant;
|
||||
if (FcPatternGetInteger(match, FC_SLANT, 0, &actual_slant) == FcResultMatch)
|
||||
|
|
Loading…
Reference in New Issue