Monday, October 17, 2011

Broken symbol.ttf on Ubuntu

Having weird ``infinity'' symbols for bullets when opening some PDF on some flavour of Ubuntu? It turns out it has to do with a bug with the symbol.ttf font. Here's how to rectify it (as gotten from here).
  1. If you don't have fontforge, install it first with
    sudo apt-get install fontforge
  2. Open up symbol.ttf in fontforge. On my system, it is located at /usr/share/fonts/truetype/ttf-symbol-replacement/symbol-replacement.ttf/symbol.ttf
  3. In fontforge, apply Encoding->Force Encoding->Symbol, followed by Encoding->Macintosh Latin, and then File->Generate Fonts... (set to Truetype), ignoring warnings and save.
  4. Remove the old symbol.ttf and copy the new version back into the same location, probably as root.
  5. Run the following command:
    sudo fc-cache -v
At this point, the mapping of the glyphs for symbol.ttf should be correct and all the weird display bugs should be gone.

No comments: