Title: [239539] trunk/Source/WebCore
Revision
239539
Author
carlo...@webkit.org
Date
2018-12-22 04:33:52 -0800 (Sat, 22 Dec 2018)

Log Message

[HarfBuzz] Width not correctly reported as 0 for zero font size
https://bugs.webkit.org/show_bug.cgi?id=192986

Reviewed by Michael Catanzaro.

Fixes test fast/text/font-size-zero.html

* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Use empty advances for glyphs when the font
size is zero.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (239538 => 239539)


--- trunk/Source/WebCore/ChangeLog	2018-12-22 07:53:26 UTC (rev 239538)
+++ trunk/Source/WebCore/ChangeLog	2018-12-22 12:33:52 UTC (rev 239539)
@@ -1,3 +1,16 @@
+2018-12-22  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [HarfBuzz] Width not correctly reported as 0 for zero font size
+        https://bugs.webkit.org/show_bug.cgi?id=192986
+
+        Reviewed by Michael Catanzaro.
+
+        Fixes test fast/text/font-size-zero.html
+
+        * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
+        (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Use empty advances for glyphs when the font
+        size is zero.
+
 2018-12-20  Yusuke Suzuki  <yusukesuz...@slowstart.org>
 
         Use Ref<> as much as possible

Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp (239538 => 239539)


--- trunk/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp	2018-12-22 07:53:26 UTC (rev 239538)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp	2018-12-22 12:33:52 UTC (rev 239539)
@@ -156,7 +156,7 @@
         m_coreTextIndices[i] = glyphInfos[i].cluster;
 
         uint16_t glyph = glyphInfos[i].codepoint;
-        if (m_font.isZeroWidthSpaceGlyph(glyph)) {
+        if (m_font.isZeroWidthSpaceGlyph(glyph) || !m_font.platformData().size()) {
             m_glyphs[i] = glyph;
             m_baseAdvances[i] = { };
             m_glyphOrigins[i] = { };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to