bug 574287 - honor the bad-underline blacklist in dwrite font backend. r=bas

This commit is contained in:
Jonathan Kew 2010-06-24 21:38:57 +01:00
Родитель cb4d169099
Коммит 9f0610f3db
2 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -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,