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 1, 2, 3 ... 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
boniek
Guru
Guru


Joined: 26 Mar 2005
Posts: 373

PostPosted: Sat Oct 28, 2006 11:40 am    Post subject: [HOWTO]New freetype subpixel font rendering for lcd monitors Reply with quote

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
_________________
[HOWTO]New freetype subpixel font rendering for lcd monitors


Last edited by boniek on Sun Jan 13, 2008 8:45 pm; edited 44 times in total
Back to top
View user's profile Send private message
Fukai
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jul 2006
Posts: 149
Location: São Paulo, Brazil

PostPosted: Sat Oct 28, 2006 1:46 pm    Post subject: Reply with quote

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

Thanks for the tip.
Back to top
View user's profile Send private message
boniek
Guru
Guru


Joined: 26 Mar 2005
Posts: 373

PostPosted: Sat Oct 28, 2006 3:12 pm    Post subject: Reply with quote

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.
_________________
[HOWTO]New freetype subpixel font rendering for lcd monitors


Last edited by boniek on Fri Nov 03, 2006 5:31 pm; edited 3 times in total
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Oct 29, 2006 1:06 am    Post subject: Reply with quote

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:
Option "DPI"   "96 x 96"
Back to top
View user's profile Send private message
glowworm
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2005
Posts: 85

PostPosted: Sun Oct 29, 2006 5:35 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
trinity
n00b
n00b


Joined: 20 Mar 2003
Posts: 74

PostPosted: Sun Oct 29, 2006 4:18 pm    Post subject: Reply with quote

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!!
Back to top
View user's profile Send private message
boniek
Guru
Guru


Joined: 26 Mar 2005
Posts: 373

PostPosted: Sun Oct 29, 2006 8:25 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Oct 29, 2006 11:02 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
boniek
Guru
Guru


Joined: 26 Mar 2005
Posts: 373

PostPosted: Mon Oct 30, 2006 12:31 am    Post subject: Reply with quote

My overlay is now a part of xeffects overlay.
Code:
emerge -av layman && layman -ka xeffects

to get all files you need for this howto.
_________________
[HOWTO]New freetype subpixel font rendering for lcd monitors
Back to top
View user's profile Send private message
H3g3m0n
Tux's lil' helper
Tux's lil' helper


Joined: 14 Dec 2002
Posts: 97

PostPosted: Fri Nov 03, 2006 12:20 pm    Post subject: Reply with quote

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:

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
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Nov 03, 2006 12:27 pm    Post subject: Reply with quote

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:
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)
Back to top
View user's profile Send private message
boniek
Guru
Guru


Joined: 26 Mar 2005
Posts: 373

PostPosted: Fri Nov 03, 2006 4:44 pm    Post subject: Reply with quote

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.
_________________
[HOWTO]New freetype subpixel font rendering for lcd monitors


Last edited by boniek on Fri Nov 03, 2006 5:35 pm; edited 3 times in total
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Fri Nov 03, 2006 5:11 pm    Post subject: Reply with quote

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:

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:
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
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Nov 03, 2006 5:34 pm    Post subject: Reply with quote

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:
# 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
Back to top
View user's profile Send private message
boniek
Guru
Guru


Joined: 26 Mar 2005
Posts: 373

PostPosted: Fri Nov 03, 2006 5:36 pm    Post subject: Reply with quote

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:
# 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
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Fri Nov 03, 2006 5:44 pm    Post subject: Reply with quote

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:
# 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 ;)
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Fri Nov 03, 2006 5:54 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Bloodsurfer
Guru
Guru


Joined: 07 Dec 2005
Posts: 359
Location: Germany (Saarland)

PostPosted: Fri Nov 10, 2006 3:39 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Crono81
Tux's lil' helper
Tux's lil' helper


Joined: 07 Nov 2006
Posts: 86

PostPosted: Tue Nov 21, 2006 12:35 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Nov 21, 2006 3:31 am    Post subject: Reply with quote

To fix bold fonts, add to ~/.fonts.conf e.g.:
Code:
   <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>
Back to top
View user's profile Send private message
Crono81
Tux's lil' helper
Tux's lil' helper


Joined: 07 Nov 2006
Posts: 86

PostPosted: Tue Nov 21, 2006 11:42 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
bssteph
l33t
l33t


Joined: 26 Feb 2003
Posts: 651
Location: Wisconsin

PostPosted: Wed Nov 22, 2006 9:08 am    Post subject: Reply with quote

I just wanted to pipe in and say that this is really snazzy. Thanks!
_________________
Website - All sorts of nonsense (some of it actually Linux related)
Back to top
View user's profile Send private message
nosebleed
n00b
n00b


Joined: 13 Jan 2004
Posts: 16

PostPosted: Sat Nov 25, 2006 5:00 am    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
boniek
Guru
Guru


Joined: 26 Mar 2005
Posts: 373

PostPosted: Sat Nov 25, 2006 8:19 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Crono81
Tux's lil' helper
Tux's lil' helper


Joined: 07 Nov 2006
Posts: 86

PostPosted: Sat Nov 25, 2006 6:54 pm    Post subject: Reply with quote

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 :?
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 1, 2, 3 ... 28, 29, 30  Next
Page 1 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