Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

[HOWTO]New freetype subpixel font rendering for lcd monitors

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Locked
Advanced search
728 posts
  • Page 1 of 30
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 30
  • Next
Author
Message
boniek
Guru
Guru
User avatar
Posts: 373
Joined: Sat Mar 26, 2005 6:02 pm

[HOWTO]New freetype subpixel font rendering for lcd monitors

Post by boniek » Sat Oct 28, 2006 11:40 am

Disclaimer:
I cannot be held responsible if any of this blows your system up. All of this is provided with best intentions from my side. All credit goes to Freetype team - thanks guys!

Link:
http://wiki.gentoo-xeffects.org/Font_Rendering <--currently offline
Last edited by boniek on Sun Jan 13, 2008 8:45 pm, edited 44 times in total.
[HOWTO]New freetype subpixel font rendering for lcd monitors
Top
Fukai
Tux's lil' helper
Tux's lil' helper
Posts: 149
Joined: Wed Jul 05, 2006 4:09 am
Location: São Paulo, Brazil

Post by Fukai » Sat Oct 28, 2006 1:46 pm

Hi,
Can you post screenshot of the new spr (comparing it to the old)?

Thanks for the tip.
Top
boniek
Guru
Guru
User avatar
Posts: 373
Joined: Sat Mar 26, 2005 6:02 pm

Post by boniek » Sat Oct 28, 2006 3:12 pm

Sure thing. 85 dpi, subpixel aa, light hinting in both pictures:
old spr
new spr
85dpi, subpixel aa, full hinting:
new spr + bci - this rendering mode is superb

ct by ms windows (for comparision purposes, thanks to my friend marcin for providing me with this screenshot :D ):
ms cleartype

All this makes sense only on lcd monitors so don't bother on crt. To enable bci disable bindist use flag on freetype.
Last edited by boniek on Fri Nov 03, 2006 5:31 pm, edited 3 times in total.
[HOWTO]New freetype subpixel font rendering for lcd monitors
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

Post by PaulBredbury » Sun Oct 29, 2006 1:06 am

Thanks, now my fonts look even nicer :D

The nvidia drivers like to think that the DPI of my monitor is 95x96, which results in badly-formed fonts (some lines are too thin, some are too fat). I fix that by putting in xorg.conf, within Section "Monitor":

Code: Select all

Option "DPI"	"96 x 96"
Top
glowworm
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 85
Joined: Tue Jun 28, 2005 9:40 am

Post by glowworm » Sun Oct 29, 2006 5:35 am

Wow. Thanks alot for the overlay, the difference is phenomenal.
2.6.18-gentoo-r1 x86
Core2Duo E6300 on an Intel DG965WH M/B
NVidia 7600GT / AIGLX / KDE / Beryl CVS
Top
trinity
n00b
n00b
Posts: 74
Joined: Thu Mar 20, 2003 5:39 pm

Post by trinity » Sun Oct 29, 2006 4:18 pm

Yeah it's cool! Very nice!
I have another old pc with a Slackware distro and I'd like to apply this thing, but I really don't know how to do it. Can you give me some hints?
Thank!!
Top
boniek
Guru
Guru
User avatar
Posts: 373
Joined: Sat Mar 26, 2005 6:02 pm

Post by boniek » Sun Oct 29, 2006 8:25 pm

