Skip to content

Font Modify ​

Last updated View as Markdown

Returns another variant of the same font family, or nothing if the family does not have it.

Parameters ​

  • The property to change: weight or style.
  • The new value:
PropertyValues
weight100 to 900, normal (400), bold (700), +100 or -100 relative to the current weight, bolder or lighter for the next available weight
stylenormal, italic or oblique

Example ​

liquid
{% assign bold = settings.body_font | font_modify: 'weight', 'bold' %}
{% assign italic = settings.body_font | font_modify: 'style', 'italic' %}

{{ bold | font_face }}
{{ italic | font_face }}

strong {
  font-weight: {{ bold.weight | default: 700 }};
}