Commit 34e77a30 authored by Jonathan Kew's avatar Jonathan Kew
Browse files

bug 626299 patch 2 - don't use subpixel-AA mode with DWrite fonts when bitmaps...

bug 626299 patch 2 - don't use subpixel-AA mode with DWrite fonts when bitmaps are present. r=jdaggett a=blocking
parent cfa25ee4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;