Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Font AA Troubles - HowTo: The Best Solution.
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
suwalski
n00b
n00b


Joined: 22 Feb 2003
Posts: 12

PostPosted: Mon Feb 24, 2003 12:49 am    Post subject: Font AA Troubles - HowTo: The Best Solution. Reply with quote

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
View user's profile Send private message
suwalski
n00b
n00b


Joined: 22 Feb 2003
Posts: 12

PostPosted: Mon Feb 24, 2003 1:05 am    Post subject: Small Clarification. Reply with quote

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
View user's profile Send private message
Elm0
Apprentice
Apprentice


Joined: 24 Nov 2002
Posts: 281
Location: UK

PostPosted: Mon Feb 24, 2003 5:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
perry
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2002
Posts: 142
Location: Cornfields of Indiana

PostPosted: Tue Feb 25, 2003 1:31 am    Post subject: Reply with quote

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
View user's profile Send private message
grom
n00b
n00b


Joined: 13 Feb 2003
Posts: 17

PostPosted: Tue Feb 25, 2003 4:05 am    Post subject: Reply with quote

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
View user's profile Send private message
suwalski
n00b
n00b


Joined: 22 Feb 2003
Posts: 12

PostPosted: Tue Feb 25, 2003 5:21 am    Post subject: Reply with quote

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
View user's profile Send private message
zypher
Retired Dev
Retired Dev


Joined: 10 Jun 2002
Posts: 416
Location: Cologne, ger.

PostPosted: Thu Feb 27, 2003 6:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
abracadaver
Tux's lil' helper
Tux's lil' helper


Joined: 03 Feb 2003
Posts: 125

PostPosted: Fri Feb 28, 2003 11:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
kermitjunior
Apprentice
Apprentice


Joined: 04 Aug 2002
Posts: 167

PostPosted: Fri Feb 28, 2003 11:21 pm    Post subject: Xfree 4.3 Reply with quote

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
View user's profile Send private message
abracadaver
Tux's lil' helper
Tux's lil' helper


Joined: 03 Feb 2003
Posts: 125

PostPosted: Fri Feb 28, 2003 11:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
grom
n00b
n00b


Joined: 13 Feb 2003
Posts: 17

PostPosted: Thu Mar 06, 2003 1:41 am    Post subject: Reply with quote

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
View user's profile Send private message
MarkWPiper
n00b
n00b


Joined: 02 Jun 2002
Posts: 30

PostPosted: Thu Mar 06, 2003 2:12 am    Post subject: RE: Is Mozilla GTK? Reply with quote

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
View user's profile Send private message
jbrown
Tux's lil' helper
Tux's lil' helper


Joined: 17 Feb 2003
Posts: 81

PostPosted: Thu Mar 06, 2003 2:21 am    Post subject: Re: RE: Is Mozilla GTK? Reply with quote

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

8)
Back to top
View user's profile Send private message
MarkWPiper
n00b
n00b


Joined: 02 Jun 2002
Posts: 30

PostPosted: Thu Mar 06, 2003 2:50 am    Post subject: Reply with quote

I never noticed gdkxft, since it's masked. Very 8-)!

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
View user's profile Send private message
stustill
Guru
Guru


Joined: 25 Feb 2003
Posts: 333
Location: Aberdeen, Scotland

PostPosted: Thu Mar 06, 2003 3:20 am    Post subject: Reply with quote

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
View user's profile Send private message
billatq
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2002
Posts: 96

PostPosted: Thu Mar 13, 2003 8:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
Supermule
Guru
Guru


Joined: 05 Mar 2003
Posts: 510
Location: /denmark/fyn

PostPosted: Thu Mar 13, 2003 8:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
billatq
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2002
Posts: 96

PostPosted: Sat Mar 15, 2003 6:26 pm    Post subject: Reply with quote

Oh, the first one, though I'm going to try to get the other one working with gtk+ (1) apps.
Back to top
View user's profile Send private message
RedBaron
n00b
n00b


Joined: 16 Jan 2003
Posts: 12

PostPosted: Sat Mar 15, 2003 8:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
billatq
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2002
Posts: 96

PostPosted: Sat Mar 15, 2003 9:00 pm    Post subject: Reply with quote

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

Code:
aame mozilla


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
View user's profile Send private message
dbd
n00b
n00b


Joined: 20 Oct 2002
Posts: 12

PostPosted: Sat Mar 15, 2003 9:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Craigo
Apprentice
Apprentice


Joined: 09 Aug 2002
Posts: 249
Location: /dev/life

PostPosted: Mon Mar 17, 2003 4:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
billatq
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2002
Posts: 96

PostPosted: Thu Mar 20, 2003 5:23 pm    Post subject: Reply with quote

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


Joined: 20 Mar 2003
Posts: 74

PostPosted: Thu Mar 20, 2003 5:50 pm    Post subject: Reply with quote

Hi,

I'm new with Gentoo and I'd like my fonts in my gnome's desktop looks like this:

http://calvin.resnet.tamu.edu/images/screenshot-6.png

Can anyone tell me "step by step" how billatq did that?

Thanks
Back to top
View user's profile Send private message
billatq
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2002
Posts: 96

PostPosted: Mon Mar 24, 2003 6:28 am    Post subject: Reply with quote

Follow the instructions above, then follow mine and you can have it look like that also.

--Bill
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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