* Creating `flair.svg` * y_transparent_descender.textproto Use depth, not height * weight and width textprotos updated to say stroke weight * update tox * run black * wip name builder * add build_fvar_instances * black * wip linked values * fix vf name table generation for sibling fonts * add nameID25 * black * test static name table generation * rm local stuff * add prelim fvar instance check * improve fvar instance checks * cleanup stat tests * run black * fix tests * ignore egg-info * ignore _version * refactor name check * Add VF tests * black * add logging * clean up * convert AxisRegistry into a class * clean up * use enums * replace old family name with new name * add test for style name which is not part of the allowed static fonts * add nameID25 checks * add build filename * fix replacing names * simplyify * implement Simon feedback * Add wonky example * do not delete stat name ids if they are used in the fvar table * do not delete name records which are needed elsehwere * implement simon feedback * actions: publish release added * build_fvar_instances: support fonts which lack wght axis * AxisRegistry: add items method * add _fvar_instance_collision. Determine whether a family of fonts will have fvar instances which collide * add axis ordering * fix fvar_collision heuristic * black * Don't delete name IDs which are shared with the STAT table * Update __init__.py * build_fvar_instances: fix typo * fix dependencies * black * update tox * tox black: ignore _version.py * Move nameid25 to its own func * make family_name optional * EGRD custom axis added * Add Extrusion Depth and Edge Highlight axes for Nabla * Update Lib/axisregistry/data/extrusion_depth.textproto Co-authored-by: Just van Rossum <justvanrossum@gmail.com> * Update edge_highlight.textproto Use Nabla's default value rather zero * Update extrusion_depth.textproto Use Nabla's default value rather zero * Add a fallback to egrid * Update name of fallback per https://github.com/rosettatype/handjet#element-grid-axis-egrd * For reasons unknown fallbacks don't have spaces in names * Add default fallback entries * All axes must have a fallback (issue #67) * Adding the default fallback requirement * sync with google/fonts * Revert "sync with google/fonts" * sync google/fonts axisregistry changes with googlefonts/axisregistry includes Edge Highlight, Element Grid, and Extrusion Depth edits Co-authored-by: Elliot Jay Stocks <elliot@elliotjaystocks.com> Co-authored-by: Dave Crossland <dave@lab6.com> Co-authored-by: Marc Foley <m.foley.88@gmail.com> Co-authored-by: Nathan Williams <nlw2sx@virginia.edu> Co-authored-by: Simon Cozens <simon@simon-cozens.org> Co-authored-by: Viviana Monsalve <viviana.monsalve.a@gmail.com> Co-authored-by: Just van Rossum <justvanrossum@gmail.com> Co-authored-by: Rod S <rsheeter@google.com> Co-authored-by: Felipe Corrêa da Silva Sanches <juca@members.fsf.org>
3.5 KiB
AxisRegistry Python Module
This repository contains a python package providing easy access to the GF Axis Registry. Data was copied (and is kept is sync with) its original location at the axisregistry
directory on the google/fonts
git repo.
As of March 4th, 2022, there's an ongoing plan to soon make this module the central place for updates on the data-set.
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, 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.
- Tag for the axis used to specify an axis in
display_name
- Readable name for the axis, generally the expanded form of
tag
.
- Readable name for the axis, generally the expanded form of
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.
- Describes the specificity at which an axis position can be specified.
For example,
fallback
- 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), 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 calledDefault
and its value should correspond to thedefault_value
position of the axis.
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 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), 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.