From: Ben Harris Date: Mon, 23 Dec 2024 23:39:20 +0000 (+0000) Subject: Check OS/2.achVendID in compatcheck X-Git-Tag: bedstead-3.251~57 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=81c554424a4733ddbff040e44739ba9cf742870e;p=bedstead.git 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. --- 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)