Skip to main content

font

A font from a font_picker setting.

You can use the font object in Liquid assets or inside a style tag to apply font setting values to theme CSS.


Tip

Use font filters to modify properties of the font object, load the font, or obtain font variants.


Properties

Anchor to
baseline_ratio

The baseline ratio of the font as a decimal.

Anchor to
fallback_families

The fallback families of the font.

The family name of the font.

Tip

If the family name contains non-alphanumeric characters (A-Z, a-z, 0-9, or '-'), then it will be wrapped in double quotes.

The style of the font.

Returns true if the font is a system font. Returns false if not.

Tip

You can use this property to determine whether you need to include a corresponding font-face declaration for the font.

Anchor to
variants
array of font

The variants in the family of the font.

The weight of the font.

{
"baseline_ratio": 0.133,
"fallback_families": "sans-serif",
"family": "Assistant",
"style": "normal",
"system?": false,
"variants": {},
"weight": "400"
}
Was this section helpful?