From: Harry Dalton Date: Thu, 23 Jan 2025 12:14:54 +0000 (+0000) Subject: Do not add Mac names when populating the fvar table X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7766899fd11bfa44edeacb3da3b9dae54d39eb0;p=thirdparty%2Fgoogle%2Ffonts.git Do not add Mac names when populating the fvar table --- diff --git a/Lib/axisregistry/__init__.py b/Lib/axisregistry/__init__.py index de51e7414..7595e2767 100644 --- a/Lib/axisregistry/__init__.py +++ b/Lib/axisregistry/__init__.py @@ -58,6 +58,10 @@ GF_STATIC_STYLES = OrderedDict( ] ) +# The platforms to include when adding records to the `name` table, which +# differs from fontTools' default. +NAME_PLATFORMS = ((3, 1, 0x409),) + def load_protobuf(klass, data): message = klass() @@ -442,9 +446,9 @@ def build_fvar_instances(ttFont, axis_dflts={}): coordinates["slnt"] = slnt_axis.minValue inst = NamedInstance() - inst.subfamilyNameID = name_table.addName(name) + inst.subfamilyNameID = name_table.addName(name, platforms=NAME_PLATFORMS) inst.postscriptNameID = name_table.addName( - f"{family_name}-{name}".replace(" ", "") + f"{family_name}-{name}".replace(" ", ""), platforms=NAME_PLATFORMS ) inst.coordinates = coordinates log.debug(f"Adding fvar instance: {name}: {coordinates}")