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 ... 18, 19, 20 ... 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
creidiki
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 283
Location: Varese (Italy)

PostPosted: Sun Apr 13, 2008 6:12 pm    Post subject: Reply with quote

You have lzma-utils, so use it. :P

http://jyujin.de/~creidiki/fontlibs-ubuntu.tar.bz2

Updated, and now in crappy bzip2 format. :lol:
_________________
'((eINIT) (soor overlay))
Back to top
View user's profile Send private message
creidiki
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 283
Location: Varese (Italy)

PostPosted: Mon Apr 14, 2008 1:22 am    Post subject: Reply with quote

Moved them to git cause I'm lazy:

sync: git://git.jyujin.de/creidiki/fonts.git

browse: http://git.jyujin.de/?p=creidiki/fonts.git;a=summary
_________________
'((eINIT) (soor overlay))


Last edited by creidiki on Fri Apr 18, 2008 8:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
ExZombie
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 163

PostPosted: Mon Apr 14, 2008 5:34 am    Post subject: Reply with quote

creidiki: Man, thank you! I thought lzma only exists in 7zip. This is far more useful :)
Back to top
View user's profile Send private message
creidiki
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 283
Location: Varese (Italy)

PostPosted: Mon Apr 14, 2008 6:55 am    Post subject: Reply with quote

Lots of gentoo packages use the .lzma tarballs so you have the progs already, but since tar 1.20 (out soon) will have LZMA support vapier hasn't bothered backporting it to 1.19 :)
_________________
'((eINIT) (soor overlay))
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: Mon Apr 14, 2008 9:39 am    Post subject: Reply with quote

well, i've tried the ubuntu ebuilds in the tarball, but i must say the results are not great. My fonts look kinda blurry and at times it has "stray" pixels. could you share your fontconfig? i would like to get some result before i downgrade the whole thing.
thanks in advance.
Back to top
View user's profile Send private message
creidiki
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 283
Location: Varese (Italy)

PostPosted: Mon Apr 14, 2008 10:04 am    Post subject: Reply with quote

Unfortunately the ubuntu patches for libXft need someone who understands autohell for tackling them. From a cursory look they appear to be a mix of debain/ubuntu specifc and generic changes.

So it could very well be that.

Code:
holy_fire ~ # eselect fontconfig list
Available fontconfig .conf files ( * is enabled ):
  [1]   10-antialias.conf *
  [2]   10-autohint.conf
  [3]   10-hinting.conf *
  [4]   10-hinting-full.conf *
  [5]   10-hinting-medium.conf *
  [6]   10-hinting-slight.conf
  [7]   10-no-sub-pixel.conf *
  [8]   10-sub-pixel-bgr.conf
  [9]   10-sub-pixel-rgb.conf *
  [10]  10-sub-pixel-vbgr.conf
  [11]  10-sub-pixel-vrgb.conf
  [12]  10-unhinted.conf
  [13]  20-fix-globaladvance.conf *
  [14]  20-lohit-gujarati.conf
  [15]  20-unhint-small-dejavu.conf
  [16]  20-unhint-small-dejavu-experimental.conf
  [17]  20-unhint-small-vera.conf *
  [18]  25-unhint-nonlatin.conf
  [19]  30-amt-aliases.conf *
  [20]  30-metric-aliases.conf *
  [21]  30-urw-aliases.conf *
  [22]  40-generic.conf *
  [23]  40-nonlatin.conf *
  [24]  45-latin.conf *
  [25]  49-sansserif.conf *
  [26]  50-user.conf *
  [27]  51-local.conf *
  [28]  53-monospace-lcd-filter.conf *
  [29]  57-dejavu.conf *
  [30]  59-dejavu.conf *
  [31]  60-latin.conf *
  [32]  61-dejavu-experimental.conf *
  [33]  65-fonts-persian.conf *
  [34]  65-nonlatin.conf *
  [35]  69-unifont.conf *
  [36]  70-no-bitmaps.conf
  [37]  70-yes-bitmaps.conf *
  [38]  80-delicious.conf *
  [39]  90-synthetic.conf *

