1
0
mirror of https://github.com/google/fonts.git synced 2024-11-28 02:17:11 +03:00
Font files available from Google Fonts, and a public issue tracker for all things Google Fonts
Go to file
arrowtype 591c59938b
Add Spacing [SPAC] axis (#62)
* Add TRAK custom axis

* Update and rename tracking.textproto to spacing.textproto

* Update spacing.textproto to add decimals to vals

To make the defined precision value more explicit.

Similar to a133509583fa8e53f15684028cdc1bb74a6039ee

* Renaming fallback to "Default"

* Update spacing.tp with reference project URL

* Update spacing.textproto to revert fallback name

* Update Spac description 

Following agreed decisions on meeting

* typo fix

Co-authored-by: Dave Crossland <dave@lab6.com>
Co-authored-by: Viviana Monsalve <viviana.monsalve.a@gmail.com>
2022-12-02 15:06:21 -07:00
.github changes after Chris comments 2022-11-10 18:46:41 -05:00
Lib/axisregistry Add Spacing [SPAC] axis (#62) 2022-12-02 15:06:21 -07:00
tests build_stat: improve elided axisvalues 2022-11-24 17:33:02 +00:00
AUTHORS.txt initial implementation of the axisregistry module 2022-03-04 06:43:41 -03:00
CHANGELOG.md Updating CHANGELOG.md with 0.3.10 release info 2022-11-29 17:18:27 -05:00
CONTRIBUTORS.txt initial implementation of the axisregistry module 2022-03-04 06:43:41 -03:00
LICENSE.txt initial implementation of the axisregistry module 2022-03-04 06:43:41 -03:00
README.md Adding the default fallback requirement 2022-08-23 23:13:56 -05:00
requirements.txt initial implementation of the axisregistry module 2022-03-04 06:43:41 -03:00
setup.py loosen install requirement on setup.py 2022-10-23 10:45:32 +01:00
test_requirements.txt update tox 2022-07-01 11:48:58 +01:00
tox.ini tox black: ignore _version.py 2022-07-01 11:57:55 +01:00

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.
  • 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
    • 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 called Default and its value should correspond to the default_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.