I'm sorry I'm gentoo zealot and I know nothing about slack :(
Installing from source the old way (./configure, make, make install) should be easy though. Just read ebuilds and things should be pretty clear as how to do it.
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

Post by PaulBredbury » Sun Oct 29, 2006 11:02 pm

trinity wrote:but I really don't know how to do it. Can you give me some hints?
Can U be any more vague as to what you've tried, how they worked, what situation you're at, and what you're capable of figuring out for yourself?
Top
boniek
Guru
Guru
User avatar
Posts: 373
Joined: Sat Mar 26, 2005 6:02 pm

Post by boniek » Mon Oct 30, 2006 12:31 am

My overlay is now a part of xeffects overlay.

Code: Select all

emerge -av layman && layman -ka xeffects
to get all files you need for this howto.
[HOWTO]New freetype subpixel font rendering for lcd monitors
Top
H3g3m0n
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 97
Joined: Sat Dec 14, 2002 11:46 am

Post by H3g3m0n » Fri Nov 03, 2006 12:20 pm

Just checking if this is correct, did i miss any steps, i can't see the actually guide I'm guessing the most of it was removed when it was merged into xeffects?

Code: Select all

layman -a xeffects
euse --enable newspr
echo "media-libs/freetype ~amd64" >> /etc/portage/packages.keywords
echo "media-libs/fontconfig ~amd64" >> /etc/portage/packages.keywords
echo "media-libs/freetype" >> /etc/portage/packages.unmask
emerge -va freetype fontconfig libXft cairo
Does anyone know the best options for the /etc/font.conf file? I'm just using the lcd example in http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts but that guide doesn't seem to reliable.
For starters it says to disable the bindist flag to enable the bytecode which seems wrong to me, I would change it but im not 100% sure (Although i did check the ebuild). Also my fonts have a yellow halo around them after following the guide (also green, purple and blue depending on the size) but i think thats the old sub pixel rendering screwing up (changing from RGB mode seemed to help) hopefully the new SPR will fix my problems.
Last edited by H3g3m0n on Fri Nov 03, 2006 12:28 pm, edited 1 time in total.
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

Post by PaulBredbury » Fri Nov 03, 2006 12:27 pm

H3g3m0n wrote:it says to disable the bindist flag to enable the bytecode which seems wrong to me
It is correct. No normal user would have "bindist" set anyway. Its purpose is to lessen the potential of being sued by SCO wannabees.

Code: Select all

grep bindist /usr/portage/profiles/use.*
/usr/portage/profiles/use.desc:bindist - Flag to enable or disable options for prebuilt (GRP)  packages (eg. due to licensing issues)
Top
boniek
Guru
Guru
User avatar
Posts: 373
Joined: Sat Mar 26, 2005 6:02 pm

Post by boniek » Fri Nov 03, 2006 4:44 pm

Yes wiki is right. I have corrected my ebuilds in overlay and updated howto above. Now to get bci you have to disable bindist. Sorry for the confusion.
Last edited by boniek on Fri Nov 03, 2006 5:35 pm, edited 3 times in total.
[HOWTO]New freetype subpixel font rendering for lcd monitors
Top
neuron
Advocate
Advocate
User avatar
Posts: 2371
Joined: Tue May 28, 2002 7:43 pm

Post by neuron » Fri Nov 03, 2006 5:11 pm

H3g3m0n wrote:Just checking if this is correct, did i miss any steps, i can't see the actually guide I'm guessing the most of it was removed when it was merged into xeffects?

Code: Select all

layman -a xeffects
euse --enable newspr
echo "media-libs/freetype ~amd64" >> /etc/portage/packages.keywords
echo "media-libs/fontconfig ~amd64" >> /etc/portage/packages.keywords
echo "media-libs/freetype" >> /etc/portage/packages.unmask
emerge -va freetype fontconfig libXft cairo
it's package.keywords and package.unmask, not packages ;)
PaulBredbury wrote:
H3g3m0n wrote:it says to disable the bindist flag to enable the bytecode which seems wrong to me
It is correct. No normal user would have "bindist" set anyway. Its purpose is to lessen the potential of being sued by SCO wannabees.

Code: Select all

grep bindist /usr/portage/profiles/use.*
/usr/portage/profiles/use.desc:bindist - Flag to enable or disable options for prebuilt (GRP)  packages (eg. due to licensing issues)
and the default is having it off, set bindist and let the patent trouble begin :). *I'm wrong here, if your reading this thread, ignore me :P*
Last edited by neuron on Fri Nov 03, 2006 5:43 pm, edited 1 time in total.
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

Post by PaulBredbury » Fri Nov 03, 2006 5:34 pm

Let's be clear on what bindist does, and whether it should be off or on :wink:

In /usr/portage/media-libs/freetype/freetype-2.2.1.ebuild

Code: Select all

# disable BCI when distributing binaries (patent issues)
use bindist || epatch "${FILESDIR}"/${PN}-2-enable_bci.patch
English translation: Enable BCI ("bytecode interpreter") if bindist is unset.

This means that BCI is disabled on the LiveCD (which contains pre-compiled binaries), because BCI has potential patent issues.

As the opposite, we as users have bindist unset, because we want BCI on because it's good stuff, so that we can compile it in ourselves.

Clarification: "unset" and "not set" mean exactly the same thing.
Last edited by PaulBredbury on Fri Nov 03, 2006 5:36 pm, edited 1 time in total.
Top
boniek
Guru
Guru
User avatar
Posts: 373
Joined: Sat Mar 26, 2005 6:02 pm

Post by boniek » Fri Nov 03, 2006 5:36 pm

PaulBredbury wrote:Let's be clear on what bindist does, and whether it should be off or on :wink:

In /usr/portage/media-libs/freetype/freetype-2.2.1.ebuild

Code: Select all

# disable BCI when distributing binaries (patent issues)
use bindist || epatch "${FILESDIR}"/${PN}-2-enable_bci.patch
English translation: Enable BCI if bindist is unset.

This means that BCI is disabled on the LiveCD (which contains pre-compiled binaries), because BCI has potential patent issues.

As the opposite, we as users have bindist unset, because we want BCI on because it's good stuff.

Clarification: "unset" and "not set" mean exactly the same thing.
Yup. He is right. This applies (starting today) to this overlay too 8)
[HOWTO]New freetype subpixel font rendering for lcd monitors
Top
neuron
Advocate
Advocate
User avatar
Posts: 2371
Joined: Tue May 28, 2002 7:43 pm

Post by neuron » Fri Nov 03, 2006 5:44 pm

PaulBredbury wrote:Let's be clear on what bindist does, and whether it should be off or on :wink:

In /usr/portage/media-libs/freetype/freetype-2.2.1.ebuild

