[Fontconfig-bugs] [Bug 92981] New: Wrong legacy sub-pixel filter number leading to bad filtering

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Nov 17 10:38:04 PST 2015


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

            Bug ID: 92981
           Summary: Wrong legacy sub-pixel filter number leading to bad
                    filtering
           Product: fontconfig
           Version: 2.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: library
          Assignee: fontconfig-bugs at lists.freedesktop.org
          Reporter: benoar at dolka.fr
        QA Contact: freedesktop at behdad.org

Created attachment 119747
  --> https://bugs.freedesktop.org/attachment.cgi?id=119747&action=edit
[PATCH] Fix wrong legacy LCD sub-pixel filter number

I was having bad font filtering for some years on urxvt: I am used to the
“legacy” LCD filter, and it didn't work anymore very well starting with Debian
wheezy. I finally traced it back to fontconfig: a change to urxvt (in wheezy)
made it aware of the lcd filter used, through FT_Library_SetLcdFilter() which
got its setting from FcPatternGetInteger(…, FC_LCD_FILTER, …). Before that
change to urxvt, strangely, the filtering worked well, I think because the
system default that I set was set more “right” (i.e. not through fontconfig
API, but somehow internally, I suppose) by fontconfig.

So, the bug I found is that FC_LCD_LEGACY (FC_LC_FILTER setting for the legacy
filter) is set to 3 in fontconfig, while it is 16 in FreeType; see
<http://www.freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html> or
<http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/ftlcdfil.h#n137>.
The result is that FreeType then uses no LCD filtering as it does not know this
filter number, leading to colorful fonts. This dates back to 2008…

The attached patch fixes it and makes me happy. BTW, I do not understand why
you do not get this information directly from FreeType's headers, instead
copying it… could it solve further problems if you did it so? Is this in a TODO
list needing some patch?

And finally, I saw that the legacy filter seems “deprecated” and may go away
one day; I know I should rather tell the FreeType developers, but I would like
to pray you for it here: please keep it around! I use strong hinting with this
filter, and it works beautifully!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20151117/031d4756/attachment.html>


More information about the Fontconfig-bugs mailing list