Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO]New freetype subpixel font rendering for lcd monitors
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 28, 29, 30  Next  
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
elkhunter
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2004
Posts: 138

PostPosted: Tue Jan 01, 2008 6:00 pm    Post subject: Reply with quote

Thanks for the help mwhitlock. My fonts look much better now but they are still slightly fuzzy so I think I still have something not quite right. Here's what I have done so far:

layman -a xeffects
layman -a gentoo-china
add newspr and utils to USE flags in make.conf
emerge media-libs/freetype x11-libs/cairo x11-libs/libXft libXfont
replace my ~/.fonts.conf with your version listed above
removed /etc/fonts/local.conf (I still had really ugly fonts 'til I removed this)

I'm running fluxbox and the fonts look pretty good in most everything I've tried (kde apps, gnome apps, xterm -fa 'Bitstream Vera Sans 12' -fs 9, firefox, thunderbird, etc). However they are still a little blurry. I'm wondering if I have my fontconfig set incorrectly for my LCD monitor. Here's what I currently have:

Available fontconfig .conf files ( Desktop bin cpb dead.letter mythbackup other_root_files play_dvd_gxine play_dvd_mplayer tmp vmplayer is enabled ):
[1] 10-autohint.conf *
[2] 10-no-sub-pixel.conf
[3] 10-sub-pixel-bgr.conf
[4] 10-sub-pixel-rgb.conf *
[5] 10-sub-pixel-vbgr.conf
[6] 10-sub-pixel-vrgb.conf
[7] 10-unhinted.conf
[8] 20-fix-globaladvance.conf *
[9] 20-unhint-small-dejavu-experimental.conf
[10] 20-unhint-small-dejavu.conf
[11] 20-unhint-small-vera.conf *
[12] 25-unhint-nonlatin.conf
[13] 30-metric-aliases.conf *
[14] 30-urw-aliases.conf *
[15] 40-nonlatin.conf *
[16] 45-latin.conf *
[17] 49-sansserif.conf *
[18] 50-user.conf *
[19] 51-local.conf *
[20] 57-dejavu.conf
[21] 60-latin.conf *
[22] 60-liberation.conf
[23] 61-dejavu-experimental.conf
[24] 65-fonts-persian.conf *
[25] 65-nonlatin.conf *
[26] 69-unifont.conf *
[27] 70-no-bitmaps.conf
[28] 70-yes-bitmaps.conf
[29] 80-delicious.conf *
[30] 90-synthetic.conf *

Any help appreciated and thanks in advance.
Back to top
View user's profile Send private message
mwhitlock
Tux's lil' helper
Tux's lil' helper


Joined: 07 Aug 2006
Posts: 87
Location: New Hampshire, USA

PostPosted: Tue Jan 01, 2008 8:17 pm    Post subject: Reply with quote

bluesurfer wrote:
Why do you want kdelibs from xeffects? There's no need to if you just want to have better rendered fonts.

Since I have the xeffects overlay installed, several other ebuilds (including kdelibs) build from the overlay. Some KDE ebuilds from xeffects call functions defined in the xeffects kdelibs that are not defined in the trunk kdelibs. That means that I have to keep using the xeffects kdelibs, but sometimes it falls behind in version.

I would really prefer if there were some way to configure portage to only use an overlay for certain packages. I really only care to have cairo and libXft built from the overlay ebuilds without all the rest of the xeffects KDE stuff.
Back to top
View user's profile Send private message
mwhitlock
Tux's lil' helper
Tux's lil' helper


Joined: 07 Aug 2006
Posts: 87
Location: New Hampshire, USA

PostPosted: Tue Jan 01, 2008 8:29 pm    Post subject: Reply with quote

elkhunter, do your fonts look like those in my screen shot, or are they blurrier?

I haven't toggled any of the fontconfig files from their defaults, except that I have enabled substitution of dejavu fonts (57-dejavu.conf). In other words, this is what I have enabled:
Code:
Available fontconfig .conf files ( * is enabled ):
  [1]   10-autohint.conf
  [2]   10-no-sub-pixel.conf
  [3]   10-sub-pixel-bgr.conf
  [4]   10-sub-pixel-rgb.conf *
  [5]   10-sub-pixel-vbgr.conf
  [6]   10-sub-pixel-vrgb.conf
  [7]   10-unhinted.conf
  [8]   20-fix-globaladvance.conf *
  [9]   20-unhint-small-dejavu.conf
  [10]  20-unhint-small-dejavu-experimental.conf
  [11]  20-unhint-small-vera.conf *
  [12]  25-unhint-nonlatin.conf
  [13]  30-metric-aliases.conf *
  [14]  30-urw-aliases.conf *
  [15]  40-nonlatin.conf *
  [16]  45-latin.conf *
  [17]  49-sansserif.conf *
  [18]  50-user.conf *
  [19]  51-local.conf *
  [20]  57-dejavu.conf *
  [21]  60-latin.conf *
  [22]  61-dejavu-experimental.conf
  [23]  65-fonts-persian.conf *
  [24]  65-nonlatin.conf *
  [25]  69-unifont.conf *
  [26]  70-no-bitmaps.conf
  [27]  70-yes-bitmaps.conf
  [28]  80-delicious.conf *
  [29]  90-synthetic.conf *

By the way, I ran 'layman -a gentoo-china', and it worked just fine. I don't know why gentoo-china is not listed in 'layman -L'.
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Tue Jan 01, 2008 8:33 pm    Post subject: Reply with quote

mwhitlock wrote:
bluesurfer wrote:
Why do you want kdelibs from xeffects? There's no need to if you just want to have better rendered fonts.

Since I have the xeffects overlay installed, several other ebuilds (including kdelibs) build from the overlay. Some KDE ebuilds from xeffects call functions defined in the xeffects kdelibs that are not defined in the trunk kdelibs. That means that I have to keep using the xeffects kdelibs, but sometimes it falls behind in version.

I would really prefer if there were some way to configure portage to only use an overlay for certain packages. I really only care to have cairo and libXft built from the overlay ebuilds without all the rest of the xeffects KDE stuff.

When I used the overlay, after updating it, I would go into the overlay directories and remove all of the ones I didn't want. I just left the cairo and libXft directories.
Back to top
View user's profile Send private message
mwhitlock
Tux's lil' helper
Tux's lil' helper


Joined: 07 Aug 2006
Posts: 87
Location: New Hampshire, USA

PostPosted: Tue Jan 01, 2008 8:45 pm    Post subject: Reply with quote

yabbadabbadont wrote:
When I used the overlay, after updating it, I would go into the overlay directories and remove all of the ones I didn't want. I just left the cairo and libXft directories.

I know that would work, but all the stuff I deleted would show up again the next time I updated my copy of the overlay. I wonder... what happens if I do 'svn rm' instead of just plain 'rm'. Maybe if the directories in my working copy are marked for deletion, they won't reappear when I update.
Back to top
View user's profile Send private message
elkhunter
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2004
Posts: 138

PostPosted: Wed Jan 02, 2008 4:03 am    Post subject: Reply with quote

Thanks mwhitlock. I removed 10-autohint.conf to match yours, then removed the DPI and UseEdidDpi entries from my xorg.conf and rebooted and things look better. (I had added the latter two based on the info at http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts). Not sure which change fixed the blurry issue but it's much better (although I still dont think its quite as sharp as when I boot into windows).

A few more quick questions: do you have anything in /etc/fonts/local.conf and what display manager do you use? I'm using kdm but the fonts there still look horrible. Also is there a fix to clean up the fonts in open office -- they still look terrible?

Thanks again.
Back to top
View user's profile Send private message
mwhitlock
Tux's lil' helper
Tux's lil' helper


Joined: 07 Aug 2006
Posts: 87
Location: New Hampshire, USA

PostPosted: Wed Jan 02, 2008 5:34 am    Post subject: Reply with quote

elkhunter wrote:
Thanks mwhitlock. I removed 10-autohint.conf to match yours, then removed the DPI and UseEdidDpi entries from my xorg.conf and rebooted and things look better. (I had added the latter two based on the info at http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts). Not sure which change fixed the blurry issue but it's much better (although I still dont think its quite as sharp as when I boot into windows).

A few more quick questions: do you have anything in /etc/fonts/local.conf and what display manager do you use? I'm using kdm but the fonts there still look horrible. Also is there a fix to clean up the fonts in open office -- they still look terrible?

Thanks again.

I let X detect and use the physical DPI of my monitor. (It detects 101x101 dpi for my Dell 30".) Letting X use your physical DPI means that fonts will display at their correct physical sizes. For example, a 72-point font when rendered on my computer and displayed on my monitor is exactly 1 inch tall because I let X use my hardware DPI instead of overriding it with some other number.

If you want fonts to be as sharp as they are on Windows, you'll have to turn on hinting. I have hinting disabled because I prefer glyphs to have accurate shapes at the expense of sharpness. If you prefer stems to be nailed to the pixel grid, you should enable hinting, preferably using the byte-code interpreter (BCI), which executes the hints encoded in the font files. I find that even with the newspr patches, hinted fonts still don't look as good as they do with ClearType on Windows. My unhinted fonts look approximately like fonts look on Mac OS X, which also prefers glyph accuracy over sharpness.

I use kdm, too, and yeah, the fonts look terrible on the login screen. Fortunately, I only have to look at that for a few seconds when booting up my computer, and I only do that maybe once a month. Probably I could get those fonts to look good by flipping some of the fontconfig files using 'eselect fontconfig' (or just adjusting the symlinks in /etc/fonts/conf.d/ manually). I haven't care to do that because, as I said, I only have to look at that screen momentarily.

I don't use OpenOffice, so I don't know how to help you there.
Back to top
View user's profile Send private message
MM23
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2006
Posts: 83

PostPosted: Sat Jan 05, 2008 7:11 am    Post subject: Reply with quote

Is there any way to do this now that xeffects is dead?

I can't stand the default freetype/Xft rendering...
Back to top
View user's profile Send private message
natros
n00b
n00b


Joined: 26 Sep 2003
Posts: 70

PostPosted: Sat Jan 05, 2008 10:18 am    Post subject: Reply with quote

too bad xeffects is dead, gentoo is dead, i'm moving to ubuntu :(
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5934

PostPosted: Sat Jan 05, 2008 10:35 am    Post subject: Reply with quote

natros wrote:
gentoo is dead


(OT) people have been saying that for years. :wink:
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
natros
n00b
n00b


Joined: 26 Sep 2003
Posts: 70

PostPosted: Sat Jan 05, 2008 12:39 pm    Post subject: Reply with quote

<OT>maybe is not dead but i have seen better days</OT>

xeffects is down, http://wiki.gentoo-xeffects.org/ is down, where can i get the ebuilds?
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Sat Jan 05, 2008 2:38 pm    Post subject: Reply with quote

For the cairo+libXft ebuilds you can go there: http://arcong.ath.cx/index.php?option=com_content&task=view&id=16&Itemid=30

HTH
swimmer
Back to top
View user's profile Send private message
billydv
l33t
l33t


Joined: 22 Dec 2006
Posts: 911
Location: Mount Vernon, NY

PostPosted: Sat Jan 05, 2008 2:46 pm    Post subject: Reply with quote

Boniek, since you were maintaining the cairo and libxft packages in xeffects, maybe you should setup an overlay with just those two packages so that all of us using you font rendering methods can simply use your overlay. How hard can it be to maintain an overlay with 2 packages? Unfortunately I don't know whats involved in setting up an overlay.
_________________
Billy DeVincentis
Back to top
View user's profile Send private message
GoofyX
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2005
Posts: 84
Location: Greece

PostPosted: Sun Jan 06, 2008 7:43 pm    Post subject: Reply with quote

billydv wrote:
Boniek, since you were maintaining the cairo and libxft packages in xeffects, maybe you should setup an overlay...

Yes, but before that, I would first like Boniek to tell us if he still maintains the overlay and/or is willing to spend time on maintaining it. There have been a lot of posts here that make me wonder (and I'm sure I'm not the only one) if Boniek is still "alive" (in the sense that he maintains xeffects).

It's a shame these patches don't get in the core...
_________________
... 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
View user's profile Send private message
billydv
l33t
l33t


Joined: 22 Dec 2006
Posts: 911
Location: Mount Vernon, NY

PostPosted: Mon Jan 07, 2008 12:20 am    Post subject: Reply with quote

GoofyX, Boniek was not maintaining xeffects, he simply made some additions with regards to the cairo and libxft ebuilds. He is definitely around as he answered a post of mine just a couple of weeks ago. He also recently updated a cairo ebuild which is posted on the previous page I believe.
_________________
Billy DeVincentis
Back to top
View user's profile Send private message
Emopig
Apprentice
Apprentice


Joined: 15 Mar 2006
Posts: 188

PostPosted: Mon Jan 07, 2008 8:04 pm    Post subject: Reply with quote

Forget about overlays, if you want these patches install "portage-bashrc-ng" from
gechi's overlay and then use the autopatch module to apply whatever patches you want.

Code:
andrew@ziggy ~ $ ls -lhR /usr/portage/local/patches/x11-libs/
/usr/portage/local/patches/x11-libs/:
total 8.0K
drwxr-xr-x 2 root root 4.0K 2007-12-10 11:56 cairo
drwxr-xr-x 2 root root 4.0K 2007-12-10 11:56 libXft

/usr/portage/local/patches/x11-libs/cairo:
total 28K
-rw-r--r-- 1 root root 22K 2007-12-10 11:48 cairo-1.4.12-lcd-filter-1.patch

/usr/portage/local/patches/x11-libs/libXft:
total 28K
-rw-r--r-- 1 root root 22K 2007-12-10 11:55 libXft-2.1.12-lcd-filter.patch


Code:
andrew@ziggy ~ $ eselect bashrc-ng list
Available bashrc modules:
  [1]   autopatch on
  [2]   distclean off
  [3]   localepurge off
  [4]   oldtmpfs off
  [5]   perpackage off
  [6]   resumemerge off
  [7]   tmpfs off


Then I just use Cairo and libXft from the portage tree. The above patch files are just from PLD Linux's repo's:
Code:
http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/cairo-1.2.4-lcd-filter-1.patch
http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/xorg-lib-libXft-lcd-filter.patch


I do wish Ubuntu's patches were split out, not rolled into one uber diff patch...
_________________
2.6.35 / Gnome 2.30
Athlon64 3500+ / 1.5 GB / Asus A8N VM CSM
Back to top
View user's profile Send private message
Emopig
Apprentice
Apprentice


Joined: 15 Mar 2006
Posts: 188

PostPosted: Mon Jan 07, 2008 8:29 pm    Post subject: Reply with quote

Since some people seem interested in what Ubuntu are doing in this regard...

The latest change log to Cairo on Ubuntu's packages says:

Code:
+  * Replace Ubuntu's lcd patch by patch from Freedesktop bug #10301
+    - drop debian/patches/02-cairo-1.4.8-lcd-filter-2.dpatch
+    - add debian/patches/02-lcd_filter_freedesktop_bug10301.patch


Cairo patch: http://bugs.freedesktop.org/show_bug.cgi?id=10301
Fontconfig patch: http://bugs.freedesktop.org/show_bug.cgi?id=13566

The patch Ubuntu is using for libXft seems to be a version of David Turners patch
"with additional modification that the specific LCD Filter can be changed."

For convenience I've extracted this from the libxft2 (2.1.12-2ubuntu4) package
that is queued for the release of Hardy Heron. Here:

http://pastebin.ca/raw/845690

To summarise:

If you want Ubuntu gutsy/hardy font rendering you need to patch libXft, Cairo
and Fontconfig (a small patch). You do not need to patch Freetype.
_________________
2.6.35 / Gnome 2.30
Athlon64 3500+ / 1.5 GB / Asus A8N VM CSM
Back to top
View user's profile Send private message
Emopig
Apprentice
Apprentice


Joined: 15 Mar 2006
Posts: 188

PostPosted: Mon Jan 07, 2008 8:38 pm    Post subject: Reply with quote

PLD vs Ubuntu's libXft patch

Just so everyone knows Ubuntu's libXft2 patch is only slightly different to the PLD Linux patches in that it adds more fontconfig options. As far as I can tell tell, there are no differences to the algorithms!
_________________
2.6.35 / Gnome 2.30
Athlon64 3500+ / 1.5 GB / Asus A8N VM CSM
Back to top
View user's profile Send private message
Emopig
Apprentice
Apprentice


Joined: 15 Mar 2006
Posts: 188

PostPosted: Mon Jan 07, 2008 8:50 pm    Post subject: Reply with quote

Ok, time to see what kind of chaos I can cause...

Code:
ziggy libXft # echo ">=x11-libs/cairo-1.5.2" >>/etc/portage/package.unmask
ziggy libXft # emerge -avt --oneshot libXft cairo fontconfig

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild     U ] x11-libs/cairo-1.5.4-r1 [1.4.12] USE="X glitz opengl svg xcb -debug -directfb -doc -test%" 3,207 kB
[ebuild   R   ]  x11-libs/libXft-2.1.12  USE="-debug" 255 kB
[ebuild   R   ]   media-libs/fontconfig-2.5.0-r1  USE="xml -doc" 1,353 kB

Total: 3 packages (1 upgrade, 2 reinstalls), Size of downloads: 4,814 kB

_________________
2.6.35 / Gnome 2.30
Athlon64 3500+ / 1.5 GB / Asus A8N VM CSM
Back to top
View user's profile Send private message
Emopig
Apprentice
Apprentice


Joined: 15 Mar 2006
Posts: 188

PostPosted: Mon Jan 07, 2008 9:12 pm    Post subject: Reply with quote

All seems well for now. Good luck people!
_________________
2.6.35 / Gnome 2.30
Athlon64 3500+ / 1.5 GB / Asus A8N VM CSM
Back to top
View user's profile Send private message
bosele
Tux's lil' helper
Tux's lil' helper


Joined: 02 Apr 2005
Posts: 90

PostPosted: Thu Jan 10, 2008 7:48 pm    Post subject: Reply with quote

would you please make the patched files available somewhere, i just can't get it to work.
prettyplease?
Back to top
View user's profile Send private message
boniek
Guru
Guru


Joined: 26 Mar 2005
Posts: 373

PostPosted: Fri Jan 11, 2008 3:46 am    Post subject: Reply with quote

I'm visiting this thread from time to time so you could say I'm alive :) I will try to make simple overlay with font related ebuilds over this weekend so stay tuned .
_________________
[HOWTO]New freetype subpixel font rendering for lcd monitors
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Fri Jan 11, 2008 5:29 am    Post subject: Reply with quote

boniek wrote:
I'm visiting this thread from time to time so you could say I'm alive :) I will try to make simple overlay with font related ebuilds over this weekend so stay tuned .

That would be much appreciated.
Back to top
View user's profile Send private message
bosele
Tux's lil' helper
Tux's lil' helper


Joined: 02 Apr 2005
Posts: 90

PostPosted: Fri Jan 11, 2008 11:37 am    Post subject: Reply with quote

thanks, that would be great
Back to top
View user's profile Send private message
billydv
l33t
l33t


Joined: 22 Dec 2006
Posts: 911
Location: Mount Vernon, NY

PostPosted: Fri Jan 11, 2008 10:51 pm    Post subject: Reply with quote

Yeah Boniek!!!! Thats the spirit!!!!
_________________
Billy DeVincentis
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 28, 29, 30  Next
Page 14 of 30

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum