[cairo-bugs] [Bug 28583] PDF glyph_path() inaccuracies

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 22 09:19:37 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=28583

--- Comment #3 from Jiri Drbalek <jiri.drbalek at email.cz> ---
I've tried the test program as I was after similar bug. I could reproduce it on
my Gentoo system, but not with the latest upstream Cairo.

The reason why Gentoo version was causing the bug is the following
Gentoo-specific patch.


--- cairo-1.7.6-orig/src/cairo-ft-font.c        2008-09-29 21:43:13.000000000
+0100
+++ cairo-1.7.6/src/cairo-ft-font.c     2008-09-29 21:52:19.000000000 +0100
@@ -1705,7 +1705,9 @@
        options->base.subpixel_order = other->base.subpixel_order;
     }

-    if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT)
+    options->base.hint_style = CAIRO_HINT_STYLE_DEFAULT;
+
+    if (other->base.hint_style != CAIRO_HINT_STYLE_DEFAULT)
        options->base.hint_style = other->base.hint_style;

     if (other->base.hint_style == CAIRO_HINT_STYLE_NONE)


Therefore the problem is related to hinting. I could fix the test program by
disabling hinting:


diff --git a/halo_test.c b/halo_test.c
index cd12925..8863cff 100644
--- a/halo_test.c
+++ b/halo_test.c
@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
         FT_New_Face(ftLib,
"/usr/share/fonts/liberation-fonts/LiberationMono-Regular.ttf",
                     0, &ftFace);
         cairo_font_face_t *cFace = cairo_ft_font_face_create_for_ft_face(
-                ftFace, 0);
+                ftFace, FT_LOAD_NO_HINTING);

         // Font info
         const double userSize = 0.0030594270330026917;

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo-bugs/attachments/20180522/b736210b/attachment.html>


More information about the cairo-bugs mailing list