From 81c554424a4733ddbff040e44739ba9cf742870e Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 23 Dec 2024 23:39:20 +0000 Subject: [PATCH] Check OS/2.achVendID in compatcheck My GNU Emacs configuration ended up using this to select its default font, so it should remain constant within a major version. --- compatcheck | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compatcheck b/compatcheck index 5b28cce..aa96dad 100755 --- a/compatcheck +++ b/compatcheck @@ -23,6 +23,10 @@ # Names. Applications use a font's name to refer to it. This script # checks that the subset of names for which this seems reasonable # match between the old and new fonts. +# +# Vendor ID. At least some versions of GNU Emacs like to use the +# OS/2.achVendID field to select fonts. So if that changes, Emacs +# might not find your favourite font. from argparse import ArgumentParser from fontTools import ttLib @@ -84,5 +88,9 @@ for oldname in ttold['name'].names: f"nameID={oldname.nameID}, platformID={oldname.platformID}, " f"platEncID={oldname.platEncID}, langID={oldname.langID}") + +if ttold['OS/2'].achVendID != ttnew['OS/2'].achVendID: + fail("Vendor ID mismatch") + if failed: exit(1) -- 2.30.2