Skip to content
Lamina PDF
Unreleased

These docs describe changes that aren’t released yet. For the newest release, see the released docs.

invalid-axis-value

All codes

  • Type: error
  • Kind: usage (the caller misused the API)

What happened

Font::instance was given a NaN or infinite axis value.

Why

Variation coordinates are user-space numbers such as wght 700; NaN and infinities have no position on an axis.

How to fix

Pass finite values; values outside the axis range are clamped, so there is no need for infinities.

Example

font.instance(&[(OpenTypeTag::WEIGHT, f32::NAN)])?; // invalid-axis-value

Data fields

  • tag: the axis.