Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
XFree anti-aliased font tips
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
wilbertnl
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jul 2002
Posts: 89
Location: Tulsa, OK, USA

PostPosted: Fri Aug 02, 2002 3:25 am    Post subject: Not all MS fonts usefull? Reply with quote

I was just simply thinking that I could collect all ttf fonts from any MS Windows version/application.
But it turns out that anti-aliasing is not always working.
Now it looks like the ttf fonts which come with the portage are working, but my own import don't. I created XftConfig files in the directories. But without aliases.

Does this sound familiar? Is there anything I need to do to get imported MS ttf's anti-aliased?
I'm using the fonts in Mozilla (and added the directory in unix.js)
_________________
Wilbert van Bakel
Strive for excellence, not perfection
Back to top
View user's profile Send private message
dioxmat
Bodhisattva
Bodhisattva


Joined: 04 May 2002
Posts: 709
Location: /home/mat

PostPosted: Fri Aug 02, 2002 8:01 am    Post subject: Reply with quote

you probably need to re-generate fonts.dir and fonts.scale ...
_________________
mat
Back to top
View user's profile Send private message
wilbertnl
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jul 2002
Posts: 89
Location: Tulsa, OK, USA

PostPosted: Fri Aug 02, 2002 5:44 pm    Post subject: Reply with quote

dioxmat wrote:
you probably need to re-generate fonts.dir and fonts.scale ...


I forgot to mention that, but I sure did. :)
_________________
Wilbert van Bakel
Strive for excellence, not perfection
Back to top
View user's profile Send private message
Kabuto
l33t
l33t


Joined: 01 Aug 2002
Posts: 701

PostPosted: Tue Aug 27, 2002 3:31 pm    Post subject: Reply with quote

Here is a site to try. http://www.dvdfile.com

I have most of the tweaks here but I had to change the AA minimum to 9 and set the smallest font shown in Mozilla to 9 for this site to show up readable.
Back to top
View user's profile Send private message
keifir
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jun 2002
Posts: 119
Location: Canada

PostPosted: Wed Sep 04, 2002 3:37 am    Post subject: Reply with quote

@davidbloomberg: thanx for posting that unix.js file - now my moz looks really crisp 8)
Back to top
View user's profile Send private message
meyerm
Veteran
Veteran


Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

PostPosted: Sat Sep 07, 2002 1:00 am    Post subject: X with only TTFs? Reply with quote

Hmm, I'm wondering if it is possible to only use TTFs and no longer any bitmap fonts in X...

Isn't it somehow possible to change the XftConfig to map those bitmap fonts "fixed" etc. all to some TTFs? But what about apps which aren't "build for Xft"?

(To be honest, I still didn't get the difference between freetype and Xft. Neither is a "real" font server and Xft even needs special treatment by the apps? Could someone perhaps explain this in a few words? :) )
Back to top
View user's profile Send private message
omie
n00b
n00b


Joined: 06 Oct 2002
Posts: 17
Location: Atlanta, GA

PostPosted: Thu Oct 10, 2002 12:50 am    Post subject: question Reply with quote

this may seem like a dumb question...

how do i install NEW true type fonts? what's the procedure? i got some, changed their names to be lowercase without spaces, then put them in my /usr/X11R6/lib/X11/fonts/truetype directory

i edited the Xftconfig in that directory and added EDIT lines for them, then ran mkfontdir. still nothing. i tried running ttmkfontdir > fonts.scale as root, but that didn't seem to do anything.

is there anything else i need to do?

thanks
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Thu Oct 10, 2002 4:20 pm    Post subject: Try ttmkfdir Reply with quote

Omie,

First, make sure you've also referenced the fonts in your /etc/X11/XF86Config:
Code:
FontPath   "/usr/X11R6/lib/X11/fonts/truetype/"


Secondly, the correct command for generating TrueType scale files is actually ttmkfdir and you may need to emerge it first:
Code:
emerge x11-misc/ttmkfdir


You should be able to get a lot of info from these forums by searching for "install truetype". Someone called "okram" recommended checking the man page for the ttmkfdir command in detail before use. Apparently you should add the --encoding parameter if you use anything other than iso8859-1 charsets, and that you may also need to add the -o fonts.scale parameter.
Back to top
View user's profile Send private message
omie
n00b
n00b


Joined: 06 Oct 2002
Posts: 17
Location: Atlanta, GA

PostPosted: Tue Oct 15, 2002 7:10 pm    Post subject: Reply with quote

hrmm. ok. i did all of that. gaim sees the font now, but gnome2 doesn't seem to. any idea on how to get gnome to see the font? do i need to edit the Xftconfig file in the font's directory?
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Oct 15, 2002 7:24 pm    Post subject: Reply with quote

See Spider's (Gnome maestro extraordinaire) response in https://forums.gentoo.org/viewtopic.php?t=6137
Back to top
View user's profile Send private message
omie
n00b
n00b


Joined: 06 Oct 2002
Posts: 17
Location: Atlanta, GA

PostPosted: Tue Oct 15, 2002 8:30 pm    Post subject: nope Reply with quote

no dice. i've been messing with gnome-font-install. but i'll keep searching. maybe the fonts i'm trying to install are invalid or something. but gaim sees all of them. gnome still doesn't.
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Wed Oct 23, 2002 11:34 am    Post subject: XFree 4.2.1 ebuild out with freetype-2.1.2 !!! Reply with quote

Oh joy! XFree 4.2.1 is out, and those lovely folks at Gentoo have customised the ebuild to build the font engine (Xft et al) against freetype-2.1.2 :)

