Description
Return current-namedValue and normalize each side of the default separately into [-1, 1], with default mapped to zero.
Typography combines several distinct scales: font size describes an em scale, cap height describes a font metric, leading describes baseline spacing, and variable-font axes select design coordinates. Ratios between them require an explicit convention.
Return current-namedValue and normalize each side of the default separately into [-1, 1], with default mapped to zero.
When to use this tool
Use Variable Font Namedinstance Axis Gap when you need to compare supplied type metrics or font-axis values on a consistent basis.
How to use the tool and how it works
- Enter current, namedValue, minimum, defaultValue, maximum. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read difference, normalizedCurrent, normalizedNamed. Use the output convention below.
Require ordered minimum, defaultValue, and maximum with positive total span and current and namedValue in range. Return current-namedValue and normalize each side of the default separately into [-1, 1], with default mapped to zero.1
OpenType uses default-centered axis normalization before optional avar remapping. This tool implements that normalization for already in-range supplied values; it does not parse a font or apply avar.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| current | User-scale coordinate on the supplied variable-font axis. | Required. Finite number. |
| namedValue | Caller-supplied named-instance coordinate on that same axis. | Required. Finite number. |
| minimum | Minimum | Required. Finite number. |
| defaultValue | Axis default; maps to normalized zero even at an axis endpoint. | Required. Finite number. |
| maximum | Maximum | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| difference | Current minus namedValue in user-axis units. | Required. Finite number. |
| normalizedCurrent | Default-centered piecewise normalized coordinate before avar remapping. | Required. Finite number. |
| normalizedNamed | Named coordinate normalized by the same default-centered rule. | Required. Finite number. |
{
"input": {
"current": 700,
"namedValue": 400,
"minimum": 100,
"defaultValue": 400,
"maximum": 900
},
"output": {
"difference": 300,
"normalizedCurrent": 0.6,
"normalizedNamed": 0
}
} Limitations and assumptions
- A default at an endpoint is allowed; this is the piecewise linear axis stage without avar remapping, font loading, registered axis semantics, or visual equivalence testing.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Read actual font metrics and variation tables when available, then proof the text in its intended renderer. A metric calculation cannot replace shaping, glyph inspection, or an actual layout test.
References
Similar or alternative tools
- Font Axis Default Reference Offset
Subtract suppliedDefault from axisValue and divide by positive suppliedScale for normalizedOffset.
- Type Cap Height Xheight Ratio
Return xHeight/capHeight and scale both design-unit heights by fontPixels/unitsPerEm.