mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 420822. Missing 500 weight font should fallback to lighter weights. r+sr=stuart
This commit is contained in:
parent
d5b5fd63c2
commit
8958236208
@ -471,13 +471,11 @@ MacOSFamilyEntry::FindFontWeight(MacOSFontEntry* aFontsForWeights[], const gfxFo
|
||||
// substitute 400 and 500 for each other (example: Futura family that ships with Mac OS X)
|
||||
if (baseWeight == 4 && aFontsForWeights[5]) {
|
||||
baseMatch = 5;
|
||||
} else if (baseWeight == 5 && aFontsForWeights[4]) {
|
||||
baseMatch = 4;
|
||||
} else {
|
||||
|
||||
// otherwise, use explicit CSS rules
|
||||
// weights above 400 ==> look up in weights, then down, otherwise look down, then up
|
||||
direction = (baseWeight > 4 ? 1 : -1);
|
||||
// weights above 500 ==> look up in weights, then down, otherwise look down, then up
|
||||
direction = (baseWeight > 5 ? 1 : -1);
|
||||
|
||||
// search in one direction
|
||||
for (w = baseWeight + direction; w >= 1 && w <= 9; w += direction) {
|
||||
|
Loading…
Reference in New Issue
Block a user