Bug 1405765 - Only fallback on missing characters with size. r?jrmuizel
MozReview-Commit-ID: Aiae1HOXqi2
--- 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;
}