bug 833297 - ensure graphite shaper does not overwrite cluster information. r=jdaggett
authorJonathan Kew <jkew@mozilla.com>
Wed, 23 Jan 2013 16:41:32 +0000
changeset 130311 011d0b0befdcfe3992f5e9f0306e4df72bdf7ab3
parent 130310 4da2cd42a9697d7308f32326cefb3a470c3a7388
child 130312 363a34802aef7c2dafdcbc13140c8e17e4288fe4
push id317
push userbbajaj@mozilla.com
push dateTue, 07 May 2013 01:20:33 +0000
treeherdermozilla-release@159a10910249 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdaggett
bugs833297
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 833297 - ensure graphite shaper does not overwrite cluster information. r=jdaggett
gfx/thebes/gfxGraphiteShaper.cpp
--- a/gfx/thebes/gfxGraphiteShaper.cpp
+++ b/gfx/thebes/gfxGraphiteShaper.cpp
@@ -338,16 +338,17 @@ gfxGraphiteShaper::SetGlyphsFromSegment(
             continue;
         }
 
         uint32_t appAdvance = roundX ? NSToIntRound(adv) * dev2appUnits :
                                        NSToIntRound(adv * dev2appUnits);
         if (c.nGlyphs == 1 &&
             gfxShapedText::CompressedGlyph::IsSimpleGlyphID(gids[c.baseGlyph]) &&
             gfxShapedText::CompressedGlyph::IsSimpleAdvance(appAdvance) &&
+            charGlyphs[offs].IsClusterStart() &&
             yLocs[c.baseGlyph] == 0)
         {
             charGlyphs[offs].SetSimpleGlyph(appAdvance, gids[c.baseGlyph]);
         } else {
             // not a one-to-one mapping with simple metrics: use DetailedGlyph
             nsAutoTArray<gfxShapedText::DetailedGlyph,8> details;
             float clusterLoc;
             for (uint32_t j = c.baseGlyph; j < c.baseGlyph + c.nGlyphs; ++j) {