Package: axisregistry
Google Fonts Axis RegistryThis repository is the officialupstreamGoogle FontsAxis Registry.This data-set is synced into the centralgithub.com/google/fontsgit repo, through which all Google Fonts assets are onboarded.TheactualAxis Registry lives within the actual live Google Fonts product, surfaced atfonts.google.com/variablefonts#axis-definitions– so axis definitions are only final when they appear on that page, and this repository will from time to time contain fresh data not in the live system, and subject to change.The AxisRegistry Python ModuleThis repo is structured as a Python package/module, providing easy access to the registry data-set from Python programs.The Python package contains a collection of metadata source files that collectively form the Google Fonts Axis Registry.This module is the central place for dataset updates.
After updates are made here on themainbranch, the maintainers of the central repo will update subtree located atgoogle/fonts/axisregistryand then work to push those changes through to the live Google Fonts API via sandbox servers, according to the typical push process.
For more detailed information, please see theAxis Registrysection of thegoogle/fontsrepository explainedarticle in the GF Guide.Axis Metadata FieldstagTag for the axis used to specify an axis infont-variation-settingsand CSS API requests.display_nameReadable name for the axis, generally the expanded form oftag.min_valueLower bound of the axis. Inclusive.max_valueUpper bound of the axis. Inclusive.default_valueDefault position of the aixs.precisionDescribes the specificity at which an axis position can be specified.
For example,0means values must be specified as whole numbers while-1means values can be as precise as one decimal place.fallbackInstance 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 asfont-weight), 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.In case an axis doesn't include predefined positions, it is mandatory to define at least one fallback position. It should be calledDefaultand its value should correspond to thedefault_valueposition of the axis.fallback_onlyDescribes whether to only use fallback values when presenting to users in the UI. Currently, default totrue, for continuous range axes should be set tofalse.descriptionA description of the axis.Why does Google Fonts have its own Axis Registry?We support a superset of theOpenType axis registryaxis 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), by August 2020 this effort had 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.