LibreOffice 5.3+ vs. Adobe Type 1 Fonts

LibreOffice from 5.3 onward (Xubuntu 18.04 uses LO 6.0) no longer supports Adobe Type 1 fonts, which comes as a surprise to those of us who actually bought fonts, back in the day, and have been using them ever since. Apparently, Windows dropped Type 1 font support some time ago.

Based on some hints, I set up the Adobe Font Development Kit for OpenType. It’s a Python thing, preferably running in a virtual environment to avoid screwing up the rest of one’s system with bizarre dependencies. It seems one (“I”) must not update pip using pip after installing python-pip using apt-get; recovering from that mess was good for another hour of flailing.

The default AFDKO installation spat out an error message about ufolib (I am not making this up) being at 2.1.1, instead of the required 2.3.1. In for a penny, in for a pound, I updated ADFKO with the “prerelease” option:

pip install -U afdko --pre

Which fetched ufolib 2.3.1, apparently from wherever Python keeps its prerelease stash. I have NFC what’s going on with any of this.

An Adobe blog post on the AFDKO tx tool suggested it can convert Type 1 fonts to CFF (a.k.a. Adobe Type 2) fonts and some poking around suggested CFF also figures in OTF fonts.

tx -cff -n -N -A awb_____.pfb
--- Filename: awb_____.pfb
--- FontName: ACaslon-Bold
tx: --- awb_____.pfb
tx: (cfw) unhinted
tx: (cfw) unhinted
tx: (cfw) unhinted
tx: (cfw) unhinted
tx: (cfw) unhinted
tx: (cfw) There are 222 additional reports of 'unhinted'.

The -A option replaces the bizarre Adobe 8.3 file names with actual font information:

awrg____.pfb ⇒ ACaslon-Bold.cff
awbi____.pfb ⇒ ACaslon-BoldItalic.cff
awi_____.pfb ⇒ ACaslon-Italic.cff
awrg____.pfb ⇒ ACaslon-Regular.cff
awsb____.pfb ⇒ ACaslon-Semibold.cff
awsbi___.pfb ⇒ ACaslon-SemiboldItalic.cff

Regrettably, CFF files don’t actually work as fonts, at least as far as LibreOffice 6.0 (or whatever it uses as a font engine) is concerned.

Although it’s possible to convert fonts locally with fontforge, doing it one-by-one is tedious and the learning curve for its Python scripting feature seems rather steep. I fired the most vital fonts at Convertio, an online converter running fontforge in the background, got a matching pile of OTF fonts, and installed them in /usr/share/fonts/custom/type1 to indicate their heritage.

Whereupon LO rammed into a problem I’d had before. The solution this time required sorting the various Caslon and American Typewriter fonts into different “font families” and forcing the TTF names to match their new families. The difference between Medium and Regular seems to have Gone Away.

I should just use Comic Sans and be done with it …


  1. #1 by Jason Doege on 2018-09-13 - 10:53

    I think this is why containers like Docker are all the rage, now.

    • #2 by Ed on 2018-09-13 - 13:29

      Dunno how jamming everything in a tarted-up VM would change the outcome, as the real problem boils down to not supporting an (admittedly) old font format. I’m not in love with LO 5.whatever, updating to LO 6.whatever makes sense, and I wish they’d help folks bulk-convert fonts as needed.

      But, eh, perhaps somebody else can benefit from my fumbling around.

      • #3 by RCPete on 2018-09-13 - 15:11

        I just upgraded to LO 6.1. Slackware offers a source compile, but after several hours of trundling, the build blew up on a call for some graphics elements. Guess somebody missed something in the dependencies. I went back and got the .rpm, uninstalled 5.x (recommended in the source build README) and had Slackware do the conversion to tgz. Seems to work fine, with a few more shiny bits around the workspace. It’s been a couple of simple spreadsheets, a letter and an envelope, but so far, so good.

      • #4 by Jason Doege on 2018-09-14 - 11:00

        I just meant setting up the tool for you to convert your font. All the dependencies can be satisfied in a distributed container for you to use to convert your fonts. If, that is, someone had created such a container. I prevents you from having to configure your system appropriately to run a particular app. BTW, I hate hate hate dependency hell.

        • #5 by Ed on 2018-09-14 - 12:43

          Ah, I get it now!

          I recently ran something tucked in a snap, which turned out to be unable to write files outside my home directory. That’s apparently a feature, not a bug, which pretty much killed off my interest in using the thing; all my files reside on a server well outside my home directory and creating a myriad symlinks seemed fraught with peril.

          I’m approaching the thick edge of the wedge with terrifying speed …

  2. #6 by scruss2 on 2018-09-13 - 16:09

    The fontforge script example is literally a couple of lines, and is at the top of this tutorial:
    I changed it to write OTFs, which are much more akin to the PFA/PFB originals than TTF.

    • #7 by Ed on 2018-09-13 - 18:29

      Yeah, for folks like you with weakly godlike powers. I looked at the scripting doc, (mis)concluded the old style was deprecated / defunct, didn’t want to even think about figuring out the Python interface, and gave up.

      I did try those samples and they work, so when I need more fonts, I know what to do.

      Thanks for the pointer!

      • #8 by scruss2 on 2018-09-16 - 22:09

        “weakly” …?

        /storms off in a colossal snit ☺

        Inkscape was originally written by someone who’d rather spend his time watching lemurs in Madagascar. It kind of shows. But I’ve used to make a bunch of fonts, and fonts are one of the most horrific data structures developed so far, so I had to do a lot of reading.

        • #9 by Ed on 2018-09-17 - 17:49

          Free / Libre Software has always had a UI problem, with no good fix to be found. On the other paw, the few times I’ve had to build a program with an actual User Interface have definitively demonstrated my utter lack of ept, so I can’t be critical …

  3. #10 by tantris on 2018-09-13 - 19:47

    Libreoffice (and before the insurrection staroffice/openoffice) tends not to be one of these projects that listens kindly to users. Years ago I needed footnotes that restart by chapter but are kept at the end of the document (because that’s what the style required). The two answers were: You don’t know the difference between foot- end endnotes, and -after some explaining- knowbody needs this feature.
    I would put gnome and kde in the same category of projects with developer-driven features that miss out on user input.
    But libreoffice is especially frustrating, since they have open feature requests since the time of pangaea and could have killed MSWord in the academic market if they had included features that Word doesn’t have.

    • #11 by Ed on 2018-09-13 - 20:20

      developer-driven features that miss out on user input

      Which is why I use Xubuntu: it’s sufficiently primitive to stay out of the way and doesn’t cause (much) breakage in the Ubuntu substrate.

      Small Free / Libre Software projects work wonderfully well, large ones tend to shake off little people’s problems. So it goes, I suppose.