зеркало из https://github.com/mozilla/gecko-dev.git
bug 574287 - honor the bad-underline blacklist in dwrite font backend. r=bas
This commit is contained in:
Родитель
cb4d169099
Коммит
9f0610f3db
|
@ -136,6 +136,9 @@ gfxDWriteFontFamily::FindStyleVariations()
|
||||||
NS_WARNING("Family with no font faces in it.");
|
NS_WARNING("Family with no font faces in it.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mIsBadUnderlineFamily) {
|
||||||
|
SetBadUnderlineFonts();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -531,9 +534,11 @@ gfxDWriteFontList::InitFontList()
|
||||||
|
|
||||||
if (!mFontFamilies.GetWeak(name)) {
|
if (!mFontFamilies.GetWeak(name)) {
|
||||||
nsRefPtr<gfxFontFamily> fam =
|
nsRefPtr<gfxFontFamily> fam =
|
||||||
new gfxDWriteFontFamily(
|
new gfxDWriteFontFamily(nsDependentString(famName.Elements()),
|
||||||
nsDependentString(famName.Elements()),
|
family);
|
||||||
family);
|
if (mBadUnderlineFamilyNames.Contains(name)) {
|
||||||
|
fam->SetBadUnderlineFamily();
|
||||||
|
}
|
||||||
mFontFamilies.Put(name, fam);
|
mFontFamilies.Put(name, fam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,7 +231,7 @@ gfxDWriteFont::ComputeMetrics()
|
||||||
|
|
||||||
mFUnitsConvFactor = GetAdjustedSize() / fontMetrics.designUnitsPerEm;
|
mFUnitsConvFactor = GetAdjustedSize() / fontMetrics.designUnitsPerEm;
|
||||||
|
|
||||||
SanitizeMetrics(&mMetrics, PR_FALSE);
|
SanitizeMetrics(&mMetrics, GetFontEntry()->mIsBadUnderlineFont);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
printf("Font: %p (%s) size: %f\n", this,
|
printf("Font: %p (%s) size: %f\n", this,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче