Index: Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp |
diff --git a/Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp b/Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp |
index 72cd1cc0f6064a4e8702bf145f49d5cf50b6f6c5..d21f7e9155210ce667e9c8827fd2ea7d749766b9 100644 |
--- a/Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp |
+++ b/Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp |
@@ -213,10 +213,10 @@ float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFon |
return 0; |
if (glyphOverflow) { |
- glyphOverflow->top = std::max<int>(glyphOverflow->top, ceilf(-shaper.minGlyphBoundingBoxY()) - (glyphOverflow->computeBounds ? 0 : fontMetrics().ascent())); |
- glyphOverflow->bottom = std::max<int>(glyphOverflow->bottom, ceilf(shaper.maxGlyphBoundingBoxY()) - (glyphOverflow->computeBounds ? 0 : fontMetrics().descent())); |
- glyphOverflow->left = std::max<int>(0, ceilf(-shaper.minGlyphBoundingBoxX())); |
- glyphOverflow->right = std::max<int>(0, ceilf(shaper.maxGlyphBoundingBoxX() - shaper.totalWidth())); |
+ glyphOverflow->top = std::max<int>(glyphOverflow->top, ceilf(-shaper.glyphBoundingBox().top()) - (glyphOverflow->computeBounds ? 0 : fontMetrics().ascent())); |
+ glyphOverflow->bottom = std::max<int>(glyphOverflow->bottom, ceilf(shaper.glyphBoundingBox().bottom()) - (glyphOverflow->computeBounds ? 0 : fontMetrics().descent())); |
+ glyphOverflow->left = std::max<int>(0, ceilf(-shaper.glyphBoundingBox().left())); |
+ glyphOverflow->right = std::max<int>(0, ceilf(shaper.glyphBoundingBox().right() - shaper.totalWidth())); |
} |
return shaper.totalWidth(); |
} |