Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Mini-HOWTO] X.org & font
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Sun Nov 21, 2004 8:24 pm    Post subject: Reply with quote

Hi all,

I just followed this guide and it seems to have worked. The only mystery is why I get the following error messages in my Xorg error log file:

Code:

Could not init font path element /usr/share/fonts/local/, removing from list!
Could not init font path element /usr/share/fonts/encodings/, removing from lis$
Could not init font path element /usr/share/fonts/util/, removing from list!


The directories in question are there and I've tried mkfontdir, but I still get the errors. Any idea of what else I can try?

Best,

Alex
Back to top
View user's profile Send private message
molecularbear
n00b
n00b


Joined: 24 Mar 2004
Posts: 22

PostPosted: Mon Nov 22, 2004 6:35 am    Post subject: Reply with quote

Well, I've spent a good portion of the day researching font issues and have ended up a bit better than when I began. What would be great is if Gentoo would put out a definitive guide to fonts. Font issues appear to be somewhat complicated, especially for something that one would think would be fairly simple. I don't even understand the need for XFS. If you want to use XFS, you specify:
Code:
FontPath  "unix/:-1"

in xorg.conf and comment out the other FontPath lines. Then you specify all the font paths in /etc/X11/fs/config. If you don't want to use XFS, you leave that line commented out and specify all your FontPaths within xorg.conf. Whether I used XFS or not seemed to have little bearing on the crappiness of my fonts.

I am still confused by the need to specify fonts at all in /etc/X11/ when /etc/fonts/fonts.conf seems to do this already. The HOWTO that started this thread adds further confusion by telling you to add a bunch of paths to /etc/fonts/local.conf. But one of the directories specified in my /etc/fonts/fonts.conf is /usr/share/fonts. From what I could tell, fc-cache examines all subdirectories of the directories given in /etc/fonts/fonts.conf. If I add those paths given in the HOWTO, it examines the directories twice. So I think those changes to local.conf given in the HOWTO are not needed.

Another thing that confuses me about the HOWTO is that it tells you to restart XFS. But the author's xorg.conf shows that XFS is not being used. Therefore restarting XFS would accomplish nothing, correct?

I managed to get a nicer font for Konsole simply by changing the font with Settings->Font. I got Opera looking a little nicer by changing the fonts from within the application, getting some ideas from this thread.

Again, it would be really great if someone who had a deep understanding of fonts on Linux would post an explicit document on the subject. I am assuming that the default font values for KDE applications, Opera, Firefox, etc are not ugly and difficult to read. If that assumption is correct, then these applications should look good in a properly configured system.
Back to top
View user's profile Send private message
sl70
Guru
Guru


Joined: 18 Jun 2002
Posts: 449
Location: Saitama, JP

PostPosted: Fri Nov 26, 2004 5:46 pm    Post subject: Reply with quote

I followed this HOWTO and now my fonts look beautiful, but the problem now is that when I try to print from Firefox, the browser crashes with a segfault, and I get no output. I have a feeling that it's a fonts permission thing, since I can print fine as root. I went through all the /usr/share/fonts directories and all the font files are either 644 or 444. I can't figure it out. Can anyone help?

Tnx.
Back to top
View user's profile Send private message
sl70
Guru
Guru


Joined: 18 Jun 2002
Posts: 449
Location: Saitama, JP

PostPosted: Fri Nov 26, 2004 6:55 pm    Post subject: Reply with quote

Well, it's not a permissions problem, since I can print as another regular user. It must be my individual setup. Grrrrrrrr. This is so frustrating. :x
Back to top
View user's profile Send private message
sl70
Guru
Guru


Joined: 18 Jun 2002
Posts: 449
Location: Saitama, JP

PostPosted: Fri Nov 26, 2004 7:56 pm    Post subject: Reply with quote

So, I created a new profile in firefox and now I can print ok, but my fonts don't look as good as before. Back to work....
Back to top
View user's profile Send private message
F.Ultra
Apprentice
Apprentice


Joined: 17 Mar 2004
Posts: 169
Location: Sweden

PostPosted: Mon Nov 29, 2004 9:34 pm    Post subject: Reply with quote

Quote:
I am still confused by the need to specify fonts at all in /etc/X11/ when /etc/fonts/fonts.conf seems to do this already
I think that it has to do with old applications that read the X11 file directly vs newer applications that use some new fancy API for fonts.
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Wed Dec 08, 2004 4:09 am    Post subject: Reply with quote

