[cairo-bugs] [Bug 10301] LCD filtering patch

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed May 7 12:25:18 PDT 2008


http://bugs.freedesktop.org/show_bug.cgi?id=10301





--- Comment #47 from James Cloos <cloos at jhcloos.com>  2008-05-07 12:25:14 PST ---
Now that Keith commited the fontconfig support I’ve been testing out
this patch, using this snippit in my fonts.conf:

<?xml version="1.0"?>
<fontconfig>
 <match target="font">
  <test name="fontformat" compare="eq">
   <string>TrueType</string>
  </test>
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
  <edit mode="assign" name="hintstyle">
   <const>hintfull</const>
  </edit>
  <edit mode="assign" name="lcdfilter">
   <const>lcdlegacy</const>
  </edit>
 </match>

 <match target="font">
  <test name="fontformat" compare="eq">
   <string>CFF</string>
  </test>
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
  <edit mode="assign" name="hintstyle">
   <const>hintslight</const>
  </edit>
  <edit mode="assign" name="lcdfilter">
   <const>lcdlight</const>
  </edit>
 </match>

 <match target="font">
  <test name="fontformat" compare="eq">
   <string>Type 1</string>
  </test>
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
  <edit mode="assign" name="hintstyle">
   <const>hintslight</const>
  </edit>
  <edit mode="assign" name="lcdfilter">
   <const>lcdlight</const>
  </edit>
 </match>
</fontconfig>

to get native hints and the legacy filter for sfnt/glyf fonts and light
hints with the light filter for sfnt/cff and type1 fonts.  I’ve also
experimented with lcddefault for the latter two.

Most of the apps I use heavily are still libXft-based, but for those I
generally end up with well-instructed sfnt/glyf fonts anyway.  The cairo-
using apps I’ve tested, though, look better with the varying filtering
than without.

When merging the branch to master¹ there are two conflicts in:

        src/cairo-font-options.c
        src/cairo-ft-font.c

Both are pretty obvious given a look at their history in Sylvain’s branch.

There are a couple of minor style nits:  there may be some tab-vs space
ambiguity and the single-line if blocks have braces (the removal of such
braces on master causes one of those two conflicts), but otherwise nothing
stood out in a quick look.

The cairo ebuild in my personal Gentoo overlay² has the (single file)
patch³ from master to the merged lcd_filer branch, in case any other
Gentoo users want to try it out.

1] as of commit b7272e9e
2] git://people.freedesktop.org/~cloos/overlay.git
3]
http://cgit.freedesktop.org/~cloos/overlay/diff/x11-libs/cairo/files/lcd-filter.patch


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list