View previous topic :: View next topic |
Author |
Message |
suwalski n00b
Joined: 22 Feb 2003 Posts: 12
|
Posted: Mon Feb 24, 2003 12:49 am Post subject: Font AA Troubles - HowTo: The Best Solution. |
|
|
Ever since I emerged -u world for the first time since Christmas, I have been having huge font problems. They looked exactly like they do here: https://forums.gentoo.org/viewtopic.php?t=34039
I read all the threads. People said to downgrade and reupgrade. Others said that I just have to rebuild freetype with the latest version, USE=smooth, and comment out the hinting.
I liked this. It looked very good, except two things:
1) Without hinting, stems were sometimes rendered too fat
2) Times New Roman looked very fat and ugly.
Good things:
1) Luxi and all Sans fonts looked awesome.
2) Some fonts looked a little 'fuller', as they tend to when not hinted.
However, after playing for 8 hours, trying every possible configuration permutation, and still not having the ideal system, I realized that the normal base Freetype build worked quite nicely on everything not Luxi.
So, I have found the best balance solution. As far as I can tell, my fonts are now like they were before I upgraded.
Just emerge Freetype just as always, do not USE=smooth, and leave the hinting on, it's worth it.
Next, to make those Luxi Sans Serif fonts look normal, I turned off the hinting only for the Sans font group (which is everything that's not specifically something else, by default).
This is done by adding the following to /etc/fonts/fonts.conf near the end, before all the Unicode definitions:
Code: | <match target="pattern">
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
</match> |
Make certain to re-run 'fc-cache -v'.
This really, really did it for me. This doesn't make any of the other Luxi fonts look better, but they can be handled in a similar way. My big beef was with the Luxi sans and all its definitions. A rule could probably be added to fonts.conf that disables hinting on Luxi*.
Now all my fonts are crisp and antialiased, Times New Roman looks like it should, as do all the sans-serifs.
The question remains: what changed the fonts? Was it newer Freetype, newer X or Gnome2.2? I'm thinking Freetype somehow changed its hinting method.
Hope this helps someone! |
|
Back to top |
|
|
suwalski n00b
Joined: 22 Feb 2003 Posts: 12
|
Posted: Mon Feb 24, 2003 1:05 am Post subject: Small Clarification. |
|
|
I have a small clarification.
By "hinting," I of course mean, bytecode interpreter (BCI), and not subpixel hinting.
I am using subpixel hinting, and it works quite nicely, as does the BCI, just not for Luxi*. |
|
Back to top |
|
|
Elm0 Apprentice
Joined: 24 Nov 2002 Posts: 281 Location: UK
|
Posted: Mon Feb 24, 2003 5:15 pm Post subject: |
|
|
Well, I edited my fontconfig file as you suggested, and my san-serif fonts have come out looking much 'fuller' looking and also seem a bit better spaced (easier to read). kinda like the ones in Redhat 8.0, which I really quite like (all this font stuff seems to be pretty subjective, i know some people who prefer the crisp edges of non-AA fonts!).
I looked on the freetype website and I saw some mentions of auto-hinting, and patent issues to do with Adobe and Apple. You appear to be more knowledgeable on this issue; what exactly has freetype done internally? |
|
Back to top |
|
|
perry Tux's lil' helper
Joined: 18 Nov 2002 Posts: 142 Location: Cornfields of Indiana
|
Posted: Tue Feb 25, 2003 1:31 am Post subject: |
|
|
I'm not sure what it did, but it fixed a problem I was having. Downstrokes on "k" were messed up in some fonts, and "O" (the letter) looked kinda pulled and stretched out in a different font. I had previously tried unmerging xft, freetype, and fontconfig, and then emerging them again, but it didn't make a difference. I did that again, and included the change to fonts.conf that you posted, and badda-boom... everything looks perfect now!
I don't understand any of that smoothing stuff, or hinting, or sub-pixel rendering... I just wanted nice looking fonts, and now I'm as happy as a clam! |
|
Back to top |
|
|
grom n00b
Joined: 13 Feb 2003 Posts: 17
|
Posted: Tue Feb 25, 2003 4:05 am Post subject: |
|
|
Ok, I did what you said, It definately did some good things, but Somethings are still a bit out there. When I open something like the KDE control center, the fonts are nice and AA and pretty. It all looks super sweet. However the titlebars (on windows, the top thing that says what window is) is still all chunky. Its really quite strange. Somehow my purely KDE apps are getting some of the AA, but not the KDE base system. Phoenix is AA'd and looks pretty good except for some wierd font resizing issues, which aren't a big deal. Tooltips are also not AA'd. This really does confuse me, and I have been trying to make it all look good for days. Thanks for any help
Peace.
max
UPDATE:! Ok, so i logged out and Restarted my X-server and Its all super pretty now, All thats left is to maybe do some tweaking with my phoenix and try and get all its fonts working right. Tricky tricky kde and fonts. At least they look good now. _________________ Umm, yeah. |
|
Back to top |
|
|
suwalski n00b
Joined: 22 Feb 2003 Posts: 12
|
Posted: Tue Feb 25, 2003 5:21 am Post subject: |
|
|
Elm0 wrote: | Well, I edited my fontconfig file as you suggested, and my san-serif fonts have come out looking much 'fuller' looking and also seem a bit better spaced (easier to read). kinda like the ones in Redhat 8.0, which I really quite like (all this font stuff seems to be pretty subjective, i know some people who prefer the crisp edges of non-AA fonts!).
I looked on the freetype website and I saw some mentions of auto-hinting, and patent issues to do with Adobe and Apple. You appear to be more knowledgeable on this issue; what exactly has freetype done internally? |
I agree, the fonts now look basically as the stock RedHat fonts do. That wasn't the aim of this.
I don't know what Freetype has done in the last few releases. As I said in my initial post, I'm not even sure it's freetype's fault. What freetype has done in the past is make a good bytecode interpreter.
If you don't feel like reading extensive documentation, the BCI is just a bunch of tags (maybe "handles" is a better word?), so that when the font is rasterized for screen rendering, pixel positions are "hinted" by the font. This ties in with AA hinting, because as soon as you AA a font, the you're not following the bytecode rules as precisely (AFAIK). The trick is to find a happy medium between pure interpretation and smoothing. Without that you get things like straight stems on letters being made too fat because the AA engine puts in an extra layer of dark pixels.... so anyways, this used to work better on the Luxi font, but it doesn't have to be Freetype's fault at all, it could be the newer version of X, maybe the fontfile itself was somehow changed? |
|
Back to top |
|
|
zypher Retired Dev
Joined: 10 Jun 2002 Posts: 416 Location: Cologne, ger.
|
Posted: Thu Feb 27, 2003 6:24 pm Post subject: |
|
|
Just a quick note:
I tried freetype-2.1.4-r2.
Just did a ./configure --prefix=/usr && make && make install
No changes to any config files made.
And my fonts look really acceptable.
Try it out if you like. _________________ linux user 65882 |
|
Back to top |
|
|
abracadaver Tux's lil' helper
Joined: 03 Feb 2003 Posts: 125
|
Posted: Fri Feb 28, 2003 11:06 pm Post subject: |
|
|
i followed the first directions and my fonts look superb, except for the menu bars (that say File Edit View etc..) none of those are antialiased. this happend just after i upgraded to Xfree 4.3.0 (before, with 4.2.1 everything was antialiased and swell) I'm hoping it's kind of a common problem and someone can tell me exactly what i need to reemerge or tweak.
thanks
and i've reemerged freetype (2.1.4rc2) and fontconfig (2.4.1) neither had any effect.
also, I use Openbox, not gnome or kde
edit:: i think i've narrowed my problem down to GTK apps, (GTK2, look great..) is mozilla by any chance gtk? if so that would probably prove my theory
Last edited by abracadaver on Sat Mar 01, 2003 12:30 am; edited 2 times in total |
|
Back to top |
|
|
kermitjunior Apprentice
Joined: 04 Aug 2002 Posts: 167
|
Posted: Fri Feb 28, 2003 11:21 pm Post subject: Xfree 4.3 |
|
|
I'm actually rebuilding from Stage1 right now and I'm on xfree.
Is the Xfree 4.3 working well for all of you? Should i just go ahead and emerge it instead?
This is also a place marker since it's such good info. Thanks for writing it all out. THIS is why I love Gentoo! _________________ -----
Toshiba Satellite A15-S157, 2.2 Celery, 40GB, 512MB
AMD Athlon XP 1900+, 640MB PC2100, ABIT KG-7R
IBM 120GB (Linux), WD 30GB (WinDoze), ATI All-In-Wonder 128 Pro PCI |
|
Back to top |
|
|
abracadaver Tux's lil' helper
Joined: 03 Feb 2003 Posts: 125
|
Posted: Fri Feb 28, 2003 11:25 pm Post subject: |
|
|
xfree 4.3 is working great so far no problems emerging or running yet, i literaly just emerged it though. the new cursor (whiteglass) is all the rage remember to use ACCEPT_KEYWORDS=~x86 otherwise it'll complain about dependancies |
|
Back to top |
|
|
grom n00b
Joined: 13 Feb 2003 Posts: 17
|
Posted: Thu Mar 06, 2003 1:41 am Post subject: |
|
|
i'm pretty sure Mozilla isn't a GTK app, it seems to be something on its own entirely, but I could be wrong. _________________ Umm, yeah. |
|
Back to top |
|
|
MarkWPiper n00b
Joined: 02 Jun 2002 Posts: 30
|
Posted: Thu Mar 06, 2003 2:12 am Post subject: RE: Is Mozilla GTK? |
|
|
The latest Mozilla builds will use GTK 1.x themes for SOME of the UI when the normal theme is used (as opposed to modern).
Therefore, SOME parts of Moz won't be antialiased (like menubars), while others, (like the page view) will be, due to the nice hacks enabled in the gentoo build.
Does anyone know a way to get GTK 1.x apps antialiased? |
|
Back to top |
|
|
jbrown Tux's lil' helper
Joined: 17 Feb 2003 Posts: 81
|
Posted: Thu Mar 06, 2003 2:21 am Post subject: Re: RE: Is Mozilla GTK? |
|
|
MarkWPiper wrote: | The latest Mozilla builds will use GTK 1.x themes for SOME of the UI when the normal theme is used (as opposed to modern).
Therefore, SOME parts of Moz won't be antialiased (like menubars), while others, (like the page view) will be, due to the nice hacks enabled in the gentoo build.
Does anyone know a way to get GTK 1.x apps antialiased? |
gdkxft
|
|
Back to top |
|
|
MarkWPiper n00b
Joined: 02 Jun 2002 Posts: 30
|
Posted: Thu Mar 06, 2003 2:50 am Post subject: |
|
|
I never noticed gdkxft, since it's masked. Very !
I tried emerging it, but I got some compile errors. Anyone happen to have suggestions??
Code: | In file included from gdkxft.c:29:
/usr/X11R6/include/X11/Xft/Xft.h:52: parse error before "_XftFTlibrary"
/usr/X11R6/include/X11/Xft/Xft.h:52: warning: type defaults to `int' in declaration of `_XftFTlibrary'
/usr/X11R6/include/X11/Xft/Xft.h:52: warning: data definition has no type or storage class
/usr/X11R6/include/X11/Xft/Xft.h:86: parse error before "FT_UInt"
/usr/X11R6/include/X11/Xft/Xft.h:86: warning: no semicolon at end of struct or union
/usr/X11R6/include/X11/Xft/Xft.h:89: parse error before '}' token
/usr/X11R6/include/X11/Xft/Xft.h:89: warning: type defaults to `int' in declaration of `XftGlyphSpec'
/usr/X11R6/include/X11/Xft/Xft.h:89: warning: data definition has no type or storage class
/usr/X11R6/include/X11/Xft/Xft.h:93: parse error before "FT_UInt"
/usr/X11R6/include/X11/Xft/Xft.h:93: warning: no semicolon at end of struct or union
/usr/X11R6/include/X11/Xft/Xft.h:96: parse error before '}' token
/usr/X11R6/include/X11/Xft/Xft.h:96: warning: type defaults to `int' in declaration of `XftGlyphFontSpec'
/usr/X11R6/include/X11/Xft/Xft.h:96: warning: data definition has no type or storage class
/usr/X11R6/include/X11/Xft/Xft.h:190: warning: type defaults to `int' in declaration of `FT_UInt'
/usr/X11R6/include/X11/Xft/Xft.h:190: parse error before '*' token
/usr/X11R6/include/X11/Xft/Xft.h:256: warning: type defaults to `int' in declaration of `XftGlyphSpec'
/usr/X11R6/include/X11/Xft/Xft.h:256: parse error before '*' token
/usr/X11R6/include/X11/Xft/Xft.h:262: warning: type defaults to `int' in declaration of `XftGlyphFontSpec'
/usr/X11R6/include/X11/Xft/Xft.h:262: parse error before '*' token
/usr/X11R6/include/X11/Xft/Xft.h:295: warning: type defaults to `int' in declaration of `FT_UInt'
/usr/X11R6/include/X11/Xft/Xft.h:295: parse error before '*' token
/usr/X11R6/include/X11/Xft/Xft.h:354: parse error before "XftLockFace"
/usr/X11R6/include/X11/Xft/Xft.h:354: warning: type defaults to `int' in declaration of `XftLockFace'
/usr/X11R6/include/X11/Xft/Xft.h:354: warning: data definition has no type or storage class
/usr/X11R6/include/X11/Xft/Xft.h:393: warning: type defaults to `int' in declaration of `FT_UInt'
/usr/X11R6/include/X11/Xft/Xft.h:393: parse error before '*' token
/usr/X11R6/include/X11/Xft/Xft.h:399: warning: type defaults to `int' in declaration of `FT_UInt'
/usr/X11R6/include/X11/Xft/Xft.h:399: parse error before '*' token
/usr/X11R6/include/X11/Xft/Xft.h:408: parse error before "FT_UInt"
/usr/X11R6/include/X11/Xft/Xft.h:418: parse error before "XftCharIndex"
/usr/X11R6/include/X11/Xft/Xft.h:420: warning: type defaults to `int' in declaration of `XftCharIndex'
/usr/X11R6/include/X11/Xft/Xft.h:420: warning: data definition has no type or storage class
/usr/X11R6/include/X11/Xft/Xft.h:461: warning: type defaults to `int' in declaration of `FT_UInt'
/usr/X11R6/include/X11/Xft/Xft.h:461: parse error before '*' token
/usr/X11R6/include/X11/Xft/Xft.h:472: warning: type defaults to `int' in declaration of `XftGlyphSpec'
/usr/X11R6/include/X11/Xft/Xft.h:472: parse error before '*' token
/usr/X11R6/include/X11/Xft/Xft.h:493: warning: type defaults to `int' in declaration of `XftGlyphFontSpec'
/usr/X11R6/include/X11/Xft/Xft.h:493: parse error before '*' token
make[1]: *** [gdkxft.lo] Error 1
make[1]: Leaving directory `/var/tmp/portage/gdkxft-1.5/work/gdkxft-1.5/src'
make: *** [all-recursive] Error 1
!!! ERROR: x11-libs/gdkxft-1.5 failed.
!!! Function src_compile, Line 23, Exitcode 2
!!! compile failed
root@xentra gdkxft # emerge -p xft
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] x11-libs/xft-2.0.1-r1
|
|
|
Back to top |
|
|
stustill Guru
Joined: 25 Feb 2003 Posts: 333 Location: Aberdeen, Scotland
|
Posted: Thu Mar 06, 2003 3:20 am Post subject: |
|
|
On the AA Howto under Document, Tips and Tricks, the HOWTO details a problem with the Xft.h, it is outdated. You can download a replacement from http://userportal.iha.dk/~01876/xft.h.good (hosted by lovechild)
hope this helps
Stu |
|
Back to top |
|
|
billatq Tux's lil' helper
Joined: 09 Jun 2002 Posts: 96
|
Posted: Thu Mar 13, 2003 8:24 pm Post subject: |
|
|
Wow, this works great--the font deal was the only thing really annoying me that I didn't have that red hat users did. This is awesome . |
|
Back to top |
|
|
Supermule Guru
Joined: 05 Mar 2003 Posts: 510 Location: /denmark/fyn
|
Posted: Thu Mar 13, 2003 8:41 pm Post subject: |
|
|
billatq wrote: | Wow, this works great--the font deal was the only thing really annoying me that I didn't have that red hat users did. This is awesome . |
Which solution did you use then? The first or the second?
/Supermule |
|
Back to top |
|
|
billatq Tux's lil' helper
Joined: 09 Jun 2002 Posts: 96
|
Posted: Sat Mar 15, 2003 6:26 pm Post subject: |
|
|
Oh, the first one, though I'm going to try to get the other one working with gtk+ (1) apps. |
|
Back to top |
|
|
RedBaron n00b
Joined: 16 Jan 2003 Posts: 12
|
Posted: Sat Mar 15, 2003 8:28 pm Post subject: |
|
|
abracadaver wrote: |
and i've reemerged freetype (2.1.4rc2) and fontconfig (2.4.1) neither had any effect.
|
Might be a stupid question, but how did you emerge those? I can't find those versions from portage... |
|
Back to top |
|
|
billatq Tux's lil' helper
Joined: 09 Jun 2002 Posts: 96
|
Posted: Sat Mar 15, 2003 9:00 pm Post subject: |
|
|
I just used the latest ones. Also, gdkxft works wonderfully, though I had to write a tiny wrapper script to selectively turn it on for gtk+ stuff, since it doesn't work with gtk2 stuff at all.
Code: | #! /bin/sh
LD_PRELOAD=/usr/lib/libgdkxft.so $* |
(though this probably isn't entirely right)
I named it "aame" and threw it in /usr/local/bin, so whenever I'm going to run say.. mozilla, I do
and using the gtk+ theme on it, it looks simply awesome with bluecurve
Oh, and for the gdkxft, I had to put this in ~/.gdkxft
Code: |
!*
-urw-*
-b&h-*
-abisource-*
-monotype-*
-microsoft-*
-macromedia-*
-AbiSource-*
|
If you have an empty file there, it assumes that you want to antialias everything (which may not necessarily be what you want)
Also, I had to use that patched Xft.h header file that was linked to earlier in this thread to get it to compile.
Here's a screenshot: http://calvin.resnet.tamu.edu/images/screenshot-6.png |
|
Back to top |
|
|
dbd n00b
Joined: 20 Oct 2002 Posts: 12
|
Posted: Sat Mar 15, 2003 9:19 pm Post subject: |
|
|
I always thought I would be stuck with worse font than WinXP's Cleartype on my other partition..., but, no! With this, I have much more beautiful font than I imagined! Thank you SO MUCH :D
I <3 this font. |
|
Back to top |
|
|
Craigo Apprentice
Joined: 09 Aug 2002 Posts: 249 Location: /dev/life
|
Posted: Mon Mar 17, 2003 4:40 pm Post subject: |
|
|
billatq,
Interesting use of method there to get GTK1 dress up in AA. I did this early last year and then we all moved on to GTK2.
However, I wouldn't mind starting to use this again but looking at your desktop, am I right seeing gnome 2 mixed with a few gtk1 applications? Gcombust, gaim and mozilla if I am correct?
-/Craigo/- |
|
Back to top |
|
|
billatq Tux's lil' helper
Joined: 09 Jun 2002 Posts: 96
|
Posted: Thu Mar 20, 2003 5:23 pm Post subject: |
|
|
Quote: | Interesting use of method there to get GTK1 dress up in AA. I did this early last year and then we all moved on to GTK2.
However, I wouldn't mind starting to use this again but looking at your desktop, am I right seeing gnome 2 mixed with a few gtk1 applications? Gcombust, gaim and mozilla if I am correct? |
Almost completely . That's actualy gaim .60 from cvs--specifically a snapshot of the source from 12 March, because there was a commit that screwed up the buddy list and I want to have a stable version while they fix it up. There are a couple of applications that are going to be gtk1 for a while, so I like having those look like the rest of the apps in the meantime. I've actually achieved having a completely uniform look and feel between all of the apps that I commenly use, with the exception of acroread and evolution. The reasons for this of course being that acroread seems to be (open?) motif based and evolution does some screwy things with the fonts and does not work completely right with gdkxft. Other than that, it's really nice. |
|
Back to top |
|
|
trinity n00b
Joined: 20 Mar 2003 Posts: 74
|
|
Back to top |
|
|
billatq Tux's lil' helper
Joined: 09 Jun 2002 Posts: 96
|
Posted: Mon Mar 24, 2003 6:28 am Post subject: |
|
|
Follow the instructions above, then follow mine and you can have it look like that also.
--Bill |
|
Back to top |
|
|
|