Talk:HOWTO Xorg and Fonts
From Gentoo Linux Wiki
[edit] Can the howto include an explanation using eselect fontconfig?
I've noticed, several settings for fonts can be done by using eselect fontconfig ..., which I think of the more convenient way.
[edit] Is 'type1' still part of USE flags?
the text states...
# euse --enable truetype type1
however, i believe 'type1' is no longer a valid USE flag.
[edit] Error in the bindist use flag explanation ?
the text says
If you live in a country where software patents are not an issue (or you interpret the possible patent issues as unlikely, since Apple knows about FreeType and hasn't filed a lawsuit), you can enable the BCI by disabling the 'bindist' USE flag.
USE=-bindist emerge freetype
It sould say you should enable the bindist flag, right ? It should also say to add the USE flag to the /etc/portage/package.use file adding the line (as opposed to the dirty command line option :)
media-libs/freetype bindist"
Arnaud: April 14th, 2006
Answer: The line from the ebuild is:
use bindist || append-flags -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
So the text seems correct as-is.
Question? The line from the ebuild is:
I actually think it should be +bindist as well... the fonts look a lot better with bindist and the gentoo documentations says that's what it's used for and so does this
[1]
Answer: No, the bindist USE flag is used for when you want to distribute the resulting binary. Ie. it turns off things that cannot be distributed because of licensing issues. The bytecode interpreter is disabled when USE="bindist", and the autohinter is used instead. Your preference may vary, but the autohinter is generally considered poopy.
In short, for nice fonts, disable the bindist USE flag. dirtyepic 02:55, 17 September 2007 (UTC)
In newer systems there is no more /etc/fonts/local.conf file. I think.
Answer: It is still read. See /etc/fonts/conf.avail/51-local.conf. Remember that it is overridden by ${HOME}/.fonts.conf, which the KDE/GNOME font preferences generally save their settings. dirtyepic 02:55, 17 September 2007 (UTC)
Very nicely done BUT how do I turn OFF anti-aliasing in Thunderbird and Firefox? Though, I know it is tempting to say "just do the opposite," it's difficult to figure out what the opposite is.
- My previous firefox build (probably 1.0.6-r4) was sensitive to GNOME font antialising preferences (gnome-control-center -> fonts), but since I have updated to 1.0.6-r5 has always antilaliased fonts regardless GNOME font settings, unfortunately. Maybe I'm doing something wrong. Mykhal 15:32, 17 October 2005 (GMT)
I just finished editing some more things and correcting some minor mistakes. I also uploaded two example pictures illustrating config.. However, I don't know how to make the pictures correctly sit under the intended category. Anybody want to help?
--Hechacker1 07:54, 4 Aug 2005 (GMT)
I hope nobody minds, but I am currently editing this document. Please read over my changes and correct any mistakes. Thanks -HecHacker1 August 3, 2005
Thank you for the good article!
can you update it with information about font server (xfs, xfstt, xfsft)
and some related patches from http://www.cs.mcgill.ca/~dchest/xfthack/ and in this post
D'mitri
I'll try to do this, but at the moment I can't because I'm going on holidays. At my return I'll certainly do that, I found the link about xft hack very interesting.
solka
For most users, the XFS Font Server is unneeded. Just so you guys know. --Exdaix 19:21, 4 Jul 2004 (GMT)
Hi, I followed the instructions exactly as in the mini-HOW-TO, but now I am having problems with my console within Gnome 2.6. Because of the new font when I type 'emerge' it looks like 'energe' as there seems to be odd spacing between the letters... Can anyone suggest what might be doing this?
I don't see how emerging firefox with USE=nomozxft would help. nomozxft would deactivate antialiasing. Dgrant 10:04, 10 Sep 2004 (GMT)
- I've tried emerging firefox with the flag enabled and disabled, and definitely, you need to have it disabled for nice fonts and antialiasing. Dgrant 00:15, 3 Oct 2004 (GMT)
I question whether adding all the <dir>s to /etc/fonts/local.conf is necessary Dgrant 10:10, 10 Sep 2004 (GMT)
- It isn't necessary. /etc/fonts/fonts.conf already contains the directory /usr/share/fonts, and fontconfig will search recursively through the subdirectories there. So no modification of local.conf is required, unless you want to put some of the changes from ~/.fonts.conf there so that all users will have them.
---
Hi, I do not understand your xorg.conf example. the HowTo says restart xfs but you do not use the unix socket port (-1) in xorg.conf, so seems to me xfs is not used in your example... it is not needed.
Thanks for the page. I have two problems with firefox.
1. When I add /usr/share/fonts/ttf-bitstream-vera to font.directory.truetype.1, exit firefox, and restart it, printing is ruined. Specifically, after it prepares the page, firefox crashes and nothing is printed. I tried instead adding /usr/share/fonts/TTF to font.directory.truetype.1 and again firefox crashes with nothing printed.
2. The result with the default font bitstream vera serif size 16. Here is an example. http://cs.nyu.edu/~gottlieb/bad-font-rendering.png
The main culprit is lower case "t" which is too far left. Indeed the pair "at" is especially bad as the "t" is on top of the right part of the "a".
I have tried both settings for "always use my fonts".
I have tried commenting out TTF from the font list as seen on a mailing list.
Neither helped the appearance.
It is much better with other fonts and is better with different sizes.
Thanks in advance for any help.
[edit] Better fonts in KDE
A tip I thought I'd share
If you go into kde control center->System Administration->Font Installer->Administrator more
Right click 100dpi and 75dpi, and disable them. I found this has a dramatic impact on rendering of pages in Konqueror, because disabling the above forces the loading from the truetype folders instead. If they are not disabled, the font's are found in the folders above which are not truetype, and are really rough in comparison.
i rewrote the xorg.conf part of the howto. comments/flames are welcome. does anyone know what the CID and Speedo dirs are actually for or are they there for historical reasons or something? --dirtyepic 06:52, 31 Jan 2005 (GMT)
- Can you say which part of xorg.conf these additions are supposed to go in? is it Section Files?
[edit] Firefox option "Always use my fonts" should be ticked
Just a note. I find my fonts are 100 times better if you force FF to use your specified Bitstream vera fonts.
[edit] Font DPI
Is there a way of controlling the DPI of fonts at the level of the X server, for X will sometimes start at inconsistent DPIs (e.g., I have seen it fluctuate between 75dpi, where I want it for this screen, and 111dpi)?
Answer: see http://process-of-elimination.net/wiki/Control_Font_DPI_in_X So you have to force gdm/kdm/xdm to use a specific dpi. For KDE the trick was following: "In the file /usr/kde/3.x/share/config/kdm/kdmrc, ServerArgsLocal must have -dpi 96 appended to it." This finally solved all the issues I'd been having with my Firefox rendering pages in stretched way. ]
Why mention that 96 DPI thing while there are almost no monitors capable of it ? IIRC a 19" at 1280x1024 is in the range 80-90 DPI. That'd mean that while Mac OSX and Windows can do proper font rendering, X can't...
From what I understand, 96 or 100 DPI is normal. Anything less is, well, less than desirable, and anything more is certainly possible. E.g.: my 21" monitor at 1600x1200 is ~100 DPI. Considering the monitor goes up to 2048x1536, there is definitely a need to be able to set DPI well above 100 (to 128 in the extreme case here).
As a matter of correctness, should this be about pixels per inch (PPI), not DPI?
Neither 96 nor 100 DPI is "normal". A typical LCD with 1280x1024 at 19" has 86 DPI. Your 21" screen has ~95 DPI. Only a 17" at 1280x1024 reaches the 96 DPI mentioned here.
[edit] Size problems
I've added the size problems section with something from my experience. There can be a better method, indeed. I've taken some parts from http://convexhull.com/mandrake_fonts.html --knefas 19:30, 21 August 2005 (GMT)
[edit] Another way ?
I've always found the best fonts to be when using xfce4.
With other wms (pekwm in my case) I appeared not to get anti aliased fonts at all. Turning on autohinting helped a bit but they were still ugly.
I've finally found the solution!
Firstly remove the auto hinting stuff from /etc/fonts/local.conf or similar.
Then in ~/.Xresources put:
Xft.antialias: 1 Xft.hinting: 0 Xft.hintstyle: hintnone Xft.rgba: none
and in your ~/.xsession (if you are using that to launch your wm, as I do) put
export GDK_USE_XFT="1" xrdb -nocpp -merge ~/.Xresources
then the commands to launch your window manager and any other programs.
This worked perfectly for me.
Cornet
[edit] LCD Example Config
It produces the follwing warnings with current Gentoo/SELinux system:
Fontconfig warning: "~/.fonts.conf", line 37: unknown element "selectfont" Fontconfig warning: "~/.fonts.conf", line 38: unknown element "rejectfont" Fontconfig warning: "~/.fonts.conf", line 39: unknown element "pattern" Fontconfig warning: "~/.fonts.conf", line 40: unknown element "patelt"
Cinquero
[edit] Firefox Rendering Bug
See http://forums.gentoo.org/viewtopic-t-461070-highlight-.html.
Cinquero
[edit] This article misses the main point
<match target="font"> <edit name="antialias" mode="assign"><bool>true</bool></edit> <edit name="hinting" mode="assign"><bool>true</bool></edit> </match>
You will not get any results without putting this into /etc/fonts/local.conf
[edit] libXft patching?
So the article mentions patching libxft to get fonts that can look as good as... But no mention about this? Any details?