Code:
holy_fire ~ # cat /etc/fonts/local.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <edit mode="assign" name="lcdfilter">
    <const>lcdfilterdefault</const>
  </edit>
</fontconfig>


Certainly some experimenting with hintstyle and lcdfilter settings will be necessary to find out how good it all is. I'm still playing around with it myself.
_________________
'((eINIT) (soor overlay))
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Apr 14, 2008 10:15 am    Post subject: Reply with quote

If you have blurry fonts, then first curse your crappy monitor, then put in ~/.Xresources
Code:
Xft.lcdfilter:  lcdlegacy
Xft.hintstyle:  hintfull

This is needed because cairo cannot read fontconfig's settings, apparently. The choices are: lcdnone, lcddefault, lcdlight, lcdlegacy

Then run:
Code:
xrdb -merge ~/.Xresources

And xrdb -query will optionally show that the values are set.

Also, put in ~/.fonts.conf
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

   <!-- Info:
   xeffects thread:  http://forums.gentoo.org/viewtopic-t-511382.html
   http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts
   http://wiki.archlinux.org/index.php/XOrg_Font_Configuration
   http://antigrain.com/research/font_rasterization/index.html
   -->

   <!-- Blurry fonts:  Try rgb, bgr, vrgb, vbgr for "rgba" -->
   <match target="font">
      <edit name="rgba" mode="assign"><const>rgb</const></edit>
      <edit name="autohint" mode="assign"><bool>false</bool></edit>
      <edit name="antialias" mode="assign"><bool>true</bool></edit>
      <edit name="hinting" mode="assign"><bool>true</bool></edit>
      <edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
   </match>

   <!-- Greyscale for small fonts -->
   <match target="font">
      <test name="size" compare="less_eq"><double>7</double></test>
      <edit name="rgba"><const>none</const></edit>
   </match>

</fontconfig>

Play with the "rgba" setting where the "Blurry fonts" comment is. Then close and re-open firefox, to see the change.

Edit: Removed comment lines from ~/.Xresources, because Gentoo's xrdb gets indigestion :?

Edit: Removed "filter" from Xft.lcdfilter, to match upstream's changes.


Last edited by PaulBredbury on Wed Aug 06, 2008 3:05 pm; edited 3 times in total
Back to top
View user's profile Send private message
confusion
Tux's lil' helper
Tux's lil' helper


Joined: 24 Mar 2004
Posts: 132

PostPosted: Mon Apr 14, 2008 5:19 pm    Post subject: Reply with quote

The guide is currently offline. Is there an alternative?

John
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Apr 14, 2008 5:34 pm    Post subject: Reply with quote

Use Google and click on "Cached".
Back to top
View user's profile Send private message
Jupiter1TX
Guru
Guru


Joined: 24 Feb 2006
Posts: 546
Location: 3rd Rock

PostPosted: Mon Apr 14, 2008 7:46 pm    Post subject: Reply with quote

Hey guys in case you didn't know app-arch/lzma-utils is in portage
and a simple 'lzma --help' shows to use 'lzma -d filename'. It worked
perfectly fine.

Am currently using the simple local.font as shown above and my fonts
never looked better.
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <edit mode="assign" name="lcdfilter">
    <const>lcdfilterdefault</const>
  </edit>
</fontconfig>

This screenshot doesn't do it justice but ok example.
http://img394.imageshack.us/my.php?image=fonts3cq6.jpg
_________________
Core i7 920 D0 | Asus P6T DLX | Patriot Viper 1600 6GB | Antec Quattro 850W
Geforce 8800GTX OC2 768MB | Dell 22" LCD | Koolance Exos2/Swiftech GTZ
GCC 4.6.1 | 3.7.x-geek | Xorg-7.4-x | KDE-4.7.x | Compiz
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Apr 14, 2008 7:59 pm    Post subject: Reply with quote