Code: Select all

# disable BCI when distributing binaries (patent issues)
use bindist || epatch "${FILESDIR}"/${PN}-2-enable_bci.patch
English translation: Enable BCI ("bytecode interpreter") if bindist is unset.

This means that BCI is disabled on the LiveCD (which contains pre-compiled binaries), because BCI has potential patent issues.

As the opposite, we as users have bindist unset, because we want BCI on because it's good stuff, so that we can compile it in ourselves.

Clarification: "unset" and "not set" mean exactly the same thing.
Thanks for clearing that up, as license trouble = usually defaults to off ;)
Top
neuron
Advocate
Advocate
User avatar
Posts: 2371
Joined: Tue May 28, 2002 7:43 pm

Post by neuron » Fri Nov 03, 2006 5:54 pm

hm, when changing font config in gnome 2.16 I dont get a .fontconfig directory, nor does it create a ~/.fonts.conf like previus versions did. And I can see noticable differences when changing the options in gnome terminal, and other gnome apps, but not in x-chat and firefox.

Anyone know what the "correct" way of doing this is? I'm thinking of just making my own fonts.conf like I had before and removing the gnome settings, don't know where they are stored now though :/ (gconf maybe?)

// it's in /desktop/gnome/font_rendering
Top
Bloodsurfer
Guru
Guru
User avatar
Posts: 361
Joined: Wed Dec 07, 2005 1:33 pm
Location: Wolfstein, Germany (Rhineland-Palatinate)

Post by Bloodsurfer » Fri Nov 10, 2006 3:39 pm

Thanks for this howto, it's very nice and works like a charm.
I didn't know fonts can look this good :D
SiberianSniper: my girlfriend's name ends with .c
Clete2: Uber geek! W00t! I'd rather have it end in .cpp... <insert name>.cpp
Dralnu: ...why not <name>.o? Then she's ready for linking...
SiberianSniper: or <name>.ko, so she's ready for insertion?
Top
Crono81
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Tue Nov 07, 2006 9:18 pm

Post by Crono81 » Tue Nov 21, 2006 12:35 am

I think that this method creates a problem with the bold fonts. They appear TOO bold.

Just check the "WEB" link at the top of your Yahoo screenshots (compare with the Windows one), or check the "Web" word on the homepage of Google.
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

Post by PaulBredbury » Tue Nov 21, 2006 3:31 am

To fix bold fonts, add to ~/.fonts.conf e.g.:

Code: Select all

	<match target="font">
		<test name="weight" compare="more"><const>medium</const></test>
		<edit name="autohint" mode="assign"><bool>false</bool></edit>
		<edit name="hinting" mode="assign"><bool>false</bool></edit>
		<edit name="hintstyle" mode="assign"><const>hintnone</const></edit>
	</match>
Top
Crono81
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Tue Nov 07, 2006 9:18 pm

Post by Crono81 » Tue Nov 21, 2006 11:42 am

That helps out a bit but i don't think it's an antialias problem: if i totally remove antialias, hinting, ecc... i still see bold fonts too bold. I think it's a rendering or font (Tahoma) problem. Do you know a way to reduce the... bolding effect? Something like a match, test on the bold fonts, and make them not-so-bold instead of bold :lol:

The fact is that i can't remember how the fonts were before. Probably they were so ugly that i didn't notice it, but there must be a way to reduce the bolding effect.
Top
bssteph
l33t
l33t
User avatar
Posts: 653
Joined: Wed Feb 26, 2003 12:33 am
Location: Wisconsin
Contact:
Contact bssteph
Website

Post by bssteph » Wed Nov 22, 2006 9:08 am

I just wanted to pipe in and say that this is really snazzy. Thanks!
Top
nosebleed
n00b
n00b
Posts: 16
Joined: Tue Jan 13, 2004 6:04 pm

Post by nosebleed » Sat Nov 25, 2006 5:00 am

Gah, maybe I'm doing something wrong, but these fonts actually look WORSE than the ones I was using with freetype 2.2.1 and the patches I pulled off of bugs.gentoo.org...
Top
boniek
Guru
Guru
User avatar
Posts: 373
Joined: Sat Mar 26, 2005 6:02 pm

Post by boniek » Sat Nov 25, 2006 8:19 am

Screenshots? If your fonts don't look as good as in "after" screenshot then obviously you did something wrong :wink: . If they look exactly the same then use what YOU like best. I'm not saying my overlay will satisfy everyone - I did it because I liked the effect and tought some people might like it too. Patches from gentoo's bugzilla and mine are very likely to come from exactly the same source so I don't think this is the problem.
[HOWTO]New freetype subpixel font rendering for lcd monitors
Top
Crono81
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Tue Nov 07, 2006 9:18 pm

Post by Crono81 » Sat Nov 25, 2006 6:54 pm

no other ways to fix the bold fonts? They are not supposed to look that way, and it's not an antialias problem :\ In fact, if you disable AA they look even bolder :?
Top
Locked

728 posts
  • Page 1 of 30
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 30
  • Next

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy