Options

Automatically Adjust Font Metrics to Match a Different Font Using `fonttools`

Gwrgwer__OfgqfrwGwrgwer__Ofgqfrw Posts: 1
edited June 2023 in Font Technology
I have two fonts:
  • font A: open-source font
  • font B: proprietary font whose metrics I'm trying to match.

How do I create a replacement font (font C) with the glyphs from font A but with the metrics from font B?

Also, I want all characters not present in font B not to be present in font C and I want to receive a warning for every character present in font B but not in font A, so that I can create a replacement that supports the exact same characters.

I think that fonttools would be a good tool for this, but I am not very familiar with the way it works.

I tried to submit this question to Stack Overflow, and they said this would be a better site for it.

Comments

  • Options
    John HudsonJohn Hudson Posts: 2,977
    You potentially could hack this at the binary level using fonttools, but probably it is going to be easier to use some kind of higher level tool. Since font A is open source, I am guessing that it actually has available sources, which would be your starting point for creating a source for font C.

    Since font B is not open source, you should check what its license permits or prohibits in terms of decompiling, and that will determine if or how you can go about getting the metrics to copy into the source for font C.

    The actual process of copying the metrics of font B into the source for font C should be pretty easy in any of the common font development tools. And you will also be able to quickly compare character set coverage and identify the glyphs you need to add to font C to match the character set of font B.

    FontForge remains the go-to open source font development tool, but I think that is more due to the failure of alternative projects to progress very far, rather than on any particular virtues of FontForge. Depending on what platform you are on, and if you are willing to use a proprietary font tool, I could make some recommendations.
  • Options
    Dave CrosslandDave Crossland Posts: 1,391
    I think there are definitely different attitudes about metrics compatibility, as befitting a free marketplace.

    I'm not sure where the license terms on this matters, because there are exceptions to various jurisdictions copyright regulations for decompilations. I seem to recall Brasil is especially strong on defending the public's rights around this. I also seem to recall something about USA font case law (to do with typewriters?) about 3rd party "fonts", when they were physical, where making replacement parts was ruled allowed under "right to repair" style doctrines.

    I read that when Monotype Arial was introduced to Windows it was metrics compatible with the Linotype Helvetia in postscript and macOS, along with MT Times New Roman to LT Times, and Courier New to Courier. Possibly in The Adobe Story(?).

    I believe there were also in the 90s/00s some "Office" versions of the most popular FontFont typefaces like FF Meta that were metric compatible with Arial.

    Later in the 00s, Ascender Sans, Ascender Mono and Ascender Serif were developed by Ascender Corp and licensed to Red Hat as Liberation Sans, Mono and Serif under GPL+FE, and soon after to Google as Arimo, Cousine and Tinos; and these were updated by Monotype after acquiring Ascender Corp. Those are metric compatible with Arial, Courier New and Times New Roman, down to the hinting as I recall from a conversation with Tom Rickner at a TypeRight.org event in Seattle in 2008. 

    About a decade ago, a few designers made versions of a few OFL fonts like Lato that are metric compatible with Microsoft's C fonts like Calibri (this example is called Carlito), that ship in ChromeOS. 
  • Options
    John HudsonJohn Hudson Posts: 2,977
    edited June 2023
    I think there are definitely different attitudes about metrics compatibility
    Yes, which is why I focused on method—is it possible to do it in a way that does not contravene the license of font B?—, rather than on the general ethical question about the practice. Also, we don’t know the reason why the original poster wants to create a metrics compatible font, which might seem more-or-less benign—as per most of the examples you give, Dave—, but could also be sanctions busting.
  • Options
    Simon CozensSimon Cozens Posts: 724
    I think @Adam Twardoch has a methodology for doing this.
  • Options
    Jens KutilekJens Kutilek Posts: 339

    I believe there were also in the 90s/00s some "Office" versions of the most popular FontFont typefaces like FF Meta that were metric compatible with Arial.
    No such thing existed. The Office FontFonts were variants of their original designs with different spacing, different weights, and some detail modifications. They were supposed to render better on screens and fax machines ;)
  • Options
    Jens KutilekJens Kutilek Posts: 339

    About a decade ago, a few designers made versions of a few OFL fonts like Lato that are metric compatible with Microsoft's C fonts like Calibri (this example is called Carlito), that ship in ChromeOS. 
    And some of the original designers of the C-fonts are not happy about that at all. Did those designers also copy the GPOS and GSUB tables, which would be required to make the fonts behave identical to the originals?
  • Options
    Dave CrosslandDave Crossland Posts: 1,391
    edited June 2023
    Jens Kutilek said:

    I believe there were also in the 90s/00s some "Office" versions of the most popular FontFont typefaces like FF Meta that were metric compatible with Arial.
    No such thing existed. The Office FontFonts were variants of their original designs with different spacing, different weights, and some detail modifications. They were supposed to render better on screens and fax machines ;)
    Thanks for the correction. I did a quick search and perhaps this is what I'm remembering: In the B-Roll for the Helvetica documentary, Erik Spiekermann said:

    "We design stuff for Bahn and Bosche and the IT guys, everyone in there, takes [Arial] as a benchmark. Our stuff is way better, its more legible and prettier and all the rest of it, and they say 'Oh no, its gonna be exactly the size and the height and every single pixel has to be equivalent, even though its a crap typeface, because it is a benchmark."



    So not FontFont versions, but custom brand type from MetaDesign, I guess?


    About a decade ago, a few designers made versions of a few OFL fonts like Lato that are metric compatible with Microsoft's C fonts like Calibri (this example is called Carlito), that ship in ChromeOS. 
    And some of the original designers of the C-fonts are not happy about that at all. Did those designers also copy the GPOS and GSUB tables, which would be required to make the fonts behave identical to the originals?
    You'd have to ask them how they did it, maybe they made a variable font that doesn't copy the values but can still offer them, like one clever TypeDrawers poster suggested the last time this topic came up :)

    Making copies for the purpose of making replacement parts is a common exception to copyright restrictions. 

    https://www.wrays.com.au/insights/industry-insights/copying-replacement-parts/
  • Options
    Jens KutilekJens Kutilek Posts: 339
    edited June 2023

    So not FontFont versions, but custom brand type from MetaDesign, I guess?
    Probably not MetaDesign, but I kind of lost track who worked on the Deutsche Bahn corporate identity, but surely there was some design agency involved besides Erik Spiekermann and Christian Schwartz who drew the typefaces.

    About a decade ago, a few designers made versions of a few OFL fonts like Lato that are metric compatible with Microsoft's C fonts like Calibri (this example is called Carlito), that ship in ChromeOS. 
    And some of the original designers of the C-fonts are not happy about that at all. Did those designers also copy the GPOS and GSUB tables, which would be required to make the fonts behave identical to the originals?
    You'd have to ask them how they did it, maybe they made a variable font that doesn't copy the values but can still offer them, like one clever TypeDrawers poster suggested the last time this topic came up :)
    This subject somehow seemed familiar, but I didn't check the archives ;)
    Making copies for the purpose of making replacement parts is a common exception to copyright restrictions. 

    https://www.wrays.com.au/insights/industry-insights/copying-replacement-parts/
    I wasn't talking about legalities, just feelings :)
  • Options
    John SavardJohn Savard Posts: 1,091
    I thought that metrics compatibility was basically obsolete now as something useful.
    The reason that fonts were designed to have the same metrics as those of famous typefaces was because laser printers, such as the HP LaserJet, had the real typefaces installed, and so the computer needed to have a metric compatible font to prepare documents to print with that font. Today, printers usually don't work this way.
    However, I suppose they would also be useful in the situation where a print shop has the font you want in your document, but you don't have a copy on your computer, so you want to use a cheaper metric-compatible font instead.
  • Options
    John HudsonJohn Hudson Posts: 2,977
    Metrics compatible fonts are primarily of use when a document is interchanged between software with differently licensed and available fonts. A lot of document formats are readable by multiple software so, e.g. an MS Word document can be opened in or imported into Libre Office, Google Docs, or other software, but the fonts with which it was originally created are not available. Having metrics compatible fonts for common word processing typefaces means that the document text does not reflow, affecting linebreaking, pagination, indexing, etc.
Sign In or Register to comment.