Skip to content
Fontsource Logo
Documentation

Variable

The Variable endpoint allows you get specific axis data for a variable font.

HTTP Request

  • GET https://api.fontsource.org/v1/variable/{id}

Response

The API response for the Variable endpoint is a JSON object that provides axis data for a variable font.

Attributes

Returns an object with:

AttributeTypeDescription
familystringFont family
axesRecord<string, AxesData>Axis data

AxesData

AttributeTypeDescription
defaultnumberDefault value
minnumberMinimum value
maxnumberMaximum value
stepnumberStep value

Response example

{
  "axes": {
    "slnt": {
      "default": "0",
      "min": "-10",
      "max": "0",
      "step": "1"
    },
    "wght": {
      "default": "400",
      "min": "100",
      "max": "900",
      "step": "1"
    }
  },
  "family": "Inter"
}
json

Example

  • GET https://api.fontsource.org/v1/variable/inter
  • GET https://api.fontsource.org/v1/variable/roboto-flex
  • GET https://api.fontsource.org/v1/variable/wavefont