[Cairo] CairoGlyphToPathTranslator::path() shouldn't fill out the glyph path
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Nov 2017 08:05:52 +0000 (08:05 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Nov 2017 08:05:52 +0000 (08:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=179159

Reviewed by Michael Catanzaro.

In case of non-zero synthetic bold offset in CairoGlyphToPathTranslator::path(),
cairo_glyph_path() should be called just like in the generic case.
cairo_show_glyphs() performs the actual rasterization of the glyph, but we're
only interested in the generated path operations.

No new tests -- covered by existing tests.

* platform/graphics/cairo/FontCairo.cpp:
(WebCore::CairoGlyphToPathTranslator::path):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224483 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cairo/FontCairo.cpp

index d8f88aa..f1a55f7 100644 (file)
@@ -1,3 +1,20 @@
+2017-11-06  Zan Dobersek  <zdobersek@igalia.com>
+
+        [Cairo] CairoGlyphToPathTranslator::path() shouldn't fill out the glyph path
+        https://bugs.webkit.org/show_bug.cgi?id=179159
+
+        Reviewed by Michael Catanzaro.
+
+        In case of non-zero synthetic bold offset in CairoGlyphToPathTranslator::path(),
+        cairo_glyph_path() should be called just like in the generic case.
+        cairo_show_glyphs() performs the actual rasterization of the glyph, but we're
+        only interested in the generated path operations.
+
+        No new tests -- covered by existing tests.
+
+        * platform/graphics/cairo/FontCairo.cpp:
+        (WebCore::CairoGlyphToPathTranslator::path):
+
 2017-11-05  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         [WinCairo] Fix build after r224463
index 87b8fb8..1f6018e 100644 (file)
@@ -253,7 +253,7 @@ Path CairoGlyphToPathTranslator::path()
     float syntheticBoldOffset = m_fontData->syntheticBoldOffset();
     if (syntheticBoldOffset) {
         cairo_translate(path.platformPath()->context(), syntheticBoldOffset, 0);
-        cairo_show_glyphs(path.platformPath()->context(), &cairoGlyph, 1);
+        cairo_glyph_path(path.platformPath()->context(), &cairoGlyph, 1);
     }
 
     path.transform(m_translation);