this whole thing has me completely turned around too. what the guide says not only contradicts itself, but it contradicts the version in the wiki (http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts). the wiki seems more up-to-date but it's still a puzzle.

one thing that seems important is the order the fonts dirs are listed in xorg.conf. like if Type1 and TTF both have a version of the same font, whichever one that comes first in xorg.conf is the one it uses. that's just my guess, but it seems i can change the appearance of my menu and terminal font by changing the order.

also, freetype's webpage says it does both truetype and Type1 fonts, so why do we also load the Type1 module in xorg.conf? or should we not be doing that?

something tells me tonights going to be a google night. =/
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Wed Dec 08, 2004 8:10 am    Post subject: Reply with quote

well it took me a while, but i finally got it worked out. i can't believe how much nicer everything looks now.

i kinda used a combination of this guide, the wiki guide, a bunch of old XFree HOWTO's i found on TLDP.org, and a few pages from the four corners of the net.

i don't have everything set-up exactly right yet and i want to do a bit more research and trial and error work first before i post a quick walkthrough of what i did. in the meantime, these will put anyone on the right track:

http://www.tldp.org/HOWTO/Font-HOWTO/index.html

http://www.tldp.org/HOWTO/FDU/index.html

they're both pretty outdated, but still good. the first explains everything about fonts and X, and the second is a guide to deuglifying XFree. the latter was hugely helpful. i'm seriously considering bringing it up to date, maybe rewrite it for Gentoo and putting it on the wiki or submitting it as a Gentoo Font Guide. :D
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Thu Dec 09, 2004 3:46 am    Post subject: Reply with quote

here's what i ended up with in my xorg.conf fontpath in the end.

Code:
        FontPath        "/usr/share/fonts/ttf-bitstream-vera"
        FontPath        "/usr/share/fonts/TTF"
        FontPath        "/usr/share/fonts/Type1"
        FontPath        "/usr/share/fonts/lfp-fix"
        FontPath        "/usr/share/fonts/corefonts"
        FontPath        "/usr/share/fonts/terminus"
        FontPath        "/usr/share/fonts/artwiz-aleczapka-en
        FontPath        "/usr/share/fonts/artwiz"
        FontPath        "/usr/share/fonts/misc:unscaled"
        FontPath        "/usr/share/fonts/75dpi:unscaled"
        FontPath        "/usr/share/fonts/100dpi:unscaled"
        FontPath        "/usr/share/fonts/misc"
        FontPath        "/usr/share/fonts/75dpi"
        FontPath        "/usr/share/fonts/100dpi"


left local.conf alone, edited .font.conf to turn AA and autohinting on. never looked better.


Last edited by rhill on Mon Dec 13, 2004 8:01 pm; edited 1 time in total
Back to top
View user's profile Send private message
Quantum Skyline
n00b
n00b


Joined: 20 Apr 2003
Posts: 20

PostPosted: Sun Dec 12, 2004 4:25 pm    Post subject: Reply with quote

Thanks for the howto! Now I have an answer to Cleartype.
_________________
Everybody has their moments of insanity. Some just have more than others.
Back to top
View user's profile Send private message
Corona688
Veteran
Veteran


Joined: 10 Jan 2004
Posts: 1204

PostPosted: Sun Dec 12, 2004 8:04 pm    Post subject: Reply with quote

This howto was really useful. Everything's antialiased now :D Couple things:

  • You don't need to edit the firefox user preferences file manually -- just type "about:config" in your address bar and you can modify the same settings there.
  • If your font sizes seem to change randomly, X probably can't make up it's mind about how big your screen is. Specify it manually in your "Monitor" section like this and your fonts will change size no more:
    Code:
    Section "Monitor"
        Identifier "Dell"
        VendorName "Plug'n Play"
        ModelName "Dell D1025TM"
        HorizSync 30-85
        VertRefresh 50-120
    # DisplaySize WIDTH_IN_MM HEIGHT_IN_MM
        DisplaySize 434 406
    EndSection

  • Under KDE, also head to Control Center -> Appearances and Themes -> Fonts, and check "Use anti-aliasing for fonts".

_________________
Petition for Better 64-bit ATI Drivers - Sign Here
http://www.petitiononline.com/atipet/petition.html
Back to top
View user's profile Send private message
robet
l33t
l33t


Joined: 06 Sep 2004
Posts: 807
Location: Earth/NorthAmerica/USA/NY

PostPosted: Thu Jan 06, 2005 6:34 pm    Post subject: Reply with quote

