View previous topic :: View next topic |
Author |
Message |
ocin Guru
Joined: 01 Jan 2006 Posts: 500
|
Posted: Fri Sep 26, 2008 5:55 pm Post subject: |
|
|
font ebuilds are in "devnull" now too.
Last edited by ocin on Mon Oct 06, 2008 7:44 pm; edited 2 times in total |
|
Back to top |
|
|
kokoko3k n00b
Joined: 06 May 2005 Posts: 72
|
Posted: Mon Sep 29, 2008 7:19 am Post subject: |
|
|
mwhitlock wrote: | kokoko3k wrote: | What about kde4 and/or qt4?
As far as i know, qt4 doesn't use cairo nor Xft. |
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. |
That's not true for me, as you can check here:
http://www.hdimage.org/images/mycnapq2qgewjs07d36y_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.
My .fonts.conf, nothing special:
Code: |
<?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>
|
By the way, i used: http://ogmrip.sourceforge.net/misc/gentoo-lcd-filtering.tar.bz2 |
|
Back to top |
|
|
mwhitlock Tux's lil' helper
Joined: 07 Aug 2006 Posts: 87 Location: New Hampshire, USA
|
Posted: Mon Sep 29, 2008 10:21 am Post subject: |
|
|
kokoko3k wrote: | 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. |
That's not true for me, as you can check here:
http://www.hdimage.org/images/mycnapq2qgewjs07d36y_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. |
My comparison shot: http://img407.imageshack.us/my.php?image=qtcomparisonal0.png
You are right that they aren't identical. However, I think the Qt4 rendering looks better in my case. I think Qt4 looks worse in your case. Of course, this is all subjective. |
|
Back to top |
|
|
natros n00b
Joined: 26 Sep 2003 Posts: 70
|
|
Back to top |
|
|
kokoko3k n00b
Joined: 06 May 2005 Posts: 72
|
Posted: Wed Oct 01, 2008 3:14 pm Post subject: |
|
|
Glad to read your link.
I think sroedal is talking about a bug i submitted some months ago to trolltech, i totally missed it, thanks. |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Wed Oct 01, 2008 3:24 pm Post subject: |
|
|
Regarding the cairo bug with qt4, try this patch from my Fedora 9 font packages:
Code: | - 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) |
Taken from bug 11838 and bug 13335.
Edit: Qt4 is broken and doesn't use Cairo anyway. But this patch is useful to make Gnome respect ~/.fonts.conf
Last edited by PaulBredbury on Fri Oct 10, 2008 4:14 pm; edited 2 times in total |
|
Back to top |
|
|
octoploid n00b
Joined: 21 Oct 2006 Posts: 65
|
Posted: Wed Oct 01, 2008 5:58 pm Post subject: |
|
|
aliquid wrote: | From cairo 1.8.0 release announcement:
Quote: | 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. |
Sad, but no lcd font rendering for now.
Edit:
Here's a reason:
Quote: | 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. |
|
Well, I just reverted the revert and cairo 1.8.0 is working fine here.
(this is what I did:
Code: |
git clone git://anongit.freedesktop.org/git/cairo
cd cairo
git revert 5d887ad5dca5af0f8216830d1b04d08a5aba9bee
git format-patch -k -m --stdout origin > cairo.patch
|
And than added "epatch cairo.patch" to the cairo-1.8.0.ebuild...) _________________ Myself and mine gymnastic ever |
|
Back to top |
|
|
mwhitlock Tux's lil' helper
Joined: 07 Aug 2006 Posts: 87 Location: New Hampshire, USA
|
Posted: Fri Oct 03, 2008 7:12 am Post subject: |
|
|
octoploid wrote: | Well, I just reverted the revert and cairo 1.8.0 is working fine here. |
Thanks for the instructions, octoploid.
If anyone else wants the patch without needing to emerge git, here it is: http://www.mattwhitlock.com/cairo-1.8.0-lcdfilter.patch
Also, you don't have to hack the cairo-1.8.0 ebuild. You can just manually do the patch after the unpack phase but before compilation:
Code: | 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 merge |
EDIT: Cairo 1.8.0 with this patch looks terrible. Do I need to do something with my ~/.fonts.conf?
EDIT #2: Apparently, "lcddefault" is not the default for the "lcdfilter" option. How counter-intuitive! It appears that "lcdlegacy" is the value used for the "lcdfilter" option if the option is absent. I added the following to my ~/.fonts.conf:
Code: | <match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match> | and now my cairo-1.8.0 looks identical to cairo-1.6.4-r1 with bi3l's patch. |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Fri Oct 03, 2008 11:43 am Post subject: |
|
|
mwhitlock wrote: | Apparently, "lcddefault" is not the default for the "lcdfilter" option. How counter-intuitive! |
Yep. Happily, Ubuntu does the sensible thing:
Quote: | * 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. |
Although I prefer adding a single line to /etc/X11/Xresources:
Code: | Xft.lcdfilter: lcddefault |
|
|
Back to top |
|
|
manwe_ l33t
Joined: 01 Feb 2006 Posts: 632 Location: Kraków/Cracow, Poland
|
|
Back to top |
|
|
bi3l Apprentice
Joined: 06 Feb 2003 Posts: 268 Location: France
|
Posted: Fri Oct 03, 2008 9:53 pm Post subject: |
|
|
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/gentoo-lcd-filtering.tar.bz2 |
|
Back to top |
|
|
solshark n00b
Joined: 24 Mar 2007 Posts: 17
|
Posted: Fri Oct 03, 2008 10:11 pm Post subject: |
|
|
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/gentoo-lcd-filtering.tar.bz2 |
Thx for your great job! _________________ my russian blog: http://solshark.i-seo.biz |
|
Back to top |
|
|
mwhitlock Tux's lil' helper
Joined: 07 Aug 2006 Posts: 87 Location: New Hampshire, USA
|
Posted: Fri Oct 03, 2008 11:42 pm Post subject: |
|
|
manwe_ 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? |
libXft at 12pt (101 dpi): http://img521.imageshack.us/my.php?image=libxftat12ptjm2.png
I personally think it looks better than both Windows and Mac.
My FreeType config is:
hinting=false
hintstyle=hintnone
antialias=true
rgba=rgb
lcdfilter=lcddefault |
|
Back to top |
|
|
manwe_ l33t
Joined: 01 Feb 2006 Posts: 632 Location: Kraków/Cracow, Poland
|
Posted: Sun Oct 05, 2008 4:38 pm Post subject: |
|
|
I've similiar config, and can't get look like this. The only difference is screen DPI [93x92]. Could DPI be a problem?
Code: | # 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@
|
Another thing is, cairo-1.8.0 from "lcd-filtering" looks worse [thinner] than 1.6.4-r1. Example: http://img353.imageshack.us/img353/6162/screenshot2008100518193yy5.png It might look like small differece, but with whole screen of code cairo-1.8.0 looks just awful. |
|
Back to top |
|
|
bi3l Apprentice
Joined: 06 Feb 2003 Posts: 268 Location: France
|
Posted: Sun Oct 05, 2008 4:44 pm Post subject: |
|
|
Can you reinstall fontconfig and see if your display is better ? |
|
Back to top |
|
|
manwe_ l33t
Joined: 01 Feb 2006 Posts: 632 Location: Kraków/Cracow, Poland
|
Posted: Sun Oct 05, 2008 8:18 pm Post subject: |
|
|
bi3l wrote: | reinstall fontconfig and see if your display is better ? |
It's not. I've upgraded to cairo-1.8.0, reemerged fontconfig-2.6.0-r2 and fonts are still thinner. I've tried even to reemerge freetype-2.3.7 and libXft-2.1.13 but it didn't help either. |
|
Back to top |
|
|
bi3l Apprentice
Joined: 06 Feb 2003 Posts: 268 Location: France
|
Posted: Sun Oct 05, 2008 8:35 pm Post subject: |
|
|
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). Here is my /etc/fonts/conf.d:
Code: | 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.conf |
|
|
Back to top |
|
|
manwe_ l33t
Joined: 01 Feb 2006 Posts: 632 Location: Kraków/Cracow, Poland
|
Posted: Sun Oct 05, 2008 9:57 pm Post subject: |
|
|
I did't but looks like emerge did. Because right now I have:
Code: | 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
|
|
|
Back to top |
|
|
nihues n00b
Joined: 20 May 2003 Posts: 47 Location: Balneário Camboriú / SC
|
Posted: Mon Oct 06, 2008 1:50 am Post subject: |
|
|
do you had enabled it?
Code: | eselect fontconfig enable 5 |
if 5 is the number before 11-lcd-filter-lcddefault.conf
then restart X |
|
Back to top |
|
|
acevery n00b
Joined: 03 Nov 2005 Posts: 53 Location: Amoy, China
|
Posted: Tue Oct 07, 2008 6:29 am Post subject: |
|
|
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/gentoo-lcd-filtering.tar.bz2 |
Great works!
Thanks |
|
Back to top |
|
|
swimmer Veteran
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Tue Oct 07, 2008 10:02 am Post subject: |
|
|
Time indeed to thank you bi3l - your efforts are very much appreciated!!!
Greetz
swimmer |
|
Back to top |
|
|
manwe_ l33t
Joined: 01 Feb 2006 Posts: 632 Location: Kraków/Cracow, Poland
|
Posted: Tue Oct 07, 2008 10:04 am Post subject: |
|
|
nihues wrote: | do you had enabled it?
Code: | eselect fontconfig enable 5 |
|
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 https://forums.gentoo.org/viewtopic-p-5238170.html#5238170 , and now looks like this https://forums.gentoo.org/viewtopic-p-5238520.html#5238520 . X was also restarted [or to be precise, tested on new session -- :1 ].
-- update:
Config <edit mode="assign" name="lcdfilter"> <const>lcddefault</const> </edit> accepts only lcdnone, lcddefault, lcdlight and lcdlegacy [any other value throws error], but fonts look doesn't change. Somehow Cairo sees this value, but ignores it. |
|
Back to top |
|
|
GoofyX Tux's lil' helper
Joined: 23 Feb 2005 Posts: 84 Location: Greece
|
Posted: Tue Oct 07, 2008 2:46 pm Post subject: |
|
|
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). |
Where do I find that file? _________________ ... Morpheus: What is "real"? How do you define "real"? If you 're talking about what you can feel, what you can smell, what you can taste and see, then "real" is simply electrical signals interpreted by your brain... |
|
Back to top |
|
|
bi3l Apprentice
Joined: 06 Feb 2003 Posts: 268 Location: France
|
Posted: Tue Oct 07, 2008 2:49 pm Post subject: |
|
|
In /etc/fonts/conf.d. It should be a link to /etc/fonts/conf.avail/11-lcd-filter-lcddefault.conf. |
|
Back to top |
|
|
GoofyX Tux's lil' helper
Joined: 23 Feb 2005 Posts: 84 Location: Greece
|
Posted: Tue Oct 07, 2008 2:53 pm Post subject: |
|
|
bi3l wrote: | In /etc/fonts/conf.d. It should be a link to /etc/fonts/conf.avail/11-lcd-filter-lcddefault.conf. |
OK, but I don't seem to have that file at all:
Code: | /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 |
_________________ ... Morpheus: What is "real"? How do you define "real"? If you 're talking about what you can feel, what you can smell, what you can taste and see, then "real" is simply electrical signals interpreted by your brain... |
|
Back to top |
|
|
|