That's not true for me, as you can check here:mwhitlock wrote:I have the Last.fm player installed, and it uses Qt4, and its fonts look identical to those of the rest of my system, so I would guess that Qt4 refrains from messing with the glyphs it receives from FreeType, which means they remain properly filtered for LCD.kokoko3k wrote:What about kde4 and/or qt4?
As far as i know, qt4 doesn't use cairo nor Xft.
Code: Select all
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintmedium</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintslight</const>
</edit>
</match>
<match target="font" >
<test compare="more" name="weight" >
<const>medium</const>
</test>
<edit mode="assign" name="hintstyle" >
<const>hintfull</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>

My comparison shot: http://img407.imageshack.us/my.php?imag ... sonal0.pngkokoko3k wrote:That's not true for me, as you can check here:mwhitlock wrote:I have the Last.fm player installed, and it uses Qt4, and its fonts look identical to those of the rest of my system, so I would guess that Qt4 refrains from messing with the glyphs it receives from FreeType, which means they remain properly filtered for LCD.
http://www.hdimage.org/images/mycnapq2q ... _zool1.png
qtconfig from qt-3.3.8-r4 on the left (which uses xft), qtconfig from qt-4.3.4-r1- on the right, both uses Lucida Sans Unicode, but they look different.

Code: Select all
- if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT)
+ options->base.hint_style = CAIRO_HINT_STYLE_DEFAULT;
+
+ if (other->base.hint_style != CAIRO_HINT_STYLE_DEFAULT)Well, I just reverted the revert and cairo 1.8.0 is working fine here.aliquid wrote:From cairo 1.8.0 release announcement:Sad, but no lcd font rendering for now.Note also that the code that had been in cairo 1.7.x calling into
freetype's optional lcd_filter function was removed from cairo before
the 1.8.0 release. We do expect this code to come back in some form in
the future.
Edit:
Here's a reason:Remove all lcd_filter code.
We reverted the public API for setting lcd_filter font options back in 1b42bc8033bc , but we had left the implementation which would examine fontconfig and Xft properties for the option, and which would call into freetype for subpixel glyph rasterization. However, I recently realized, (and the test suite had been trying to tell me for a while), that this approach would cause a regression for users who were previously using sub-pixel text, but without sub-pixel rendering built directly into freetype. That's not acceptable, so all the code is coming out for now.
Code: Select all
git clone git://anongit.freedesktop.org/git/cairo
cd cairo
git revert 5d887ad5dca5af0f8216830d1b04d08a5aba9bee
git format-patch -k -m --stdout origin > cairo.patch

Thanks for the instructions, octoploid.octoploid wrote:Well, I just reverted the revert and cairo 1.8.0 is working fine here.
Code: Select all
ebuild /usr/portage/x11-libs/cairo/cairo-1.8.0.ebuild unpack
( cd /var/tmp/portage/x11-libs/cairo-1.8.0/work/cairo-1.8.0/ && patch -p1 < ~/cairo-1.8.0-lcdfilter.patch )
ebuild /usr/portage/x11-libs/cairo/cairo-1.8.0.ebuild mergeCode: Select all
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
Yep. Happily, Ubuntu does the sensible thing:mwhitlock wrote:Apparently, "lcddefault" is not the default for the "lcdfilter" option. How counter-intuitive!
Although I prefer adding a single line to /etc/X11/Xresources:* add debian/patches/06_ubuntu_lcddefault.patch: set lcddefault as default for the lcd-filter now that Cairo prefers lcdlegacy. This is needed to restore our previous behavior.
Code: Select all
Xft.lcdfilter: lcddefaultThx for your great job!bi3l wrote:I've updated fontconfig-2.6.0 according to fontconfig_2.6.0-1ubuntu4.diff which includes the lcddefault patch, and cairo-1.8.0 so that it applies the lcdfilter patch from mwhitlock. I've also added EAPI="1" to the freetype and fontconfig ebuilds.
The tarball is here: http://ogmrip.sourceforge.net/misc/gent ... ng.tar.bz2

