Page 1 of 3

Fonts - Subpixel hinting

Posted: 12. Aug 2010, 17:42
by ray
Hi,

I have been trying out a live cd of fedora and the fonts seemed to be much better there.
I have been googling and read that the stock slackware freetype package isnt built for lcd subpixel hinting, also that there are patches that distro's like ubuntu/fedora use to make fonts looks better.

As far as i know, salix does use the slackware freetype packages, so is this the reason?
It would be nice if salix's freetype could be built to make laptop user's lives easier :)

Thanks.

EDIT: Fixed typo from is to isnt :oops:

Re: Fonts - Subpixel hinting

Posted: 12. Aug 2010, 19:28
by thenktor
ray wrote:the stock slackware freetype package is built for lcd subpixel hinting,
And this is exactly what you want to have on a notebook... :?

EDIT: I'm using:
* antialiasing on
* sub pixel hinting medium
* pixel RGB

And it's perfect.

Re: Fonts - Subpixel hinting

Posted: 12. Aug 2010, 21:53
by pwatk
If I use those settings I see red around the edges of fonts. It's the same on my wife's laptop too (yes, she's a Salixer to now :) ).

If I set subpixel order to none all is well.

Re: Fonts - Subpixel hinting

Posted: 12. Aug 2010, 22:09
by thenktor
So perhaps you have to exchange the pixel order? Take a closer look to your LCD :mrgreen:

Re: Fonts - Subpixel hinting

Posted: 13. Aug 2010, 08:35
by ray
thenktor wrote:And this is exactly what you want to have on a notebook... :?

EDIT: I'm using:
* antialiasing on
* sub pixel hinting medium
* pixel RGB

And it's perfect.
Err, it was supposed to say, isnt built for lcd subpixel hinting.
And yes, like pwatk says, if you make use of subpixel hinting, you see red/green on the edges, and changing the order doesnt work, because subpixel hinting is disabled in freetype.

Re: Fonts - Subpixel hinting

Posted: 13. Aug 2010, 08:36
by pwatk
:roll: :lol:

Re: Fonts - Subpixel hinting

Posted: 13. Aug 2010, 09:03
by ray
Been reading around a bit more and found something of use, i think.
Freetype Slackbuild wrote: # The line below enables code patented by Apple, so don't uncomment it
# unless you have a license to use the code and take all legal responsibility
# for doing so.
# Please see this web site for more details:
# http://www.freetype.org/patents.html
#zcat $CWD/freetype.bytecode.interpreter.diff.gz | patch -p1 --verbose || exit 1

# The line below enables code patented by Microsoft, so don't uncomment it
# unless you have a license to use the code and take all legal responsibility
# for doing so.
# Please see this web site for more details:
# http://www.freetype.org/patents.html
#zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1
The slackbuild for the freetype package has these lines, which supposedly enables the hinting, according to slackwiki.
Gonna try it out when i get back home and post the results.

Also of note, is the below message on the freetype website:
Freetype.org wrote: The TrueType bytecode patents have expired!
Since May 2010, all patents related to bytecode hinting have expired worldwide. It it thus no longer necessary to disable the bytecode interpreter, and starting with FreeType version 2.4, it is enabled by default.
Cheers,
ray

Sources:
http://www.slackwiki.org/LCD_Monitor_Co ... n_In_X.Org
http://slackware.osuosl.org/slackware-c ... SlackBuild
http://www.freetype.org/patents.html

Re: Fonts - Subpixel hinting

Posted: 13. Aug 2010, 09:43
by gapan
If I remember correctly, at least some of those patents have expired during the last few months. So, expect the freetype package distributed with the next slackware release to have some of that stuff enabled.

Personally, I find fonts perfect as they are already.

edit: oh, I now see ray noted that the patents have expired too.

Re: Fonts - Subpixel hinting

Posted: 13. Aug 2010, 10:52
by thenktor
gapan wrote:Personally, I find fonts perfect as they are already.
Same here. And I cannot see colored edges. Fonts on Salix look the same as on my Open SuSe machine here at work. At least I did not note any difference, yet.
But if they can get even better, I have no problem with it :mrgreen:

PS: IIRC fonts on Win XP suck, I hpe this is not how they "should" look in X, too.

Re: Fonts - Subpixel hinting

Posted: 13. Aug 2010, 16:05
by ray
Ok, I just compiled freetype after enabling the patches and the fonts look much better!!
I guess they patented the damn things for a pretty good reason :D

P.S: Is there a way to lock freetype to the version i compiled as a package, so that updates wont overwrite it?

Cheers,
ray