bug 626299 patch 2 - don't use subpixel-AA mode with DWrite fonts when bitmaps are present. r=jdaggett a=blocking

This commit is contained in:
Jonathan Kew 2011-01-21 19:26:30 +00:00
Родитель cfa25ee435
Коммит 34e77a30df
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -228,6 +228,12 @@ gfxDWriteFont::ComputeMetrics()
if (HasBitmapStrikeForSize(NS_lround(mAdjustedSize))) {
mAdjustedSize = NS_lround(mAdjustedSize);
mUseSubpixelPositions = PR_FALSE;
// if we have bitmaps, we need to tell Cairo NOT to use subpixel AA,
// to avoid the manual-subpixel codepath in cairo-d2d-surface.cpp
// which fails to render bitmap glyphs (see bug 626299)
if (mAntialiasOption == kAntialiasDefault && UsingClearType()) {
mAntialiasOption = kAntialiasGrayscale;
}
}
mMetrics = new gfxFont::Metrics;