libXft at 12pt (101 dpi): http://img521.imageshack.us/my.php?imag ... 2ptjm2.pngmanwe_ wrote:Yesterday I was working on OS X and have to say, fonts are looking great on Mac. Is there any way to config Gentoo to display fonts similiar?
mwhitlock wrote:libXft at 12pt (101 dpi): http://img521.imageshack.us/my.php?imag ... 2ptjm2.png
I personally think it looks better than both Windows and Mac.
Code: Select all
# cat /etc/fonts/local.font
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" > <const>rgb</const> </edit>
<edit mode="assign" name="hinting" > <bool>false</bool> </edit>
<edit mode="assign" name="antialias"> <bool>true</bool> </edit>
<edit mode="assign" name="autohint" > <bool>false</bool> </edit>
<edit mode="assign" name="hintstyle"> <const>hintnone</const> </edit>
<edit mode="assign" name="lcdfilter"> <const>lcddefault</const> </edit>
</match>
</fontconfig>
# ls -1 /etc/fonts/conf.d/
10-antialias.conf@
10-sub-pixel-rgb.conf@
20-fix-globaladvance.conf@
30-metric-aliases.conf@
30-urw-aliases.conf@
40-nonlatin.conf@
45-latin.conf@
49-sansserif.conf@
50-user.conf@
51-local.conf@
53-monospace-lcd-filter.conf@
57-dejavu.conf@
60-latin.conf@
60-liberation.conf@
65-fonts-persian.conf@
65-nonlatin.conf@
69-unifont.conf@
80-delicious.conf@
90-synthetic.conf@
Code: Select all
10-antialias.conf
10-autohint.conf
10-hinting.conf
10-hinting-medium.conf
10-no-sub-pixel.conf
10-sub-pixel-rgb.conf
11-lcd-filter-lcddefault.conf
20-fix-globaladvance.conf
20-unhint-small-vera.conf
25-unhint-nonlatin.conf
30-metric-aliases.conf
30-urw-aliases.conf
40-nonlatin.conf
45-latin.conf
49-sansserif.conf
50-user.conf
51-local.conf
53-monospace-lcd-filter.conf
59-dejavu.conf
60-latin.conf
65-fonts-persian.conf
65-nonlatin.conf
69-unifont.conf
80-delicious.conf
90-synthetic.confCode: Select all
10-antialias.conf
10-hinting.conf
10-hinting-medium.conf
10-sub-pixel-rgb.conf
11-lcd-filter-lcddefault.conf
20-fix-globaladvance.conf
20-unhint-small-vera.conf
30-metric-aliases.conf
30-urw-aliases.conf
40-nonlatin.conf
45-latin.conf
49-sansserif.conf
50-user.conf
51-local.conf
53-monospace-lcd-filter.conf
57-dejavu.conf
60-latin.conf
60-liberation.conf
65-fonts-persian.conf
65-nonlatin.conf
69-unifont.conf
80-delicious.conf
90-synthetic.conf
Code: Select all
eselect fontconfig enable 5Great works!bi3l wrote:I've updated fontconfig-2.6.0 according to fontconfig_2.6.0-1ubuntu4.diff which includes the lcddefault patch, and cairo-1.8.0 so that it applies the lcdfilter patch from mwhitlock. I've also added EAPI="1" to the freetype and fontconfig ebuilds.
The tarball is here: http://ogmrip.sourceforge.net/misc/gent ... ng.tar.bz2
Like I've said, looks like reemerging fontconfig [when bi3l suggested] enabled 11-lcd-filter-lcddefault.conf by itself, because I don't remember doin' it. Before that my config looked like this http://forums.gentoo.org/viewtopic-p-52 ... ml#5238170 , and now looks like this http://forums.gentoo.org/viewtopic-p-52 ... ml#5238520 . X was also restarted [or to be precise, tested on new session -- :1 ].nihues wrote:do you had enabled it?
Code: Select all
eselect fontconfig enable 5
Where do I find that file?bi3l wrote:After emerging fontconfig, did you change your /etc/fonts/conf.d ? Because you should at least have 11-lcd-filter-lcddefault.conf (it changes the lcd filter to default instead of legacy).
OK, but I don't seem to have that file at all:bi3l wrote:In /etc/fonts/conf.d. It should be a link to /etc/fonts/conf.avail/11-lcd-filter-lcddefault.conf.
Code: Select all
/etc/fonts/conf.avail $ ls
10-antialias.conf 20-fix-globaladvance.conf 53-monospace-lcd-filter.conf
10-autohint.conf 20-unhint-small-dejavu.conf 57-dejavu.conf
10-hinting.conf 20-unhint-small-dejavu-experimental.conf 60-latin.conf
10-hinting-full.conf 20-unhint-small-vera.conf 61-dejavu-experimental.conf
10-hinting-medium.conf 25-unhint-nonlatin.conf 65-fonts-persian.conf
10-hinting-slight.conf 30-metric-aliases.conf 65-khmer.conf
10-no-sub-pixel.conf 30-urw-aliases.conf 65-nonlatin.conf
10-sub-pixel-bgr.conf 40-nonlatin.conf 69-unifont.conf
10-sub-pixel-rgb.conf 45-latin.conf 70-no-bitmaps.conf
10-sub-pixel-vbgr.conf 49-sansserif.conf 70-yes-bitmaps.conf
10-sub-pixel-vrgb.conf 50-user.conf 80-delicious.conf
10-unhinted.conf 51-local.conf 90-synthetic.conf