From 2d5655cc3824a675cf69c97728a0b9f62d3d0ee2 Mon Sep 17 00:00:00 2001 From: "Colin M. Ford" Date: Tue, 28 Nov 2023 15:20:20 -0500 Subject: [PATCH] xml examples of public.fontInfo --- Doc/source/designspaceLib/xml.rst | 85 ++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/Doc/source/designspaceLib/xml.rst b/Doc/source/designspaceLib/xml.rst index 4e3492ef6..06f57f017 100644 --- a/Doc/source/designspaceLib/xml.rst +++ b/Doc/source/designspaceLib/xml.rst @@ -790,7 +790,7 @@ The ```` element contains one or more ```` elemen but the design space is sliced at the given location. *Note:* While valid to have a specific value that doesn’t have a matching ```` at that value, currently there isn’t an implentation that supports this. See `this fontmake issue - `. + `_. .. code:: xml @@ -842,6 +842,38 @@ Arbitrary data about this variable font. .. seealso:: :ref:`lib` +Here is an example of using the ``public.fontInfo`` lib key to gain more granular +control over the font info of a variable font, in this case setting some names to +reflect the fact that this is a Narrow variable font subset from the larger designspace. +This lib key allows font info in variable fonts to be more specific than the font +info of the sources. + +.. rubric:: Example + +.. code:: xml + + + + + + + + + public.fontInfo + + familyName + My Font Narrow VF + styleName + Regular + postscriptFontName + MyFontNarrVF-Regular + trademark + My Font Narrow VF is a registered trademark... + + + + + Instances included in the variable font --------------------------------------- @@ -989,6 +1021,57 @@ instance directly. +Here is an example of using the ``public.fontInfo`` lib key to gain more granular +control over the font info of the instances. + +``openTypeNameWWSFamilyName`` and ``openTypeNameWWSSubfamilyName`` are not able to +be set by attributes on the ```` element. The ``openTypeOS2WeightClass`` +key is superceding the value that would have been set by the ``weight`` axis value. +The ``trademark`` key is superceding the value that would have been set by UFO source +at the origin. If the designer wishes to set name records for other encodings, +platforms or laguages, they should do so using the ``openTypeNameRecords`` key, like +they would in a UFO source. + +See `UFO3 fontinfo.plist specification `_. + +.. code:: xml + + + + + + + + + public.fontInfo + + openTypeNameWWSFamilyName + My Font Text + openTypeNameWWSSubfamilyName + Light + openTypeOS2WeightClass + 300 + trademark + My Font Text Light is a registered trademark... + openTypeNameRecords + + + encodingID + 1 + languageID + 1031 + nameID + 7 + platformID + 3 + string + Meine Schrift Text Leicht ist eine registrierte Marke... + + + + + + ```` element (instance) -------------------------------