Interestingly, the sed command which patches the freetype sources to enable the bytecode interpreter is not present in the xfree-4.2.1.ebuild file. Although I haven't checked yet, I'm pretty sure that the bytecode interpreter is still off by default in freetype, so those who believe in it may want to add that line in to the ebuild file.

Personally, I'm becoming wary of the assumption that the bytecode interpreter automatically makes things better. I'm still not convinced I'm getting the best out of freetype, so the quest continues. As iangoldby has shown with his valuable research, the xft-quality patch that is lurking in the Portage tree clearly shows improvements. So I need to see if that still works with the current XFree build. But I still maintain that David Chester's patch gave the best font rendering I have yet seen which, of course, doesn't want hinting anyway, and I've heard talk of the bytecode interpreter not really being very good in freetype. I wonder if that situation has changed.

While I'm on the subject, has anyone tried out the new OpenOffice 1.0.1 build? Gentoo have customised the truetype rendering, and IMO, it's abolutely appalling! The fonts are hideously weighted (think uber-bold), badly kerned and just don't look right at all. Has anyone else experienced this (before I file a bug)? It's so bad for me, that I have to specify font substitutions to use Type1 fonts instead on screen!

And finally, I was wondering if anyone had tried using "official" Adobe Type1 fonts in X (from Acrobat or whatever) to see how much of an improvement they would be on the "free" versions? I remember employing such a trick for Ghostscript years ago and it gave good results.

Oh, and thanks a million to davidblumberg for the Mozilla trick! I've converted to Gnome recently, so this is especially useful as I use Mozilla/Galeon pretty much exclusively now.
Back to top
View user's profile Send private message
FusionGyro
n00b
n00b


Joined: 24 Oct 2002
Posts: 5
Location: New Mexico Tech

PostPosted: Thu Oct 24, 2002 7:23 pm    Post subject: XFree 4.2.1 ebuild with freetype-2.1.2 sub-pixel rendering Reply with quote

With XFree 4.2.1, if you want to use subpixel rendering you're going to have to make a change to a file besides /etc/X11/XftConfig.

Instead, you need to modify the file /etc/fonts/fonts.conf and find the lines that say:

Code:

<!--
  Enable sub-pixel rendering
    <match target="font">
        <edit name="rgba" mode="assign"><const>rgb</const></edit>
    </match>
-->


and change that to this:

Code:

<!--
  Enable sub-pixel rendering
-->
    <match target="font">
        <edit name="rgba" mode="assign"><const>rgb</const></edit>
    </match>


(Thanks to José Fonseca for replying to my bug ticket so quickly!)
Back to top
View user's profile Send private message
Carlo
Developer
Developer


Joined: 12 Aug 2002
Posts: 3356

PostPosted: Thu Oct 24, 2002 10:23 pm    Post subject: Reply with quote

Oh - I have XFree 4.2.1 running, but /etc/fonts/fonts.conf is empty. :?


Carlo
Back to top
View user's profile Send private message
tirantloblanc
Apprentice
Apprentice


Joined: 22 Oct 2002
Posts: 179
Location: Barcelona, ES

PostPosted: Sat Oct 26, 2002 10:15 pm    Post subject: Reply with quote

Quote:
Oh - I have XFree 4.2.1 running, but /etc/fonts/fonts.conf is empty. icon_confused.gif


