How to fix variable fonts warning?

I am using the local version of typst on Fedora. I have this:

#set text(
  font: "Noto Sans",
  size: 11pt,
)

And I get this warning:

warning: variable fonts are not currently supported and may render incorrectly
  ┌─ resume.typ:4:8
  │
4 │   font: "Noto Sans",
  │         ^^^^^^^^^^^
  │
  = hint: try installing a static version of "noto sans" instead

But I don’t know how to do that. I tried specifying Noto Sans Regular instead, but that doesn’t work.

Duplicate of

By the way, I can not reproduce ur result, do u use the newest Typst, i.e. v14.2?

That question is about silencing the warning, not fixing the problem about variable fonts.

I’m using typst 0.14.2

1 Like

Hi, welcome to the forum!

Static and variable fonts are two font formats (≈ two kinds of *.otf files). A font may distribute both formats.

You can download static versions of Noto Sans from notofonts.github.io/fonts/NotoSans/unhinted/otf at main · notofonts/notofonts.github.io · GitHub. For example, NotoSans-Regular.otf.

Old answer

You can download static versions of Noto Sans from Noto Dashboard. For example, https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSans/unhinted/otf/NotoSans-Regular.otf.

1 Like

Sorry for the late reply.

That doesn’t work for me. When I try to install the font, KDE Plasma says

file:///home/riley/Downloads/NotoSans-Regular.otf contains the font Noto Sans, Regular, which is already installed on your system.

Well, most font designers set different names (e.g., Source Han Serif VF vs. Source Han Serif), but Google is an exception.

Two options:

  • Uninstall the variable version and install the static version.
  • Download the static version, and set --font-path or $TYPST_FONT_PATHS to Typst. If you need further details, please tell us your platform (VS Code + Tinymist?).

I’m using VSCode and Tinymist, but compiling via the CLI.

Thanks, using --font-path worked.