The place to set lcdfilter is in ~/.Xresources, rather than /wherever/fonts.conf

lcdfilterdefault is the default anyway :wink:
Back to top
View user's profile Send private message
creidiki
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 283
Location: Varese (Italy)

PostPosted: Mon Apr 14, 2008 8:26 pm    Post subject: Reply with quote

Jupiter1TX wrote:
Hey guys in case you didn't know app-arch/lzma-utils is in portage
and a simple 'lzma --help' shows to use 'lzma -d filename'. It worked
perfectly fine.

Tar 1.20 is now in portage, with upstream lzma support :D
_________________
'((eINIT) (soor overlay))
Back to top
View user's profile Send private message
billydv
l33t
l33t


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

PostPosted: Tue Apr 15, 2008 2:41 am    Post subject: Reply with quote

Paul, here is what I get

Windows2 billydv # xrdb -merge /home/billydv/.Xresources
/home/billydv/.Xresources:2:46: warning: missing terminating ' character
Windows2 billydv #


Is that right?
_________________
Billy DeVincentis
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Apr 15, 2008 10:35 am    Post subject: Reply with quote

Quote:
missing terminating ' character

No, that is not right. Dunno how you managed that :?
Back to top
View user's profile Send private message
billydv
l33t
l33t


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

PostPosted: Tue Apr 15, 2008 11:30 am    Post subject: Reply with quote

Sorry, tried it again, definitely no mistakes copying, don't know whats wrong.
_________________
Billy DeVincentis
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: Tue Apr 15, 2008 7:00 pm    Post subject: Reply with quote

same here on the issing terminating ' character
Back to top
View user's profile Send private message
Jupiter1TX
Guru
Guru


Joined: 24 Feb 2006
Posts: 546
Location: 3rd Rock

PostPosted: Tue Apr 15, 2008 8:36 pm    Post subject: Reply with quote

Hey guys i ran into the same thing and this is what fixed it.
Rather then cut and pasting the whole thing.
Code:

! From http://johan.kiviniemi.name/blag/2008/01/12/ubuntu-hardy-fonts/
! Needed because cairo cannot read fontconfig's settings, apparently.

! xrdb -query
! xrdb -merge ~/.Xresources

! Choices:  lcdfilternone, lcdfilterdefault, lcdfilterlight, lcdfilterlegacy
Xft.lcdfilter:  lcdfilterlegacy
Xft.hintstyle:  hintfull


Just put.
Code:
Xft.lcdfilter:  lcdfilterlegacy
Xft.hintstyle:  hintfull

_________________
Core i7 920 D0 | Asus P6T DLX | Patriot Viper 1600 6GB | Antec Quattro 850W
Geforce 8800GTX OC2 768MB | Dell 22" LCD | Koolance Exos2/Swiftech GTZ
GCC 4.6.1 | 3.7.x-geek | Xorg-7.4-x | KDE-4.7.x | Compiz
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Apr 16, 2008 4:05 pm    Post subject: Reply with quote

OK, fixed. I've also removed "lcdfilter" from ~/.fonts.conf, because Wine says:
Quote:
Fontconfig warning: "~/.fonts.conf", line 75: invalid constant used : lcdfilterdefault
Back to top
View user's profile Send private message
zach9824
n00b
n00b


Joined: 12 Apr 2004
Posts: 37

PostPosted: Wed Apr 16, 2008 6:33 pm    Post subject: Reply with quote

Thanks to everyone who has worked so hard on getting awesome font rendering on Gentoo. The latest Ubuntu patches seem to really sharpen up my display and I get nice clean albeit thinner fonts. I like the fonts a bit thinner on my LCD. On another display they are a bit bolder and I need to play with the settings when I find time. Overall I am really pleased.

In following the steps listed above and to add to what PaulBredbury has provided I noticed that xrdb -query did not have the Xft.rgba: <value> set properly:

Code:

Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintfull
Xft.lcdfilter:   lcdfilterlegacy
Xft.rgba:       none


So I additionally added the Xft.rgba <value> to the ~/.Xresources file (where value should match your ~/.fonts.conf setting):

Code:

Xft.lcdfilter:   lcdfilterlegacy
Xft.hintstyle:  hintfull
Xft.rgba:       rgb



EDIT: OK. Once you reboot the setting defaults back to none! It does not seem to hurt anything and I guess the value is overridden somewhere. Either way the fonts look very good when using lcdfilterlegacy setting.

Thanks.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Apr 16, 2008 6:58 pm    Post subject: Reply with quote

zach9824, are you starting xorg via startx, or via gdm/xdm? Because /etc/X11/xinit/xinitrc should load ~/.Xresources:
Code:
userresources=$HOME/.Xresources
...
if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

In Arch Linux, /etc/X11/xinit/xinitrc is owned by xorg-xinit 1.0.7-3

Then take a look at /usr/bin/startx and how $HOME/.xinitrc will be used in preference to /etc/X11/xinit/xinitrc if it exists.

xorg was obviously designed to confuse us :evil:
Back to top
View user's profile Send private message
zach9824
n00b
n00b


Joined: 12 Apr 2004
Posts: 37

PostPosted: Wed Apr 16, 2008 8:04 pm    Post subject: Reply with quote

I should first clarify that the only value that appears to be not sticking is the Xft.rgba.

My WM is KDE-3.5.9 started via xdm on boot using the new baselayout-2 which just entered ~arch. I checked those files and everything looks as you suggested it should. I guess there is not a problem with xrdb -merge $userresources in that it actually does set the other values.

It does appear however that the rgba value does not appear to be reading the Xresources unless I manually run xrdb -merge ~/.Xresources after I am already up and running within KDE.

Again I don't even know if it makes a difference as changing rgba settings in my local fonts.conf appears to work when I actually change my LCD/font rendering to say "bgr" as opposed to "rgb" I see the difference upon restarting X...

PS. I tried killing the X session stopping xdm and just staring X via startx on my user account. The same result. (my ~/.xinitrc has exec startkde).

Wow - That is confusing! :)

thanks.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Apr 16, 2008 8:20 pm    Post subject: Reply with quote

With xdm, there's no need for ~/.xinitrc AFAICT.

But if you are going to keep ~/.xinitrc, then I would suggest sticking in ~/.xprofile or whatever file runs at "user xorg window-manager startup" in this crazy Xorg world:
Code:
/usr/bin/xrdb -merge ~/.Xresources

For me, Xft.rgba seems to be automagically set to rgb, perhaps due to /etc/fonts/conf.d/ or ~/.fonts.conf
Back to top
View user's profile Send private message
billydv
l33t
l33t


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

PostPosted: Thu Apr 17, 2008 2:26 am    Post subject: Reply with quote

I just wanted to ask something here, although I am using these ebuilds, I do not have and lcd monitor, I have an IBM thinkvision 19" crt monitor. What if anyhting should I be doing different?
_________________
Billy DeVincentis
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Thu Apr 17, 2008 2:53 am    Post subject: Reply with quote

Sub-pixel rendering only benefits LCD monitors, not CRT. However, you might benefit from Ubuntu's colored/greyscale pixel rendering. Just experiment with the options.
Back to top
View user's profile Send private message
natros
n00b
n00b


Joined: 26 Sep 2003
Posts: 70

PostPosted: Thu Apr 17, 2008 9:09 am    Post subject: Reply with quote

what's the difference between .Xresources and .fonts.conf? isn't changing .fonts.conf enough?
_________________
-=[abit ip35 pro core2quad q6600 (oc 3.0 ghz) 8 gb ram 2x320 raid0 ext4 xfx8800gt 512mb]=-
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 ... 18, 19, 20 ... 28, 29, 30  Next
Page 19 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