rust-lang / rust-lang/mdBook

Local custom font files are serialized since version 0.5 - how to reference them?

Open
#2,958 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-question
Dominant language
Rust
Stars
22.2k
Forks
1.9k
PR merge metrics
PR metrics pending

Description

Question

Local custom font files are now serialized, which results in files like fonts/fira-code-v27-latin-300-0fc02cbc.woff2 (fira-code-v27-latin-300.woff2 is the original filename) in the output/html folder. The serialized CSS file (like fonts/fonts-3c66ea91.css) is linked correctly in the HTML files, but the fonts can't be loaded because the paths to the font files inside the CSS are not correct, they still point to the filenames without the serial. Maybe I just missed something, any hints?

Version
mdbook v0.5.1

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

Reproduce the issue with mdBook v0.5.1 using a local custom font, then inspect the generated HTML and serialized CSS in the output/html folder. Confirm that the CSS references the serialized font filename and that the font loads successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.