Bug 20913 - Font rendering issues
Summary: Font rendering issues
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: quartz font backend (show other bugs)
Version: 1.9.1
Hardware: Other All
: medium normal
Assignee: Vladimir Vukicevic
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-27 14:16 UTC by Juan Pablo Ugarte
Modified: 2018-08-25 13:57 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Test case (1.49 KB, text/plain)
2009-03-27 14:18 UTC, Juan Pablo Ugarte
Details
Test case output (15.92 KB, image/png)
2009-03-27 14:19 UTC, Juan Pablo Ugarte
Details
html example (152 bytes, text/html)
2009-04-15 11:45 UTC, Juan Pablo Ugarte
Details

Description Juan Pablo Ugarte 2009-03-27 14:16:13 UTC
I found two weird issues with font rendering that makes it ugly.

First of all the antialiasing method seems to differ when the cairo source is a solid color or a pattern.
Subpixel smoothing is only used with a solid color source.

The other problem happens when a black bg is used, the subpixel smoothing make the font look bold instead of normal.
Comment 1 Juan Pablo Ugarte 2009-03-27 14:18:58 UTC
Created attachment 24325 [details]
Test case
Comment 2 Juan Pablo Ugarte 2009-03-27 14:19:50 UTC
Created attachment 24326 [details]
Test case output
Comment 3 James Cloos 2009-03-28 12:31:42 UTC
I looked at this before noticing that the bug report was for quartz....

That said, I can confirm that the lack of sub-pixel aa when using a pattern does not occur when the test case is compiled with -DNOT_QUARTZ against a version of cairo which uses freetype.  (I was going to write “it is quartz-specific” but other backends (such as dows) may have similar issues....

As for the gamma issue, zooming in on the image shows that the pixel coverage is the same in the w/b half as in the b/w half.  A similar bug report was made against libXft some years ago; the sub-pixel filtering has to take gamma into consideration in order for the font weight to look similar when rendered to different colour combinations.
Comment 4 Juan Pablo Ugarte 2009-04-15 11:45:56 UTC
Created attachment 24826 [details]
html example

ok, so this is not a cairo bug but a quartz one, even tough it would be really nice to find a workaround.

Quartz docs say that in some situations, like when drawing over a bitmap subpixel smoothing is not recommended.

So after reading that, i read around the web that you should set and draw the bg before setting up font smoothing, and that if you do not know the bg color you better dont use subpixel AA.

First I though it makes sense, but then I wondered if safari knew its bg color
and as far i can tell, it does not.
Comment 5 GitLab Migration User 2018-08-25 13:57:55 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/291.


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.