MichaelUmmels

For more information about myself, see my Launchpad page or my personal homepage.

QT3 font substitution

Since using Kubuntu for the first time, I had the problem that Chinese text was not rendered correctly in QT3 applications. This is due to QT's own font substitution mechanism, which apparently does not rely on fontconfig (see this bug report).

As a workaround, I wrote a Python script that emulates fontconfig's font substitution mechanism in QT3. The idea is to check for each font that exists on the system which fonts can be substituted for it using the fc-match command. A corresponding substitution entry is then written to the user's qtrc file. If the --system option is provided, the substitutions are written to the global qtrc file.

WARNING: The script will replace any existing font substitution in the qtrc file (e.g. ones written by the qtconfig tool). To keep the old substitutions, copy all entries in the [Font Substitution] section of the old qtrc file into the new one. A backup of the old qtrc file is saved under the name qtrc.old in the same directory where the qtrc file is located (i.e. $HOME/.qt or /etc/qt3 if you use the --system option).

You can find the script here: qtfonts.py

Update: This issue has been solved by a patch incorporated into Kubuntu 8.04 and later versions. Users of these versions of Kubuntu should not need the script.

Ubuntu Packages

Currently, I only provide one package: the cleveref package for intelligent cross-referencing with latex. Feel free to try it out (no warranty).

Package name

Version

File

latex-cleveref

0.8-0ubuntu1

latex-cleveref_0.8-0ubuntu1_i386.deb

If you have any comments or questions, don't hesitate to e-mail me.

MichaelUmmels (last edited 2008-10-23 20:49:50 by pD9EBD91D)