Cooking up the Treats => General Development => Topic started by: caitlyn on February 04, 2008, 10:53:40 am

Title: fontconfig and font handling issue (VL 5.9 and moving forward)
Post by: caitlyn on February 04, 2008, 10:53:40 am
In VL 5.9 all the traditional X fonts are installed by default in VL 5.9 but only TTF and OTF fonts are enabled.  This is actually determined by the default /etc/fonts/fonts.conf file which is part of the fontconfig package.  I don't know if the decision to disable a bunch of installed fonts was made upstream (, Slackware) or by the VL developers but I suspect the former.  The issue is that the most popular Middle Eastern font packages (Hebrew, Arabic) are Type 1 fonts or other non-TTF/OTF fonts.  I believe this affects a number of Asian fonts as well.

For English and other languages using the Latin alphabet popular fonts like Courier, Bitstream Charter, and Helvetica are all disabled.  I should also note that the Cyrillic fonts directory (Russian and other Slavic languages) is also disabled leaving just a tiny subset of the Cyrillic fonts available in VL 5.8 enabled in 5.9.

My solution for the Culmus and El Mar (Hebrew) font packages and for some Arabic packages as well was to install a new /etc/fonts/conf.avail/51-local.conf file based on the local.conf file in the Culmus source code.  It re-enables Type 1 fonts and also enables the misc font directory for compatibility between the  various packages I am building.  The file is identical in each font package to insure that installing one package doesn't disable another.   The net result is that fonts like Courier, Bitstream Charter, and a few URW fonts also magically appear in applications if any of these font packages is installed.  If, for example, the culmus-fonts package is removed the Culmus fonts do disappear as they should but there is no mechanism for a return to the original /etc/fonts/fonts.avail/51-local.conf file so the Type 1 and misc fonts that came on the VL 5.9 iso remain enabled.  The VL/Slackware package management system has no capability to add an uninstall script AFAIK.

I think a much more elegant solution would be to enable all the traditional X fonts, the ones that have been around since I was knee high to a grasshopper, in our fontconfig package.  If the VL developers agree I'll volunteer to rebuild that package with the new fonts.conf file and rebuild the various fonts packages I've done so far.  If y'all want it the way it is I can easily write a font FAQ for those who need the disabled fonts and let my existing packages remain as is.

Code for the /etc/fonts/conf.avail/51-local.conf file I install follows:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file for local customizations -->
<!-- installed by Culmus-or El Mar fonts package -->
   <!-- Load local system customization file -->
   <include ignore_missing="yes">local.conf</include>
   <!-- Enable Adobe Type 1 fonts and miscellaneous fonts-->

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

Title: Re: fontconfig and font handling issue (VL 5.9 and moving forward)
Post by: uelsk8s on February 04, 2008, 11:06:42 am
I think that that rebuilding the fontconfig package would be the best solution.

Title: Re: fontconfig and font handling issue (VL 5.9 and moving forward)
Post by: caitlyn on February 04, 2008, 11:15:42 am
I'll go ahead and download the source and work on it.  If the consensus is to rebuild I'll be ready to go.  If that consensus ends up being status quo I'll have a nice package for my own system :)
Title: Re: fontconfig and font handling issue (VL 5.9 and moving forward)
Post by: fuelinux on April 08, 2008, 12:47:17 am
I'm on VL5.8. Will it be OK (from both, copyright and funcionality points of view) if I modify your script and put  /usr/X11R6/lib/fonts instead of /usr/share/fonts?
That's where VL5.8 keeps fonts and where I put Georgian fonts already (those from Georgian "section" at - click on Europe, then on the bottom of the page, BPG family of fonts). I think, they are ttf fonts since the extention is .ttf  ???

The point is that the system does show Georgian fonts, but strangely the chars are all in uppercase.

SOLVED - I was just missing Arial Unicode MS font