I don't think you even have to do anything w/ Firefox after following the steps and restarting X. It just became beautiful on it's own.
_________________
no software patents in europe! | adopt an unanswered post.
Back to top
View user's profile Send private message
ursusarctos
n00b
n00b


Joined: 19 Jan 2004
Posts: 47
Location: Chicago, IL, USA

PostPosted: Wed Jan 12, 2005 11:30 pm    Post subject: Reply with quote

After setting the fontpaths in xorg.config, my terminals no longer display in color properly. Xterm opens, but will not show green or red, giving this error message:
Code:

xterm: Cannot allocate color green


Aterm will not even start, giving the message
Code:

aterm: can't load color "Black", colorID = 0, (29)
aterm: can't load color "Black", colorID = 0, (29)
aterm: aborting


I've been using xterms without color, but this isn't a very good solution. Any suggestions on how to fix? Feel free to move discussion to another topic so that the howto doesn't get cluttered....
Back to top
View user's profile Send private message
converter
Apprentice
Apprentice


Joined: 24 Dec 2002
Posts: 163

PostPosted: Sat Jan 15, 2005 11:06 pm    Post subject: Reply with quote

ursusarctos wrote:
After setting the fontpaths in xorg.config, my terminals no longer display in color properly. Xterm opens, but will not show green or red, giving this error message:
Code:

xterm: Cannot allocate color green


Aterm will not even start, giving the message
Code:

aterm: can't load color "Black", colorID = 0, (29)
aterm: can't load color "Black", colorID = 0, (29)
aterm: aborting


I've been using xterms without color, but this isn't a very good solution. Any suggestions on how to fix? Feel free to move discussion to another topic so that the howto doesn't get cluttered....


Is there an "RgbPath" entry in your X config file? Mine looks like:

Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
...

Does /usr/X11R6/lib/X11/rgb.txt exist?


From the xorg.conf man page:

Code:

       RGBPath "path"

              sets  the  path name for the RGB color database.  When this entry is not specified in the config file, the
              server falls back to the compiled-in default RGB path, which is:

                  /usr/X11R6/lib/X11/rgb

       Note that an implicit .txt is added to this path if the server was compiled to use text rather than binary format
       RGB color databases.

_________________
converter
Back to top
View user's profile Send private message
chuliomartinez
n00b
n00b


Joined: 25 Dec 2004
Posts: 30
Location: Event horizont

PostPosted: Sun Jan 16, 2005 10:08 am    Post subject: xfs Reply with quote

The xserver (xorg or xfree it doesn't matter) use their own freetype lib. E.g. don't link to the freetype2 lib. Sure it is the same code but probably older than the current freetype version and compiled with flags you cannot alter without compiling the xserver. So it is in my opinion better to use the xfs which DOES link to freetype, thus having better rendering with every new freetype version:) For example if you want byte code interpreter you have to compile freetype with a special option.
_________________
naked&dead
Back to top
View user's profile Send private message
drphibes
Guru
Guru


Joined: 30 Nov 2004
Posts: 432

PostPosted: Wed Feb 09, 2005 12:45 am    Post subject: Re: xfs Reply with quote

chuliomartinez wrote:
The xserver (xorg or xfree it doesn't matter) use their own freetype lib. E.g. don't link to the freetype2 lib. Sure it is the same code but probably older than the current freetype version and compiled with flags you cannot alter without compiling the xserver. So it is in my opinion better to use the xfs which DOES link to freetype, thus having better rendering with every new freetype version:) For example if you want byte code interpreter you have to compile freetype with a special option.

While it's true that loading the module "freetype" will cause the X server to load its built-in version of freetype, it won't be used.
Code:
$ grep -i freetype /var/log/Xorg.0.log
(II) LoadModule: "freetype"
(II) Loading /usr/X11R6/lib/modules/fonts/libfreetype.so
(II) Module freetype: vendor="X.Org Foundation & the After X-TT Project"
(II) Loading font FreeType

The reason is simply that the freetype package emerged separately is installed to /usr/lib and this path will have precedence over the path /usr/X11R6/lib/modules/fonts/. You can verify this by using ldd to display the libaries used by any program that requires some font rendering, e.g.
Code:
$ ldd `which xclock`| grep freetype
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7f3a000)

The only way that the Xorg version of freetype 2 will be used is if you go out of your way to re-arrange the paths ld.so uses to search for libs, or if some application happened to have been built with an rpath directive to the linker forcing it to use that lib, or, finally, if you delete the separate freetype package (which you do not want to do of course).

If you have freetype installed separately, there is absolutely no reason to load the module "freetype" in your xorg.conf -- it won't be used.

doc
Back to top
View user's profile Send private message
chuliomartinez
n00b
n00b


Joined: 25 Dec 2004
Posts: 30
Location: Event horizont

PostPosted: Wed Feb 09, 2005 12:52 pm    Post subject: One question Reply with quote

Ok please correct me if I'm wrong.
1. Application ask xserver or xfs to render the fonts for them?
- or do they ask freetype directly? (don'y thing so)
- how does an app know whenether to ask xfs or xserver for fonts.
(does x delegate these calls if xfs is running thus making it transparent to the apps?)
2. Xserver will use any freetype lib it finds first?
(ok you already answered this one)

I would love to know more about the font handling (and don't feel like inspecting source right now:) so please share with me:)
_________________
naked&dead
Back to top
View user's profile Send private message
drphibes
Guru
Guru


Joined: 30 Nov 2004
Posts: 432

PostPosted: Thu Feb 10, 2005 2:09 am    Post subject: Reply with quote

whether or not xfs is running is completely transparent to the application. most modern x applications use higher-level toolkits to display widgets (e.g. gtk+) and fonts (e.g. pango) and don't call freetype directly.

http://www.freetype.org/david/unix-font-rendering.html#x11-render
Back to top
View user's profile Send private message
Zarhan
l33t
l33t


Joined: 27 Feb 2004
Posts: 996

PostPosted: Fri Mar 18, 2005 6:46 am    Post subject: Reply with quote

As of xorg 6.8.2 at least, ttf-bitstream-vera fonts are now included with xorg, so no need to install them separately anymore.
Back to top
View user's profile Send private message
Apreche
Guru
Guru


Joined: 18 Sep 2003
Posts: 506
Location: Beacon, NY

PostPosted: Sun Sep 04, 2005 4:23 am    Post subject: Reply with quote

I just did this howto and I can say that it definitely made a huge difference. On my LCDs all the fonts look great.

However, I have a problem still. In some places, like (g)vim and terminals I use very small monospaced fonts for programming and such. Specifically fonts like the proggy are destroyed by the configuration in this howto. I have these fonts downloaded and stored in ~/.fonts and I can use them just fine. But th ey are all deformed and ugly as sin. How can I configure xorg to not uglify these fonts?
Back to top
View user's profile Send private message
MattSharp
Apprentice
Apprentice


Joined: 15 Aug 2003
Posts: 258

PostPosted: Mon Nov 07, 2005 11:00 pm    Post subject: Reply with quote

Great how-to but I am having a couple of problems.

1). In Konsole, using Bitstream Vera Sans Mono, the right side of "m" disapears, so it looks like an "n" overlapped with an "r" if that makes any sense. That is using size 10. If I increase to 11, problem is solved.

2) In Firefox, with fonts smaller than 9 (and to a lesser extent fonts that are size 9) the letters are too close together and it doesn't look very good. Has anyone seen this?
Back to top
View user's profile Send private message
ilm
Guru
Guru


Joined: 29 Jun 2006
Posts: 310
Location: Brisbane, Australia

PostPosted: Sun Aug 20, 2006 9:49 am    Post subject: Reply with quote

I'm hoping someones still watching this thread!!! :wink:

Anyway, I tried to follow the HowTo, but I seem to be missing something:

1) In terms of USE flags, I already had a truetype flag. Is this the same as truetype-fonts???

2) I have no /etc/fonts/local.conf file in my system :?

3) I had no font paths in my /etc/X11/xorg.conf file, so am unsure of where to place these lines

4) I also have no ~/.fonts.conf, so am not sure how to set up antialiasing, etc.

However, the fonts all seem to work. :?

On a side note, am I required to have xfs running???

Hope someone can help!!!!!!
Back to top
View user's profile Send private message
Hijacker
n00b
n00b


Joined: 03 Jul 2006
Posts: 17

PostPosted: Thu Mar 29, 2007 10:42 pm    Post subject: Reply with quote

Hey all,

I followed the Guide and got fancy AA running everywhere, on all apps now. Looks great =)

But still, there's one app which refuses to apply anti aliasing. This is Zend Studio, the PHP framework. This is running off of java... are there some special settings I might have to check, when running Java applications? Or is that the wrong direction?

If anyone got a clue what I could adjust to get AA working with Zend Studio, I'd be glad if you told me :)

Thanks,
Hijacker
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
Page 4 of 4

 
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