Subject: bug#53907: font-ibm-plex has a nonfree dependency

From: Philip McGrath <[email-masked]>
Date: Wed, 9 Feb 2022 23:09:05 -0500

Hi,

On 2/9/22 16:39, Greg Farough wrote:
> Hi, Guix developers:
> 
> As far as I can tell, the IBM Plex family of fonts requires the
> nonfree program FontLab Studio to build.

...

> This is one of the reasons Debian[3] has moved the font to the "contrib"
> section of its repos.
> 
>> IBM releases Plex as "open source", but unfortunately the freedom
>> status of the font is less than ideal, as it requires non-free
>> software to be built from source (see README.md, Requirements section,
>> and [0]). The problematic step is the hinting, which is done with
>> FontLab Studio, which is proprietary software. There is currently no
>> Free Software program that is able to work with the high-level hinting
>> command language used by FontLab Studio.
> 

I *think* this may no longer be true---with the caveat that I know just 
enough about font development to know how little I really know.

According to a 2019 GitHub comment[1] by  Paul van der Laan (one of the 
IBM PLEX designers):

> The IBM Plex instances started their life as interpolated files in RoboFont which were checked and refined manually for rounding errors in outlines and metrics. Settings in the font info might have been tailored for specific instances as well. Afterwards they were converted to TrueType outlines, and together with the PostScript versions they were hinted in FontLab 5.
> 
> If you are interested to work with the instances then I strongly recommend to take the FontLab files because these are of a much higher fidelity than plain interpolated instances.
> 
> With a utility such as vfb2ufo these files can be converted to UFO files. Although you will probably loose most, if not all all, hinting data when doing so.

Apparently that final caveat is not true. In another GitHub issue[2][3] 
(about the proprietary FontLab 5 reaching end-of-life), Jens Kutilek wrote:

> I have my own Python implementation of a FontLab-style TTH compiler which can take an UFO (from vfb2ufo so it contains the FL TT hinting code) and compile the TT instructions. I would be open to release it if there are no objections from the FontLab guys.

...

> The alignment zone deltas are stored in the UFO generated by vfb2ufo, so they can be accessed there by any script working with the UFO.

Searching further, I found a comment [4] on the discussion of TrueType 
instructions in the UFO spec saying he was working to enhance the free 
program ufo2ft "so FontLab hinting code from UFOs generated by vfb2ufo 
will compile into TTFs and stay 100% rendering-compatible with fonts 
generated directly from FontLab 5." This support hasn't been merged into 
upstream ufo2ft yet---more specifically, it was merged last fall but 
then reverted [5] due to (in my cursorily-formed opinion) relatively 
minor issues like better unit tests, but a revised pull request [6] was 
opened just 27 days ago.

In any case, apparently the code exists. It has even used IBM Plex as an 
example.[7]

I haven't actually tried to use it, though!

-Philip

[1]: https://github.com/IBM/plex/issues/228#issuecomment-460160085
[2]: https://github.com/IBM/plex/issues/206#issuecomment-458465851
[3]: https://github.com/IBM/plex/issues/206#issuecomment-458510847
[4]: https://github.com/unified-font-object/ufo-spec/issues/93
[5]: 
https://github.com/googlefonts/ufo2ft/pull/335#pullrequestreview-761840943
[6]: https://github.com/googlefonts/ufo2ft/pull/577
[7]: 
https://github.com/unified-font-object/ufo-spec/issues/93#issuecomment-496552530