I also have XFree 4.2.1 running, and /etc/fonts/fonts.conf is ok, but i don't have any /etc/X11/xftconfig...
Back to top
View user's profile Send private message
IvanHoe
l33t
l33t


Joined: 05 Oct 2002
Posts: 658

PostPosted: Sat Oct 26, 2002 10:16 pm    Post subject: Reply with quote

Quote:
Instead, you need to modify the file /etc/fonts/fonts.conf...

I did a search for fonts.conf and found nothing. Could this be a KDE only file (I use Gnome)?
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Sat Oct 26, 2002 10:36 pm    Post subject: 4.2.1 Reply with quote

i emerge xfree 4.2.1 and now I only have a few fonts.

the XFree86.0.log doesn't complain about my fontdirs being bad or anything. and fonts are still antialiased.

but slashdot usually shows up with a nice times new roman italicized font. (I have a screenshot of mozilla showing slashdot under xfree 4.2.0-r12 at http://www.desertsol.com/~kevin/screens/020929_mozillaquasar.jpg
http://www.desertsol.com/~kevin/screens/020929_mozillaquasarfonts.jpg

now with xfree 4.2.1 I just got a plain sanserif font. Also I've been using "xterm -fa 'Andale Mono'" for xterm. under 4.2.1 though I get some non-monospaced font, so it looks like there is an extra 'space' character between each character.

I reemerged 4.2.0-r12 for now
Back to top
View user's profile Send private message
tirantloblanc
Apprentice
Apprentice


Joined: 22 Oct 2002
Posts: 179
Location: Barcelona, ES

PostPosted: Sat Oct 26, 2002 11:49 pm    Post subject: Reply with quote

Quote:
I did a search for fonts.conf and found nothing. Could this be a KDE only file (I use Gnome)?

No, i think it comes with xfree. I dont have kde nor gnome (only fluxbox) and i do have /etc/fonts/fonts.conf ...
Back to top
View user's profile Send private message
dioxmat
Bodhisattva
Bodhisattva


Joined: 04 May 2002
Posts: 709
Location: /home/mat

PostPosted: Sun Oct 27, 2002 11:39 am    Post subject: Reply with quote

fontconfig and stuff is included with the Xfree 4.2.1 ebuild.
Back to top
View user's profile Send private message
DarkJedi9
Apprentice
Apprentice


Joined: 28 Oct 2002
Posts: 204

PostPosted: Mon Oct 28, 2002 10:34 pm    Post subject: Reply with quote

This whole font thing is irksome. When I first installed gentoo, I emerged waimea, thinking it would grab everything I needed. It sort of did. I'm pretty sure it got freetype and truetype fonts but when I used waimea it gave me an error about not being able to load fonts and has to use the default, which is ugly.

So then I found this thread; I added the fontpaths to XF86Config and I don't even have /etc/X11/XftConfig. I have /usr/X11R6/lib/X11/XftConfig but I'm not bothering with the anti-aliasing yet. This is because now I don't get an error about loading fonts but they don't look right. I compared against a screenshot of waimea from when I was using Slackware (all the X stuff was installed more or less without me doing anything) and I don't even think it's the same font.

I don't mean to sound like I'm bashing Gentoo - not looking for a "Go back to Slackware" response - I'm just wondering what's going on. It seems odd that it wouldn't give me an error about fonts but give me something completely different from what it should. Any suggestions?
Back to top
View user's profile Send private message
H-Dragon
Guru
Guru


Joined: 22 Oct 2002
Posts: 547

PostPosted: Tue Oct 29, 2002 9:55 am    Post subject: help me!!!!!!!!!!!!!!!! Reply with quote

i do not have the XftXonfig file in any directory.... i installed gentoo.. i emerged gnome... (and then galeon) but i only got gnome to run in non-failsage mode after disabling aa fonts !!!!!!!!!!

any help?
Back to top
View user's profile Send private message
tirantloblanc
Apprentice
Apprentice


Joined: 22 Oct 2002
Posts: 179
Location: Barcelona, ES

PostPosted: Tue Oct 29, 2002 11:39 am    Post subject: Re: help me!!!!!!!!!!!!!!!! Reply with quote

H-Dragon wrote:
i do not have the XftXonfig file in any directory.... i installed gentoo.. i emerged gnome... (and then galeon) but i only got gnome to run in non-failsage mode after disabling aa fonts !!!!!!!!!!

any help?


Last version of Xfree, Freetype, etc don't come with a Xftconfig. At least mine, i emerged everything last weekend and didn't have that Xftconfig, but i do have an /etc/fonts/fonts.conf, which i configured and added the paths for my fonts. I didn't need to do anything more, and when i compiled mozilla/gnome/metacity they supported automatically AA+truetype.
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Oct 29, 2002 11:49 am    Post subject: Observations Reply with quote

Quote:
Last version of Xfree, Freetype, etc don't come with a Xftconfig

You can get the XftConfig file back using this command (example assumes you're using XFree 4.2.1):
Code:
cp /usr/portage/x11-base/xfree/files/4.2.1/XftConfig /etc/X11

EDIT: I'm surprised by some of the issues reported here. I have started running Gnome recently. Everything looks pretty good, my imported fonts are displayed properly (and available) and the XftConfig file most definitely still applies. As far as installing fonts is concerned, I have found that KDE's font installer (yes, I know it is irritating to have to use it just for that) is quite excellent. It adds some nice XftConfig directives to deal with glyphs for special fonts such as WingDings, generates the necessary scale files, and creates Postscript font metric files, even for TT fonts. It puts the config file somewhere in your ~/.kde3 directory (can't remember because machine at work I'm using doesn't have KDE) but you can easily graft the XftConfig directives into your /etc/X11/XftConfig, and move the fonts to "/usr/X11R6/lib/X11/fonts/somedirectory". I imported my Windows fonts using that tool, and they look fine and dandy, and anti-aliasing does work. I've recently gone up to XFree 4.2.1, and I noticed the build bundles some extra TT fonts and now has a dependency on the ttmkfdir tool. I want to see if the ttmkfdir tool does everything as well as the KDE font installer tool does, because having KDE around just to install fonts is overkill :D

Another thing I discovered is that you need to have something like:
Code:
exec `/etc/X11/chooser.sh`

in your ~/.xinitrc or ~/.xsession file for the X startup process to obey your window manager choice in /etc/rc.conf! If you're running Gnome this is quite important, because it has quite a sophisticated startup script (/etc/X11/Sessions/Gnome) which is also responsible for enabling the GDK_USE_XFT option! If that doesn't get turned on then Gnome won't use Xft at all. Before I was just running "exec gnome-session" and wondering why my fonts weren't anti-aliased ...

Hmm, tried X without the bytecode interpreter - what a waste of time :lol:
Having put it to the test, I can definitely say that the bytecode interpreter makes things a lot better in terms of rendering TrueType fonts aliased at smaller sizes, although the hinting process is definitely some way from Window$ quality. Have yet to try the Xft quality patch on 4.2.1 though. Also tried the "official" Adobe Type1 fonts, took a long time to get them working and results weren't really any better than the built-in ones. It seems that Type1 font rendering is not too great in Freetype, although Ghostscript does a lovely job of printing them, of course. Look at Acrobat Reader to see what things could be like ... don't you just hate patents?

But, overally I'm getting more satisfied with the way things are looking. Most of the tricks are done in the XftConfig file. I might post mine once I've got it really good. And I would like to write a better guide for all of this in light of all the great new information we have here.

PS: I've put my fonts.conf and fonts.dtd up at these addresses for those who, for some reason, didn't get them. I'll put my XftConfig file up here some time soon as well. I'm not sure whether this new system is supposed to deprecate XftConfig or how these files are generated, more research needed here:

http://www.recruit2recruit.net/kerframil/fonts.conf
http://www.recruit2recruit.net/kerframil/fonts.dtd
Back to top
View user's profile Send private message
Carlo
Developer
Developer


Joined: 12 Aug 2002
Posts: 3356

PostPosted: Tue Oct 29, 2002 5:53 pm    Post subject: Reply with quote

Thanks for uploading the files.

In between I made emerge rsync && emerge -p xfree and voila:
Code:
Calculating dependencies ...done!
[ebuild  N   ] x11-misc/ttmkfdir-2.0
[ebuild   R  ] x11-base/xfree-4.2.1



Carlo
Back to top
View user's profile Send private message
buttholio
n00b
n00b


Joined: 30 Sep 2002
Posts: 11
Location: Warsaw, Poland

PostPosted: Tue Oct 29, 2002 8:43 pm    Post subject: Reply with quote

I'm just gonna add that enabling subpixel rendering (as FusionGyro suggested) made a world of difference. Now the fonts look gorgeous, even the very small ones get very nice AA, certainly on par with ClearType. I wish I could post some screenshots ...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 3 of 5

 
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