React

Fonts

Learn how to apply Crispy's recommended font stack to your application.

Overview

@seed-design/css provides a recommended font stack as the --seed-font-family variable. Which fonts are recommended and why is covered in Typography.

--seed-font-family:
  -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
  "Pretendard Variable", Pretendard, "Segoe UI", Roboto, "Helvetica Neue",
  Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
  "Segoe UI Symbol", "Noto Color Emoji";

Crispy does not automatically apply this value anywhere, so you must choose where to apply it. After importing base.css or all.css, reference it as follows:

style.css
body {
  font-family: var(--seed-font-family);
}

Declare on body rather than html

If you enable the fontScaling option on the bundler plugin, Crispy applies the following rule on iOS:

@supports (font: -apple-system-body) {
  html[data-seed-platform="ios"][data-seed-font-scaling="enabled"] {
    font: -apple-system-body;
  }
}

Since font as a shorthand also sets font-family, font-family declared directly on html may be overridden and ignored in environments using fontScaling.

  • When using base.css, declare font-family on body.
  • When using base.layered.css (Cascade Layers), it's recommended to declare font-family on body. If you must declare it on html, place it outside layers (unlayered) or in a layer after seed-base.

Show Pretendard on Windows

To show Pretendard instead of Malgun Gothic on Windows, your product must use --seed-font-family while also loading the Pretendard web font directly. --seed-font-family only lists recommended names; it does not download the font.

Since multiple font weights are typically used, variable dynamic subsetting is recommended. For details, refer to the Pretendard project.

Table of contents