How to make LibreOffice 3.6 seeType 1 fonts under ubuntu/bodhi

I am using LibreOffice 3.6 on Bodhi Linux 2.0.1 (a ubuntu 12.04 derivative). All other applications on the system list and properly display/render my Type 1 fonts. LibreOffice does not display them in the dropdown list. Fonts are installed in /usr/share/fonts/Type1. Extensions (.pfb and .pfm) are all lower case.

How can I fix this?

I have an answer, though not a happy-making one. LibreOffice (at least 3.6 and 4.1) require the font’s .pfb and .afm files to be present. If you don’t have both, LibreOffice will not display the font in the font list. This is different to most other programs that are happy with only the .pfb. This requirement is verified by one of the LibreOffice developers in this LibreOffice Bugzilla bug comment.

There’s a relatively simple workaround, at least for Ubuntu and variants. Create afm files from your pfb files using fontforge.

  1. install fontforge using apt-get, synaptic or your favorite method
  2. Create a text file similar to the one in this example, section “Using Loops”. Replace “.ttf” with “.afm”
  3. Save the text file in the same directory as your .pfb files, with the name “CreateAfm”
  4. cd to the directory with your pfb files and execute fontforge and invoke the script using the command

sudo fontforge -nosplash -lang=ff -script CreateAfm *.pfb

This will create .afm files, based on your .pfbs. When the files are generated, force a complete rescan your font folder with the command

 sudo fc-cache -f -v

Related bug is fdo#70184 (although it is likely to be RESOLVED as NOTABUG). Note that Type 1 file requirements are:

  • Linux: pfb + afm (pfb can be pfa)
  • Mac: pfa + afm (+optional inf)
  • Windows: pfb + pfm

I have a quick fix. First, create a .fonts folder in your home directory. Then install the “gnome-font-viewer” in Synaptic, double click on the font you want to install, then click install. Voila! You should have it automagically appear in Libre Office.

this does not fix the problem. whether installed in the system font directory or /home/username/.fonts, the problem is the same. Whether installed manually or using gnome-font-viewer, the issue is the same.

Hi @tigerdog,

Are you still seeing the same problem when you test using the latest release?

If so, please file a bug about this problem, and provide a list of steps that can reproduce it. The QA team will be happy to help you track down this issue!

Please post a link to any bugs you file in a comment below using the format “fdo#123456”.

Thanks!

@jmadero.dev, you’re a Bodhi user, right? Any repro with Type1 fonts?

Yes, Bodhi user, currently running 2.4.0 with LO 4.1.3.2. Problem is still present. Seems to be a bug first reported over a year ago. See fdo#37453

I am currently running Bodhi 2.4.0 but see the same behavior under Xubuntu 12.04. Last tested using LibreOffice 4.1.3.2. Sadly, still no luck. I am reasonably certain the Type 1 fonts are installed correctly by the system. They are seen and usable from other applications including Leafpad and Abiword. Only LibreOffice (and OpenOffice, when I tried after writing this post) have this issue.

@jmadero.dev, yes, I use Bodhi but also Xubuntu. Same problem exists in both. New TrueType fonts are recognized by LibreOffice and other system apps. Type 1 fonts are not seen by LibreOffice. Other apps (leafpad, Abiword) detect and properly display added Type 1 fonts.

FWIW, this problem does not occur with LO under Win7. Type 1 fonts added to Win7 are correctly detected and displayed in both MSOffice and LibreOffice.

BTW - I apologize for leaving this thread dormant for so long; I hope someone has found the issue and can guide me.

see my answer below. For some unspecified reason, LibreOffice requires both the .pfb and corresponding .afm file before it will display a font. Other Ubuntu apps only require the .pfb.