Summary: | Ugly Courier New font with cairo 1.4.12 | ||
---|---|---|---|
Product: | cairo | Reporter: | lonefox |
Component: | freetype font backend | Assignee: | David Turner <david> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | cworth, sylvain.pasche |
Version: | 1.4.12 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Screenshot of Courier New (xlib backend)
Screenshot of Sazanami Mincho (xlib backend) Courier New on png backend (first glyph with bitmap strike) |
Description
lonefox
2007-11-30 23:52:11 UTC
Some explanation: http://lists.cairographics.org/archives/cairo/2007-December/012302.html One patch (would need refresh): http://lists.cairographics.org/archives/cairo/2007-December/012349.html Fixed on master. Can you give it a try: commit 83963d2a9ec445e23cfbe692b877177a9d9d135e Author: Behdad Esfahbod <behdad@behdad.org> Date: Mon Dec 17 01:19:53 2007 -0500 [cairo-ft] Revert "Force non-AA text when using a bitmap strike with only scaling transform." (#13479) The reasoning for that commit was that fonts with bitmap strikes should be rendered with antialiasing off for those (hopefully) few glyphs that don't have a bitmap. However, it turns out, there are fonts that have some, but very few, bitmaps, and this changed forces non-AA rendering on them. We now support multiple glyph formats per font in the Xlib backend, so backing this out to let every glyph render as is. Fontconfig rules can be used to force AA off on a per-font basis. This reverts commit 06af5c2891b89da28581c30afcde06c5442884db. commit 805b668260c47e6d3d854361fcc53f12bd2a57e1 Author: Behdad Esfahbod <behdad@behdad.org> Date: Mon Dec 17 01:14:27 2007 -0500 [cairo-xlib] Support scale fonts with glyphs of multiple formats (#13479) We maintain three Xrender glyphsets per scaled font, one for each of A1, A8, and ARGB32. This is required to correctly support fonts with bitmaps for some glyphs but not all. Created attachment 13154 [details] Screenshot of Courier New (xlib backend) Thanks Behdad, this is now working as expected. The screenshot shows Courier New on the xlib backend. The first glyph has a bitmap strike and is not antialiased (source is a slight modification of the testcase on http://lists.cairographics.org/archives/cairo/attachments/20071212/230663a6/attachment.c) Created attachment 13155 [details]
Screenshot of Sazanami Mincho (xlib backend)
The third glyph here has a bitmap strike (U+8FE6), while the first has none and is antialiased (U+8FE8)
Thanks for testing. Created attachment 13156 [details] Courier New on png backend (first glyph with bitmap strike) On PNG surface, there is still the issue described by Keith: http://lists.cairographics.org/archives/cairo/2007-October/011788.html "If the first glyph has a bitmap version, cairo assumes that all of the glyphs will and creates the font in A1 format." In this screenshot, the first glyph has a bitmap strike, so the others are not antialiased. This issue with very rare with Courier New, as it has only three glyphs with bitmap, but that could occur more often with Sazanami which has a lot more of bitmaps. Right. Lets fix image backend too then. I've fixed the image backend so that glyphs that should be antialiased will now be rendered with antialiasing even if the first glyph happens to have a bitmap strike. Also, I noticed that when rendering sub-pixel antialiased glyphs, that bitmap-strike glyphs were not being rendered at all. My fix takes care of this additional problem by simply turning off the sub-pixel antialiasing in such cases, (though grayscaled antialiasing still occurs). Behdad is palnning to do a more complete fix that would maintain the sub-pixel antialiasing. But that's a separate issue, so I'm closing this bug report now. My fix is on the master (1.5) branch here: http://cgit.freedesktop.org/cairo/commit/?id=ecb895803b9d2a3fd142f4a2c694ca08c5581f0e and is also on the 1.4 branch (so will appear in the upcoming 1.4.14 release) here: http://cgit.freedesktop.org/cairo/commit/?h=1.4&id=35ed062a6269feeebae70c98000b60630a9ec3bd Thanks for your report, and have fun with cairo! -Carl |
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.