From c20fc6e0b8bf278019fc075f869921a91e607e90 Mon Sep 17 00:00:00 2001 From: nathan-williams Date: Thu, 10 Mar 2022 00:32:17 -0800 Subject: [PATCH] Revert "Remove axisregistry to make space for the submodule." This reverts commit 9b890a2eb9b7c456217d5262884b1676e01c5d77. --- axisregistry/README.md | 43 ++++++++ axisregistry/casual.textproto | 20 ++++ axisregistry/cursive.textproto | 27 +++++ axisregistry/fill.textproto | 22 ++++ axisregistry/flair.textproto | 18 ++++ axisregistry/grade.textproto | 18 ++++ axisregistry/italic.textproto | 20 ++++ axisregistry/monospace.textproto | 24 +++++ axisregistry/optical_size.textproto | 102 ++++++++++++++++++ axisregistry/slant.textproto | 16 +++ axisregistry/softness.textproto | 21 ++++ axisregistry/volume.textproto | 17 +++ axisregistry/weight.textproto | 49 +++++++++ axisregistry/width.textproto | 55 ++++++++++ axisregistry/wonky.textproto | 22 ++++ axisregistry/x_opaque.textproto | 13 +++ axisregistry/x_transparent.textproto | 13 +++ axisregistry/x_transparent_figures.textproto | 13 +++ axisregistry/y_opaque.textproto | 13 +++ axisregistry/y_transparent_ascender.textproto | 13 +++ .../y_transparent_descender.textproto | 13 +++ axisregistry/y_transparent_figures.textproto | 13 +++ .../y_transparent_lowercase.textproto | 13 +++ .../y_transparent_uppercase.textproto | 13 +++ 24 files changed, 591 insertions(+) create mode 100644 axisregistry/README.md create mode 100644 axisregistry/casual.textproto create mode 100644 axisregistry/cursive.textproto create mode 100644 axisregistry/fill.textproto create mode 100644 axisregistry/flair.textproto create mode 100644 axisregistry/grade.textproto create mode 100644 axisregistry/italic.textproto create mode 100644 axisregistry/monospace.textproto create mode 100644 axisregistry/optical_size.textproto create mode 100644 axisregistry/slant.textproto create mode 100644 axisregistry/softness.textproto create mode 100644 axisregistry/volume.textproto create mode 100644 axisregistry/weight.textproto create mode 100644 axisregistry/width.textproto create mode 100644 axisregistry/wonky.textproto create mode 100644 axisregistry/x_opaque.textproto create mode 100644 axisregistry/x_transparent.textproto create mode 100644 axisregistry/x_transparent_figures.textproto create mode 100644 axisregistry/y_opaque.textproto create mode 100644 axisregistry/y_transparent_ascender.textproto create mode 100644 axisregistry/y_transparent_descender.textproto create mode 100644 axisregistry/y_transparent_figures.textproto create mode 100644 axisregistry/y_transparent_lowercase.textproto create mode 100644 axisregistry/y_transparent_uppercase.textproto diff --git a/axisregistry/README.md b/axisregistry/README.md new file mode 100644 index 000000000..923e4549d --- /dev/null +++ b/axisregistry/README.md @@ -0,0 +1,43 @@ +# GF Axis Registry + +This package contains a collection of metadata source files that collectively form the Google Fonts Axis Registry. + +The live Axis Registry is at [fonts.google.com/variablefonts](https://fonts.google.com/variablefonts), and axis definitions are only final when they appear on that page. + +When the registry is updated here, a line like `axisregistry/axis_name.textproto` should be added to the `to_sandbox.txt` file. + +## Axis Metadata Fields + +* `tag` + * Tag for the axis used to specify an axis in `font-variation-settings` and CSS API requests. +* `display_name` + * Readable name for the axis, generally the expanded form of `tag`. +* `min_value` + * Lower bound of the axis. Inclusive. +* `max_value` + * Upper bound of the axis. Inclusive. +* `default_value` + * Default position of the aixs. +* `precision` + * Describes the specificity at which an axis position can be specified. + For example, `0` means values must be specified as whole numbers while `-1` means values can be as precise as one decimal place. +* `fallback` (repeated) + * Instance positions along the axis, such as wght 100,200,300,400,500,600,700,800,900. + * A cross-product of fallback positions along all supported axes is created to support legacy browsers that lack variable font support. + For axes with CSS3 properties (such as [font-weight](https://drafts.csswg.org/css-fonts-3/#font-weight-prop)), the positions accessible + to CSS3 should be specified. For axes lacking CSS3 properties a legacy browser is limited to a single position and that position must + be at a fallback. +* `fallback_only` + * Describes whether to only use fallback values when presenting to users. +* `description` + * A description of the axis. + +## Why does Google Fonts have its own Axis Registry? + +We support a superset of the [OpenType axis registry](https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg) axis set, and use additional metadata for each axis. +Axes present in a font file but not in this registry will not function via our API. +No variable font is expected to support all of the axes here. + +Any font foundry or distributor library that offers variable fonts has a implicit, latent, de-facto axis registry, which can be extracted by scanning the library for axes' tags, labels, and min/def/max values. +While in 2016 Microsoft originally offered to include more axes in the OpenType 1.8 specification ([github.com/microsoft/OpenTypeDesignVariationAxisTags](https://github.com/microsoft/OpenTypeDesignVariationAxisTags)), as of August 2020, this effort has stalled. +We hope more foundries and distributors will publish documents like this that make their axes explicit, to encourage of adoption of variable fonts throughout the industry, and provide source material for a future update to the OpenType specification's axis registry. diff --git a/axisregistry/casual.textproto b/axisregistry/casual.textproto new file mode 100644 index 000000000..4909bbde7 --- /dev/null +++ b/axisregistry/casual.textproto @@ -0,0 +1,20 @@ +# CASL based on https://github.com/arrowtype/Recursive#variable-axes +tag: "CASL" +display_name: "Casual" +min_value: 0 +max_value: 1 +default_value: 0 +precision: -2 +fallback { + name: "Linear" + value: 0 +} +fallback { + name: "Casual" + value: 1 +} +fallback_only: false +description: + "Along this axis, letterforms adjust in stroke curvature, contrast, and" + " terminals to go from a sturdy, rational 'Linear' style to a friendly," + " energetic 'Casual' style." diff --git a/axisregistry/cursive.textproto b/axisregistry/cursive.textproto new file mode 100644 index 000000000..e6b0ac9e4 --- /dev/null +++ b/axisregistry/cursive.textproto @@ -0,0 +1,27 @@ +# CRSV based on https://github.com/arrowtype/Recursive#variable-axes +tag: "CRSV" +display_name: "Cursive" +min_value: 0 +max_value: 1 +default_value: 0.5 +precision: -1 +fallback { + name: "Roman" + value: 0 + display_name: "Off" +} +fallback { + name: "Auto" + value: 0.5 +} +fallback { + name: "Cursive" + value: 1 + display_name: "On" +} +fallback_only: true +description: + "Controls the substitution of cursive forms along the Slant axis. 'Off' (0)" + " maintains Roman letterforms such as a double-storey a and g, 'Auto' (0.5)" + " allows for Cursive substitution, and 'On' (1) asserts cursive forms even" + " in upright text with a Slant of 0." diff --git a/axisregistry/fill.textproto b/axisregistry/fill.textproto new file mode 100644 index 000000000..97a1e4166 --- /dev/null +++ b/axisregistry/fill.textproto @@ -0,0 +1,22 @@ +tag: "FILL" +display_name: "Fill" +min_value: 0.0 +default_value: 0.0 +max_value: 1.0 +precision: -2 +fallback { + name: "Normal" + value: 0.0 +} +fallback { + name: "Filled" + value: 1.0 +} +fallback_only: false +description: "The Fill axis is intended to provide a treatment of the design" + " that fills in transparent forms with opaque ones (and sometimes interior" + " opaque forms become transparent, to maintain contrasting shapes)." + " Transitions often occur from the center, a side, or a corner," + " but can be in any direction. This can be useful in animation or" + " interaction to convey a state transition. The numbers indicate" + " proportion filled, from 0 (no treatment) to 1 (completely filled)." \ No newline at end of file diff --git a/axisregistry/flair.textproto b/axisregistry/flair.textproto new file mode 100644 index 000000000..d95dac1b4 --- /dev/null +++ b/axisregistry/flair.textproto @@ -0,0 +1,18 @@ +tag: "FLAR" +display_name: "Flair" +min_value: 0.0 +default_value: 0.0 +max_value: 100.0 +precision: 1 +fallback { + name: "Normal" + value: 0.0 +} +fallback { + name: "Flair" + value: 100.0 +} +description: + "As the flair axis grows, the straight sans serif terminals develop" + " a swelling, and joints become more idiosyncratic. Originally referring" + " to the flaring of the stems, Flair stands for style and panache." diff --git a/axisregistry/grade.textproto b/axisregistry/grade.textproto new file mode 100644 index 000000000..f77a136a8 --- /dev/null +++ b/axisregistry/grade.textproto @@ -0,0 +1,18 @@ +# GRAD based on https://github.com/TypeNetwork/Opentype-1.8-Axis-Proposal/blob/gh-pages/proposal/Grade/ProposalSummary.md +tag: "GRAD" +display_name: "Grade" +min_value: -1000 +max_value: 1000 +default_value: 0 +precision: 0 +fallback { + name: "Normal" + value: 0 +} +fallback_only: false +description: + "Finesse the style from lighter to bolder in typographic color, by varying" + " stroke thicknesses or other forms, without any changes overall width," + " inter-letter spacing, or kerning, so there are no changes to line breaks" + " or page layout. Negative grade makes the style lighter, while positive" + " grade makes it bolder. The units are the same as in the Weight axis." diff --git a/axisregistry/italic.textproto b/axisregistry/italic.textproto new file mode 100644 index 000000000..e0b272bce --- /dev/null +++ b/axisregistry/italic.textproto @@ -0,0 +1,20 @@ +# ital based on https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_ital +tag: "ital" +display_name: "Italic" +min_value: 0 +max_value: 1 +default_value: 0 +precision: -1 +fallback { + name: "Roman" + value: 0 +} +fallback { + name: "Italic" + value: 1 +} +fallback_only: true +description: + "Adjust the style from roman to italic. This can be provided as" + " a continuous range within a single font file, like most axes, or as a" + " toggle between two roman and italic files that form a family as a pair." diff --git a/axisregistry/monospace.textproto b/axisregistry/monospace.textproto new file mode 100644 index 000000000..8e537dd85 --- /dev/null +++ b/axisregistry/monospace.textproto @@ -0,0 +1,24 @@ +# FOR TESTING ONLY [for now anyway] +# MONO based on https://github.com/arrowtype/Recursive#variable-axes +tag: "MONO" +display_name: "Monospace" +min_value: 0 +max_value: 1 +default_value: 0 +precision: -2 +fallback { + name: "Proportional" + value: 0 +} +fallback { + name: "Monospace" + value: 1 +} +fallback_only: false +description: + "Adjust the style from proportional (natural widths, default) to" + " monospace (fixed width). Monospace is when all glyphs have the same" + " total character width, and more wide or narrow letter proportions to fill" + " the space such as a narrower 'w' or wider 'r.' Proportionally spaced" + " fonts have letters drawn with more typical proportions, and each glyph" + " takes up a unique amount of space on a line." diff --git a/axisregistry/optical_size.textproto b/axisregistry/optical_size.textproto new file mode 100644 index 000000000..0e7cbf346 --- /dev/null +++ b/axisregistry/optical_size.textproto @@ -0,0 +1,102 @@ +# opsz based on https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_opsz +# fallbacks based on https://en.wikipedia.org/wiki/Traditional_point-size_names +# plus discussion with dcrossland@ +tag: "opsz" +display_name: "Optical size" +min_value: 6 +max_value: 144 +default_value: 14 +precision: -1 +fallback { + name: "6pt" + value: 6 +} +fallback { + name: "7pt" + value: 7 +} +fallback { + name: "8pt" + value: 8 +} +fallback { + name: "9pt" + value: 9 +} +fallback { + name: "10pt" + value: 10 +} +fallback { + name: "11pt" + value: 11 +} +fallback { + name: "12pt" + value: 12 +} +fallback { + name: "14pt" + value: 14 +} +fallback { + name: "16pt" + value: 16 +} +fallback { + name: "17pt" + value: 17 +} +fallback { + name: "18pt" + value: 18 +} +fallback { + name: "20pt" + value: 20 +} +fallback { + name: "24pt" + value: 24 +} +fallback { + name: "28pt" + value: 28 +} +fallback { + name: "36pt" + value: 36 +} +fallback { + name: "48pt" + value: 48 +} +fallback { + name: "60pt" + value: 60 +} +fallback { + name: "72pt" + value: 72 +} +fallback { + name: "96pt" + value: 96 +} +fallback { + name: "120pt" + value: 120 +} +fallback { + name: "144pt" + value: 144 +} +fallback_only: false +description: + "Adapt the style to specific text sizes, specified in Points. At smaller" + " sizes, letters typically become optimized for more legibility, with loose" + " spacing/kerning and thicker strokes with less detail. At larger sizes," + " letters are typically optimized for headlines with thinner strokes and" + " more detailed forms, and more extreme weights and widths. When used in" + " CSS, this axis is activated by default, but not all products/platforms" + " use it automatically." diff --git a/axisregistry/slant.textproto b/axisregistry/slant.textproto new file mode 100644 index 000000000..869461260 --- /dev/null +++ b/axisregistry/slant.textproto @@ -0,0 +1,16 @@ +# slnt based on https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_slnt +tag: "slnt" +display_name: "Slant" +min_value: -90 +max_value: 90 +default_value: 0 +precision: 0 +fallback { + name: "Default" + value: 0 +} +fallback_only: false +description: + "Adjust the style from upright to slanted, also known to typographers" + " as an 'oblique' style. Rarely, slant can work in the other direction," + " called a 'backslanted' or 'reverse oblique' style." diff --git a/axisregistry/softness.textproto b/axisregistry/softness.textproto new file mode 100644 index 000000000..c850f74e0 --- /dev/null +++ b/axisregistry/softness.textproto @@ -0,0 +1,21 @@ +# SOFT based on https://github.com/undercasetype/Fraunces#variable-axes +tag: "SOFT" +display_name: "Softness" +min_value: 0 +max_value: 100 +default_value: 0 +precision: -1 +fallback { + name: "Sharp" + value: 0 +} +fallback { + name: "Soft" + value: 50 +} +fallback { + name: "SuperSoft" + value: 100 +} +fallback_only: false +description: "Letterforms become more soft and rounded." diff --git a/axisregistry/volume.textproto b/axisregistry/volume.textproto new file mode 100644 index 000000000..119e8d353 --- /dev/null +++ b/axisregistry/volume.textproto @@ -0,0 +1,17 @@ +tag: "VOLM" +display_name: "Volume" +min_value: 0.0 +default_value: 0.0 +max_value: 100.0 +precision: 1 +fallback { + name: "Normal" + value: 0.0 +} +fallback { + name: "Loud" + value: 100.0 +} +description: + "Transforms serifs from glyphic to wedge shapes," + " and adds a little more edge to other details." diff --git a/axisregistry/weight.textproto b/axisregistry/weight.textproto new file mode 100644 index 000000000..ffc63516a --- /dev/null +++ b/axisregistry/weight.textproto @@ -0,0 +1,49 @@ +# wght based on https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_wght +tag: "wght" +display_name: "Weight" +min_value: 1 +max_value: 1000 +default_value: 400 +precision: 0 +fallback { + name: "Thin" + value: 100 +} +fallback { + name: "Extra Light" + value: 200 +} +fallback { + name: "Light" + value: 300 +} +fallback { + name: "Regular" + value: 400 +} +fallback { + name: "Medium" + value: 500 +} +fallback { + name: "Semi Bold" + value: 600 +} +fallback { + name: "Bold" + value: 700 +} +fallback { + name: "Extra Bold" + value: 800 +} +fallback { + name: "Black" + value: 900 +} +fallback_only: false +description: + "Adjust the style from lighter to bolder in typographic color, by varying" + " stroke thicknesses or other forms. This typically changes overall width," + " and so may be used in conjunction with axes for Width and Grade (if" + " present)." diff --git a/axisregistry/width.textproto b/axisregistry/width.textproto new file mode 100644 index 000000000..da9449260 --- /dev/null +++ b/axisregistry/width.textproto @@ -0,0 +1,55 @@ +# wdth based on https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_wdth +tag: "wdth" +display_name: "Width" +min_value: 25 +max_value: 200 +default_value: 100 +precision: -1 +# Instance values based on https://docs.microsoft.com/en-us/typography/opentype/spec/os2#uswidthclass +fallback { + name: "Super Condensed" + value: 25 +} +fallback { + name: "Ultra Condensed" + value: 50 +} +fallback { + name: "Extra Condensed" + value: 62.5 +} +fallback { + name: "Condensed" + value: 75 +} +fallback { + name: "Semi Condensed" + value: 87.5 +} +fallback { + name: "Normal" + value: 100 +} +fallback { + name: "Semi Expanded" + value: 112.5 +} +fallback { + name: "Expanded" + value: 125 +} +fallback { + name: "Extra Expanded" + value: 150 +} +fallback { + name: "Ultra Expanded" + value: 200 +} +fallback_only: false +description: + "Adjust the style from narrower to wider, by varying the proportions of" + " counters, stems, and other forms including overall spacing and kerning." + " This typically changes the apparent weight (what typographers call" + " 'typographic color') in a subtle way, and so may be used in conjunction" + " with axes for Width and Grade (if present)." diff --git a/axisregistry/wonky.textproto b/axisregistry/wonky.textproto new file mode 100644 index 000000000..eb39d83a1 --- /dev/null +++ b/axisregistry/wonky.textproto @@ -0,0 +1,22 @@ +# WONK based on https://github.com/undercasetype/Fraunces#variable-axes +tag: "WONK" +display_name: "Wonk" +min_value: 0 +max_value: 1 +default_value: 0 +precision: 0 +fallback { + name: "Non Wonky" + value: 0 +} +fallback { + name: "Wonky" + value: 1 +} +fallback_only: true +description: + "Binary axis to control the subsitution of wonky forms along the" + " optical size axis. 'Off' (0) maintains more normalized letterforms," + " such as the leaning n/m/h in roman, or the bulbous flags in the" + " b/d/h/k/l of the italic." + " In static fonts, this is also available as an OpenType Stylistic Set." diff --git a/axisregistry/x_opaque.textproto b/axisregistry/x_opaque.textproto new file mode 100644 index 000000000..608b48cd0 --- /dev/null +++ b/axisregistry/x_opaque.textproto @@ -0,0 +1,13 @@ +# XOPQ based on https://variationsguide.typenetwork.com/#xopq +tag: "XOPQ" +display_name: "X opaque" +min_value: -1000 +max_value: 2000 +default_value: 88 +precision: 0 +fallback { + name: "Normal" + value: 88 +} +description: + "Assigns a 'black' per mille value to each instance of the design space." diff --git a/axisregistry/x_transparent.textproto b/axisregistry/x_transparent.textproto new file mode 100644 index 000000000..4ec7bfea0 --- /dev/null +++ b/axisregistry/x_transparent.textproto @@ -0,0 +1,13 @@ +# XTRA based on https://variationsguide.typenetwork.com/#xtra +tag: "XTRA" +display_name: "X transparent" +min_value: -1000 +max_value: 2000 +default_value: 400 +precision: 0 +fallback { + name: "Normal" + value: 400 +} +description: + "Assigns a 'white'”' per mille value to each instance of the design space." diff --git a/axisregistry/x_transparent_figures.textproto b/axisregistry/x_transparent_figures.textproto new file mode 100644 index 000000000..aac6944b3 --- /dev/null +++ b/axisregistry/x_transparent_figures.textproto @@ -0,0 +1,13 @@ +# XTFI based on https://variationsguide.typenetwork.com/#xtfi +tag: "XTFI" +display_name: "X transparent figures" +min_value: -1000 +max_value: 2000 +default_value: 400 +precision: 0 +fallback { + name: "Normal" + value: 400 +} +description: + "Assigns a 'white' per mille value to each instance of the design space." \ No newline at end of file diff --git a/axisregistry/y_opaque.textproto b/axisregistry/y_opaque.textproto new file mode 100644 index 000000000..2db4df667 --- /dev/null +++ b/axisregistry/y_opaque.textproto @@ -0,0 +1,13 @@ +# YOPQ based on https://variationsguide.typenetwork.com/#yopq +tag: "YOPQ" +display_name: "Y opaque" +min_value: -1000 +max_value: 2000 +default_value: 116 +precision: 0 +fallback { + name: "Normal" + value: 116 +} +description: + "Assigns a 'black' per mille value to each instance of the design space." diff --git a/axisregistry/y_transparent_ascender.textproto b/axisregistry/y_transparent_ascender.textproto new file mode 100644 index 000000000..3613b69a5 --- /dev/null +++ b/axisregistry/y_transparent_ascender.textproto @@ -0,0 +1,13 @@ +# YTAS based on https://variationsguide.typenetwork.com/#ytas +tag: "YTAS" +display_name: "Y transparent ascender" +min_value: 0 +max_value: 1000 +default_value: 750 +precision: 0 +fallback { + name: "Normal" + value: 750 +} +description: + "Assigns a 'white' per mille value to each instance of the design space." diff --git a/axisregistry/y_transparent_descender.textproto b/axisregistry/y_transparent_descender.textproto new file mode 100644 index 000000000..6c756e327 --- /dev/null +++ b/axisregistry/y_transparent_descender.textproto @@ -0,0 +1,13 @@ +# YTDE based on https://variationsguide.typenetwork.com/#ytde +tag: "YTDE" +display_name: "Y transparent descender" +min_value: -1000 +max_value: 0 +default_value: -250 +precision: 0 +fallback { + name: "Normal" + value: -250 +} +description: + "Assigns a 'white' per mille value to each instance of the design space." diff --git a/axisregistry/y_transparent_figures.textproto b/axisregistry/y_transparent_figures.textproto new file mode 100644 index 000000000..4461f57cf --- /dev/null +++ b/axisregistry/y_transparent_figures.textproto @@ -0,0 +1,13 @@ +# YTFI based on https://variationsguide.typenetwork.com/#ytfi +tag: "YTFI" +display_name: "Y transparent figures" +min_value: -1000 +max_value: 2000 +default_value: 600 # this is NOT what TN defined, it's just a value that fits for Roboto Flex +precision: 0 +fallback { + name: "Normal" + value: 600 +} +description: + "Assigns a 'white' per mille value to each instance of the design space." \ No newline at end of file diff --git a/axisregistry/y_transparent_lowercase.textproto b/axisregistry/y_transparent_lowercase.textproto new file mode 100644 index 000000000..73614ecef --- /dev/null +++ b/axisregistry/y_transparent_lowercase.textproto @@ -0,0 +1,13 @@ +# YTLC based on https://variationsguide.typenetwork.com/#ytlc +tag: "YTLC" +display_name: "Y transparent lowercase" +min_value: 0 +max_value: 1000 +default_value: 500 +precision: 0 +fallback { + name: "Normal" + value: 500 +} +description: + "Assigns a 'white' per mille value to each instance of the design space." diff --git a/axisregistry/y_transparent_uppercase.textproto b/axisregistry/y_transparent_uppercase.textproto new file mode 100644 index 000000000..83ab865c0 --- /dev/null +++ b/axisregistry/y_transparent_uppercase.textproto @@ -0,0 +1,13 @@ +# YTUC based on https://variationsguide.typenetwork.com/#ytuc +tag: "YTUC" +display_name: "Y transparent uppercase" +min_value: -1000 +max_value: 1000 +default_value: 500 +precision: 0 +fallback { + name: "Normal" + value: 725 +} +description: + "Assigns a 'white' per mille value to each instance of the design space."