Unknown font family: ubuntu mono #9

Open
opened 2025-08-17 12:56:55 +00:00 by jarinox · 3 comments

When using rivet-typst 0.3.0 on the typst.app web editor it generates the warning "Unknown font family: ubuntu mono"

When using rivet-typst 0.3.0 on the typst.app web editor it generates the warning "Unknown font family: ubuntu mono"
Owner

You can configure an alternative font using the config options default-font-family and italic-font-family
For example:

#import "@preview/rivet:0.3.0": config, schema

#set page(width: auto, height: auto, margin: .5cm)
#let conf = config.config(
  default-font-family: "Comic Neue",
  italic-font-family: "Comic Neue",
  full-page: true
)
#let branch = schema.load(```yaml
structures:
  main:
    bits: 4
    ranges:
      3:
        name: A
        description: Test boolean
        values:
          0: off
          1: on
      2:
        name: 0
      1:
        name: 1
      0:
        name: 1
```)
#schema.render(branch, config: conf)

a.png

You can configure an alternative font using the config options `default-font-family` and `italic-font-family` For example: ```typst #import "@preview/rivet:0.3.0": config, schema #set page(width: auto, height: auto, margin: .5cm) #let conf = config.config( default-font-family: "Comic Neue", italic-font-family: "Comic Neue", full-page: true ) #let branch = schema.load(```yaml structures: main: bits: 4 ranges: 3: name: A description: Test boolean values: 0: off 1: on 2: name: 0 1: name: 1 0: name: 1 ```) #schema.render(branch, config: conf) ``` ![a.png](/attachments/cd6f950e-777b-405b-ad85-ac037a194a88)
20 KiB
Owner

I do agree that putting Ubuntu Mono as the default is not ideal since it is not available on the web-app

I do agree that putting Ubuntu Mono as the default is not ideal since it is not available on the web-app
Author

Thanks! Explicitly setting the font resolves the warning.

Maybe DejaVu Sans Mono would work better as the default font. It is available on the web-app and preinstalled on most Linux distributions. However I see that Ubuntu Mono probably looks better.

Another option would be to set the default font to default-font-family: ("Ubuntu Mono", "DejaVu Sans Mono"). This will still cause the warning. However it will make sure a Monospace font is used even when Ubuntu Mono is not installed.

Anyway, thank you for this awesome package!

Thanks! Explicitly setting the font resolves the warning. Maybe `DejaVu Sans Mono` would work better as the default font. It is available on the web-app and preinstalled on most Linux distributions. However I see that _Ubuntu Mono_ probably looks better. Another option would be to set the default font to `default-font-family: ("Ubuntu Mono", "DejaVu Sans Mono")`. This will still cause the warning. However it will make sure a Monospace font is used even when _Ubuntu Mono_ is not installed. Anyway, thank you for this awesome package!
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HEL/rivet-typst#9
No description provided.