/amstelvar-avar2

R&D version of Amstelvar with avar2 to replace gvar data

Primary LanguageHTMLSIL Open Font License 1.1OFL-1.1

AmstelvarA2

Alpha version of Amstelvar with avar2 data. (work in progress)

Folder structure

AmstelvarA2
├── Fonts/
├── Proofs/
├── Tools/
├── Sources/
├── README.md
└── OFL.txt
Fonts
font binaries for testing
Proofs
proofs of the variable fonts
Tools
scripts used during production
Sources
various source files used to design and build the variable fonts

Fonts

Fonts
├── AmstelvarA2-Roman_avar1.ttf
└── AmstelvarA2-Roman_avar2.ttf
AmstelvarA2-Roman_avar1.ttf
Variable font in avar1 format.
Blended axes are created by instantiating their extrema from parametric axes, and inserting them into the designspace as sources.
AmstelvarA2-Roman_avar2.ttf
Variable font in avar2 format.
Blended axes are created by defining mappings from parametric axes to extrema input values.

Proofs

Proofs
├── HTML/
├── PDF/
└── fontra-test-strings.txt
HTML
Interactive proofs in HTML/CSS/JS format.
PDF
Static proofs in PDF format.
fontra-test-strings.txt
Test text strings for previewing glyph sets in Fontra.

Sources

This folder contains two subfolders with separate files for Roman and Italic, and project-level files which are used by both styles.

Sources
├── Italic/
├── Roman/
└── AmstelvarA2.roboFontSets
AmstelvarA2.roboFontSets
SmartSets file containing various sets of glyphs.
Useful as UI feature when browsing complete fonts, and as a data format when writing scripts that apply only to certain sets of glyphs.

Roman (+ same structure for Italic)

Roman
├── *.ufo
├── measurements.json
├── blends.json
├── fences.json
├── features/*.fea
├── instances/*.ufo
├── AmstelvarA2-Roman.glyphConstruction
├── AmstelvarA2-Roman.designspace
├── AmstelvarA2-Roman_avar1.designspace
└── AmstelvarA2-Roman_avar2.designspace
*.ufo
Font sources in UFO format, with files named according to their variation parameters.
All sources contain all glyphs, including glyphs which do not change in relation to the default (sources are not sparse).
measurements.json
Standalone JSON file containing definitions for various font- and glyph-level measurements.
Created using the Measurements tool from the VariableValues RoboFont extension.
See Measurements format for documentation of the data format.
blends.json
Standalone JSON file containing definitions of blended axes and blended sources from parametric axes.
This data is used to build the avar2 designspace.
fences.json
Standalone JSON file containing definitions of min/max fence values for parametric values at blended sources.
This data is used to add mappings for fences to the avar2 designspace. (experimental)
features
Subfolder with files containing OpenType code which can be linked to the source fonts.
Currently not used when building the variable fonts.
instances
Subfolder containing instances generated from the parametric sources, used to add blended axes to the avar1 designspace.
Also useful for comparison with the original Amstelvar1 sources for blended extrema.
AmstelvarA2-Roman.glyphConstruction
GlyphConstruction file containing instructions for building glyphs from components.
AmstelvarA2-Roman.designspace
Basic parametric designspace for use during design and development.
Also used to build instances for the avar1 designspace.
AmstelvarA2-Roman_avar1.designspace
Designspace for building avar1 variable font.
Includes the blended instances as sources for blended axes.
AmstelvarA2-Roman_avar2.designspace
Designspace for building avar2 variable font.
Includes avar2 mappings which define blended sources from parametric values.

Tools

Tools
├── production/*.py
└── build.py

Build script

The different designspaces and variable fonts are built by a single build.py script. The code is written around a core AmstelvarDesignSpaceBuilder object which provides common functionality to all AmstelvarA2 designspaces:

  • reading all necessary data from the appropriate files and folders
  • creating a designspace document with the parametric axes, taking min/max values from the UFO file names, and default values by measuring the default UFO
  • inserting parametric sources at their appropriate locations, based on actual measurements taken from each source
  • adding blended axes using data from the blends.json file, and building blended sources as instances
  • saving the designspace document into a .designspace file
  • building a variable font for the current designspace

More specific designspaces inherit from this core object, and add their own special behavior on top of it.

Production scripts

A subfolder containing various scripts used during development. The most relevant ones are listed below.

set-names-from-measurements.py
Set file name and style name from measurements in all UFOs in a given folder.
Includes a preflight mode which only prints the new names without changing the files.
copy-glyphs.py
Copy glyphs from the default font to selected sources.
build-glyphs.py
Build glyphs from glyph constructions in the selected sources.
validate-locations.py
Check if source locations are within the allowed min/max bounds for each axis.
Helpful when debugging calculated blend values in relation to the current parametric axes.
mark-components.py
Mark glyphs in the current font containing components with different colors depending on their components' nesting level.

Blending

The appropriate values for blending opsz wght wdth from parametric axes are produced on a separate repository which is a fork of the original Amstelvar source. [The naming of UFO files was adjusted for easier parameter parsing (using underscores to separate parameters instead of hyphens), and all unnecessary files were deleted.]

A separate measurements file was added for Amstelvar, with the same parameters used for measuring AmstelvarA2. This file is needed because the contour structures of the two versions are different, and in most measurements different point indexes must be used.

Extracting measurements

Using this separate measurements file, the original Amstelvar sources are then measured to produce the blends.json file which is used by the AmstelvarA2 designspace builder.

Variation axes in AmstelvarA2

Blended axes

  • opsz Optical size
  • wght Weight
  • wdth Width
  • XTSP Proportional spacing

Parametric axes

  • GRAD Grades
  • XOPQ General x opaque
  • XTRA General x transparent
  • YOPQ General y opaque
  • YTUC Y transparent uppercase
  • YTLC Y transparent lowercase
  • YTAS Y transparent ascender
  • YTDE Y transparent descender
  • YTFI Y transparent figures
  • XSHU X horizontal serif uppercase
  • YSHU Y horizontal serif uppercase
  • XSVU X vertical serif uppercase
  • YSVU Y vertical serif uppercase
  • XSHL X horizontal serif lowercase
  • YSHL Y horizontal serif lowercase
  • XSVL X vertical serif lowercase
  • YSVL Y vertical serif lowercase
  • XSHF X horizontal serif figures
  • YSHF Y horizontal serif figures
  • XSVF X vertical serif figures
  • YSVF Y vertical serif figures
  • XTTW Trap width
  • YTTL Trap length
  • YTOS General y overshoot
  • XUCS X sidebearing uppercase H
  • WDSP Word space width
  • BARS Bars