You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diagnosticsImprovements to compiler errorsfeature requestNew feature or requesttextRelated to the text category, which is all about text handling, shaping, etc.
When setting the font say globally, with #set text(font: "abcdefg"), if the font is not found (say because it doesn't exist), the output of typst compile doesn't change and the compiler doesn't throw any errors. An error should also be thrown if the appropriate weight/size/etc. cannot be used.
Use Case
This follows the Principle of Least Surprise: if you manually set the font and the output doesn't change, that's strange. The compiler should throw an error (or at the very least, a warning).
Reacted by Akshay Raj Gollahalli, abejlq, Justin Kunimune, Mark Janssen and Léana
The docs indicate that it is planned to issue a warning if a font is specified and fallbacks are disabled:
Note: Currently, there are no warnings when fallback is disabled and no glyphs are found. Instead, your text shows up in the form of "tofus": Small boxes that indicate the lack of an appropriate glyph. In the future, you will be able to instruct Typst to issue warnings so you know something is up.
It should definitely not throw an error, but a warning is indeed planned.
I was sure there was an issue tracking this, but couldn't find one, so I guess this can stay up. Though I'd prefer if you changed the title to warning @adamkrellenstein
I would suggest to add an option for typst to throw warnings as errors, similarly as it is done in C++, C with -Werror flag.
Typst is being integrated into scripts that compiles documents and missing fonts are important issue that needs to be easily detectable by automated scripts and could be missed while parsing stdout because between versions warning text could change. I would prefer not compiling document and returning non zero status code/error vs parsing stdout.
I would suggest to add an option for typst to throw warnings as errors, similarly as it is done in C++, C with -Werror flag.
Typst is being integrated into scripts that compiles documents and missing fonts are important issue that needs to be easily detectable by automated scripts and could be missed while parsing stdout because between versions warning text could change. I would prefer not compiling document and returning non zero status code/error vs parsing stdout.
I was planning to open a feature request to enable warnings when there is a mismatch in font weight, style, or stretch. However, I noticed that this closed issue already requested something similar:
An error should also be thrown if the appropriate weight/size/etc. cannot be used.
Before I open a new issue, I wanted to confirm: is this closed issue considered fully resolved? Should I submit a new issue, or should I ask for the closed one to be reopened?
diagnosticsImprovements to compiler errorsfeature requestNew feature or requesttextRelated to the text category, which is all about text handling, shaping, etc.
Activity
[-]Throw an Error when a Required Font is not Found[/-][+]Throw an Error when a Font is not Found[/+]maxcrees commentedon Dec 1, 2023
The docs indicate that it is planned to issue a warning if a font is specified and fallbacks are disabled:
https://typst.app/docs/reference/text/text/#parameters-fallback
I don't think this is implemented yet however - and I'm on mobile so I can't test at the moment.
Enivex commentedon Dec 1, 2023
It should definitely not throw an error, but a warning is indeed planned.
I was sure there was an issue tracking this, but couldn't find one, so I guess this can stay up. Though I'd prefer if you changed the title to warning @adamkrellenstein
[-]Throw an Error when a Font is not Found[/-][+]Throw an Warning when a Font is not Found[/+]adamkrellenstein commentedon Dec 1, 2023
It seems to me that a warning should still be printed even when fallbacks are not disabled.
IMO this warning should also identify [the first
n] missing glyphs and the source of their replacements.[-]Throw an Warning when a Font is not Found[/-][+]Throw a Warning when a Font is not Found[/+]PPakalns commentedon Dec 1, 2023
I would suggest to add an option for typst to throw warnings as errors, similarly as it is done in C++, C with -Werror flag.
Typst is being integrated into scripts that compiles documents and missing fonts are important issue that needs to be easily detectable by automated scripts and could be missed while parsing stdout because between versions warning text could change. I would prefer not compiling document and returning non zero status code/error vs parsing stdout.
Enivex commentedon Dec 1, 2023
This would be covered by #1967 no?
laurmaedje commentedon Jul 15, 2024
Closed by #3854
hooyuser commentedon Dec 4, 2025
I was planning to open a feature request to enable warnings when there is a mismatch in font weight, style, or stretch. However, I noticed that this closed issue already requested something similar:
Before I open a new issue, I wanted to confirm: is this closed issue considered fully resolved? Should I submit a new issue, or should I ask for the closed one to be reopened?
Related PR: #3352 #3354
laurmaedje commentedon Dec 4, 2025
Please submit a new issue.