Bug 1405765 - Only fallback on missing characters with size. r?jrmuizel draft
authorAlexis Beingessner <a.beingessner@gmail.com>
Wed, 04 Oct 2017 13:55:28 -0400
changeset 674991 2c71c46cd720629c4723f1edd72acf3a1728dfaa
parent 674765 294f332a35538940469b1a2576615ff5ffe1e016
child 734479 d399dee442ecd8f8a4208a15914ea37683832781
push id82998
push userbmo:a.beingessner@gmail.com
push dateWed, 04 Oct 2017 18:05:15 +0000
reviewersjrmuizel
bugs1405765
milestone58.0a1
Bug 1405765 - Only fallback on missing characters with size. r?jrmuizel MozReview-Commit-ID: Aiae1HOXqi2
gfx/thebes/gfxFont.cpp
--- a/gfx/thebes/gfxFont.cpp
+++ b/gfx/thebes/gfxFont.cpp
@@ -1918,24 +1918,26 @@ gfxFont::DrawGlyphs(const gfxShapedText 
             if (glyphCount > 0) {
                 const gfxShapedText::DetailedGlyph *details =
                     aShapedText->GetDetailedGlyphs(aOffset + i);
                 NS_ASSERTION(details, "detailedGlyph should not be missing!");
                 for (uint32_t j = 0; j < glyphCount; ++j, ++details) {
                     double advance = details->mAdvance;
 
                     if (glyphData->IsMissing()) {
-                        if (auto* textDrawer = aRunParams.context->GetTextDrawer()) {
-                            textDrawer->FoundUnsupportedFeature();
-                            return false;
-                        }
                         // Default-ignorable chars will have zero advance width;
                         // we don't have to draw the hexbox for them.
                         if (aRunParams.drawMode != DrawMode::GLYPH_PATH &&
                             advance > 0) {
+
+                            if (auto* textDrawer = aRunParams.context->GetTextDrawer()) {
+                                textDrawer->FoundUnsupportedFeature();
+                                return false;
+                            }
+
                             double glyphX = aPt->x;
                             double glyphY = aPt->y;
                             if (aRunParams.isRTL) {
                                 if (aFontParams.isVerticalFont) {
                                     glyphY -= advance;
                                 } else {
                                     glyphX -= advance;
                                 }