Bug 99021 - bad rendering showing text with CAIRO_ANTIALIAS_BEST
Summary: bad rendering showing text with CAIRO_ANTIALIAS_BEST
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: image backend (show other bugs)
Version: unspecified
Hardware: Other All
: highest blocker
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-08 05:14 UTC by Jason Crain
Modified: 2018-08-25 13:42 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
image of bad text rendering (854 bytes, image/png)
2016-12-08 05:14 UTC, Jason Crain
Details
Test case (source code which generate a png) (117.69 KB, application/gzip)
2018-01-26 11:03 UTC, Alexandre Bique
Details

Description Jason Crain 2016-12-08 05:14:47 UTC
Created attachment 128375 [details]
image of bad text rendering

Setting the antialias font option to CAIRO_ANTIALIAS_BEST makes text rendering bad, as shown in the following program.

cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
                                                       80, 40);
cairo_t *cr = cairo_create (surface);
cairo_move_to (cr, 5, 30);
cairo_set_font_size (cr, 30);
cairo_font_options_t *font_options = cairo_font_options_create ();
cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_BEST);
cairo_set_font_options (cr, font_options);
cairo_show_text (cr, "hello");
cairo_surface_write_to_png (surface, "out.png");
Comment 1 Uli Schlachter 2016-12-10 17:27:21 UTC
I can reproduce the problem. I took a quick look at this has "something" to do with _render_glyph_outline() in src/cairo-ft-font.c. Ignoring the actual passed-in value here and forcing something else is enough to trigger this problem or make it go away.

So either this is a bug in freetype or _fill_xrender_bitmap in the same source file mis-converts something here. I don't know and I can't figure out more right now.
Comment 2 Alexandre Bique 2018-01-26 11:01:18 UTC
Hi, I'm having the same issue here.
The rendering is totally broken.

I've produced a test case for it.
Comment 3 Alexandre Bique 2018-01-26 11:03:56 UTC
Created attachment 136971 [details]
Test case (source code which generate a png)
Comment 4 Alexandre Bique 2018-01-26 11:07:44 UTC
This happens with cairo 1.15.10 and freetype 2.9.
I've set it as blocker.
Comment 5 GitLab Migration User 2018-08-25 13:42:29 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/152.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.