typst / typst/typst

Warn when font in SVG is not found

Open
#8,442 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

diagnostics feature request svg text
Dominant language
Rust
Stars
56.1k
Forks
1.7k
Avg merge
3d 10h
Merged PRs (30d)
22

Description

Description

I have an SVG where the font-family is specified as "Deja Vu Sans". The correct name is "DejaVu Sans", so the Typst compiler doesn't find it on the system and silently falls back to the text font for rendering - in my case New Computer Modern. It would be nice if the CLI would emit a warning that the specified font was not found and that the fallback font was used for rendering the SVG inside the PDF.

Use Case

Debug issues with SVGs looking different in the PDF than e.g., on the internet.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with an SVG whose font-family is "Deja Vu Sans" and inspect the SVG-to-PDF font resolution path. Done means the CLI warns that the specified font was not found and that a fallback font was used, without changing behavior when the font is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.