Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Notifications
Mark all as read
Q&A

Scalable fonts are not loaded into the X server database

+2
−0

I have some old X11 applications complain that they cannot find a ISO8859-2 font. So I executed

grep -r 8859-2 /usr/share/fonts/

and, to my surprise, found many matches, for example

==> /usr/share/fonts/dejavu/fonts.dir <==
DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-2
DejaVuSansCondensed-Bold.ttf -misc-dejavu sans condensed-bold-r-semicondensed--0-0-0-0-p-0-iso8859-2
DejaVuSansCondensed-BoldOblique.ttf -misc-dejavu sans condensed-bold-o-semicondensed--0-0-0-0-p-0-iso8859-2

==> /usr/share/fonts/unifont/fonts.dir <==
unifont.ttf -misc-unifont-medium-r-normal--0-0-0-0-p-0-iso8859-2

The same lines are also present in the respective fonts.scale file.

However, Xlsfonts finds no such fonts,

$ xlsfonts -fn '-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-2'
xlsfonts: pattern "-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-2" unmatched
$ xlsfonts -o -fn '-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-2'
xlsfonts: pattern "-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-2" unmatched
$ xlsfonts -fn '*-iso8859-2'
xlsfonts: pattern "*-iso8859-2" unmatched

even though /usr/share/fonts/dejavu is in the font path as per xset q.

I followed Arch Wiki: X Logical Font Description closely, but I just don't get the expected result. What am I missing?


Since those scalable fonts are .tff, while the classic bitmap ones are .pcf, I looked for more information on Truetype fonts and found several references (1, 2, 3) that suggest to add the freetype module to /etc/X11/xorg.conf:

Section "Module"
    Load "freetype"
EndSection

I did so and restarted the X server, but still no scalable fonts.

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+1
−0

Further digging led me to this post on the FreeBSD forum, in which a user says that

The functionality of the freetype module is contained in the libXfont library.

And sure enough I managed to get scalable XLFDs by enabling the truetype USE flag for libXfont2 and recompiling it.

The effect of the flag, "use media-libs/freetype [another package] for font rasterization", indicates that rendering a Truetype core font is nowadays outsourced to another piece of software. This is reinforced by some reports (1, 2) that the module got removed from Xorg; Indeed, the freetype module line in xorg.conf seems to do nothing at all and I deleted it without any noticeable effect.

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »