Summary: | CAIRO_ANTIALIAS_GRAY font option doesn't turn off subpixel rendering | ||
---|---|---|---|
Product: | cairo | Reporter: | Ilmari Heikkinen <irkheikk> |
Component: | freetype font backend | Assignee: | Jinghua Luo <sunmoon1997> |
Status: | RESOLVED DUPLICATE | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | high | CC: | keithp, otaylor, sunmoon1997 |
Version: | 1.0.2 | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | a proposed patch |
Description
Ilmari Heikkinen
2005-10-17 16:55:28 UTC
Created attachment 5949 [details] [review] a proposed patch I just attached a patch that should fix this problem. Could you apply this patch to cairo HEAD and see what happens? You can't disable subpixel rendering by setting antialias to CAIRO_ANTIALIAS_GRAY in some cases such as you set argb in fontconfig. The font options is a hint for font backend, somethings the font backend may ignore them completely. I think this is expected behavior and user expects this, otherwise people will complain fontconfig doesn't work any more which is bad. http://gitweb.freedesktop.org/? p=cairo;a=commitdiff;h=54b4a2fccdcaa4fbc126818c7cb7b96a1a8acf35 With above commit, the freetype backend uses the font options combined with options from font pattern and doesn't set load target to FT_LOAD_TARGET_LCD [_V] while antialias in combined font options is CAIRO_ANTIALIAS_DEFAULT or CAIRO_ANTIALIAS_GRAY. So, I'm going to close this bug. Any further comments? The interaction of the various font options can get tricky. I thought at one point that Owen Taylor had written a description of the various places font options can come from, (fontconfig, per-surface defaults, explicit calls to cairo_set_font_options, etc.), and also described which options should override the others. I can't find the email I was imagining on that subject, but I'd love to add a paragraph like that to the cairo documentation. Keith or Owen? -Carl In this specific case of this bug, I think that if code using cairo explicitly passes ANTIALIAS_GRAY then the font backend should respect that (if it is capable of doing so, obviously). If the user of such an application would complain that an "argb" option set through fontconfig was being overriden then that user should complain to the author of the program. That is, the explicit calls to cairo_set_font_options should be the final word on font options and should override any previous implicit settings. -Carl The default fontconfig settings respect application settings for all rendering options. User customizations may override these. That's how it's supposed to work; users should always be able to override application developers choices as it is imperative that end users be able to override broken environments (and, frankly, broken applications). |
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.