Showing posts with label xwindows. Show all posts
Showing posts with label xwindows. Show all posts

2008-06-09

Font substitution in X Windows

The font technology incorporated in graphics systems (MS Windows, X Windows, printing) is really complicated. As George Williams, FontForge creator, mentioned in an interview, he wasn't concious of all purposes of OpenType features (the fragment about Arabic characters in OpenType).

That is why I'm not surprised how though is to configure fonts in Linux properly. But I found a nice guide on Ubuntu Forum, which can be a how-to for all X Windows systems: HOWTO: Hoary ClearType-like fonts. Don't be confused - you can modify the guide according to your personal preferences, and you don't need to copy MS Windows behavior on your desktop :-)

Here is my ~/.fonts.conf:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
  <test compare="more" name="pixelsize" qual="any">
   <double>12</double>
  </test>
  <edit name="autohint" mode="assign" >
   <bool>true</bool>
  </edit>
</match>
<match target="pattern">
  <test qual="any" name="family">
   <string>Arial</string>
  </test>
  <edit name="family" mode="assign">
   <string>DejaVu Sans Condensed</string>
  </edit>
</match>
<match target="pattern">   <test qual="any" name="family">    <string>Helvetica</string>   </test>   <edit name="family" mode="assign">    <string>DejaVu Sans Condensed</string>
  </edit>
</match>
<match target="pattern">
  <test qual="any" name="family">
   <string>sans-serif</string>
  </test>
  <edit name="family" mode="assign">
   <string>DejaVu Sans Condensed</string>
  </edit>
</match>
<match target="pattern">
  <test qual="any" name="family">
   <string>Times</string>
  </test>
  <edit name="family" mode="assign">
   <string>AntykwaTorunska</string>
  </edit>
</match>
<match target="pattern">
  <test qual="any" name="family">
   <string>serif</string>
  </test>
  <edit name="family" mode="assign">
   <string>AntykwaTorunska</string>
  </edit>
</match>
<match target="pattern">
  <test qual="any" name="family">
   <string>monospaced</string>
  </test>
  <edit name="family" mode="assign">
   <string>Inconsolata</string>
  </edit>
</match>
<match target="pattern">
  <test qual="any" name="family">
   <string>Courier</string>
  </test>
  <edit name="family" mode="assign">
   <string>Inconsolata</string>
  </edit>
</match>
</fontconfig>


After this disposition, you won't see Arial any more. Even on font list in preferences window Arial is substituted to a font specified in your ~/.fonts.conf. And mplayer's subtitles also :-)

PS
Zygfryd Gardzielewski's Antykwa ToruĊ„ska from 1960:

2007-08-07

ubuntu wine fglrx "API ERROR"

After ATI driver update you cannot use WINE. In the console you can see a lot of "API ERROR"s. To solve it you have to replace libGL library for older version. Please download it from this location and copy it to /usr/lib. If you do not know how to paste file in restricted area, you can do it as root: open console (terminal), and enter command:

sudo cp /dir_where_the_file_was_downloaded/libGL.so.1.2 /usr/lib

It works immediately.
You may want to copy the file to safe name /usr/lib/libGL.so.1.2.good, and after the next ATI drivers update use your own copy.