Flash and Fonts on Debian GNU/Linux

  |   Source

Who has had problems in seeing fonts in flash movies on Linux using Firefox?

Here is a solution, taken from lot of googleing and several suggestions:

  1. Install xfs package, that is the X Font Server;
  2. Install the msttcorefonts package, which contains the Microsoft fonts, used by most of the flash movies;
  3. Install the ttmkfdir package, which contains the ttmkfdir and mkfontdir utilities, which we will use later.

At this point, we can proceed:

  1. mkdir -p /usr/X11R6/lib/X11/fs/
  2. ln -s /etc/X11/fs
  3. cd /usr/share/fonts/truetype/msttcorefonts
  4. ttmkfdir
  5. mkfontdir

With the last two commands, we'll create two files in /usr/share/fonts/truetype/msttcorefonts/: fonts.dir e fonts.scale. Now we can edit the /etc/X11/fs/config file (or /usr/X11R6/lib/X11/fs/config, they're the same file, as we symlinked them), adding the path of the Microsoft fonts to the catalogue line. For example (your mileage may vary, since this line depends on which fonts you've got on your system) in the case you have:

catalogue = /usr/share/fonts/X11/misc/,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/100dpi/,
/usr/share/fonts/X11/75dpi/

you'll need to edit the line so as it becomes:

catalogue = /usr/share/fonts/X11/misc/,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/100dpi/,
/usr/share/fonts/X11/75dpi/,/usr/share/fonts/truetype/msttcorefonts/

(those paths should stay on a single line)

Now we can restart Firefox, and see our flash movies! ;)

This procedure works on Debian and Debian-based systems. It should nevertheless work also on other systems, paying attention to system path differences.

Comments powered by Disqus
Contents © 2013 David Paleino - Powered by Nikola