Skip to content

Request: silently ignore missing fonts from fonts.family and fonts.family.extras #1031

Closed

Description

@AndydeCleyre

Hello, and thanks!

I like to keep a list of fonts to use, that I can use across systems, figuring that at least one of them will be on the system. And when it's not, I'll add some font that is on the system to the list. But currently Rio complains if any of the listed fonts are not found. This request is to allow and ignore fonts that are not found, until or unless a glyph can't be rendered (I don't know if there's a built-in fallback family).

For example, I'd like my config to have:

[fonts]
family = "Andysevka Term"
extras = [
  { family = "0xProto" },
  { family = "Maple Mono" },
  { family = "Sudo" },
  { family = "Fantasque Sans Mono" },
  { family = "Ubuntu Mono" },
  { family = "Comic Mono" },
  { family = "Share Tech Mono" },
  { family = "Atkinson Hyperlegible Mono" },
  { family = "Symbols Nerd Font Mono" },
  { family = "Symbols Nerd Font" },
  { family = "NanumGothicCoding" },
  { family = "Fluent Emoji Color" },
  { family = "Fluent Emoji Flat" },
  { family = "Twemoji" },
  { family = "Twitter Color Emoji" },
  { family = "SerenityOS Emoji" },
  { family = "OpenMoji Color" },
  { family = "JoyPixels" }
]

And on many systems, Andysevka Term won't be present, nor will many of the others.

That's how it seems to work in Wezterm and Ghostty.


In Wezterm, this looks like:

  font = wezterm.font_with_fallback({
    "Andysevka Term",
    "Andysevka Term Semi-Extended",
    "Andysevka Term Extended",
    "0xProto",
    "Maple Mono",
    "Sudo",
    "Fantasque Sans Mono",
    "Ubuntu Mono",
    "Comic Mono",
    "Share Tech Mono",
    "Atkinson Hyperlegible Mono",
    "Symbols Nerd Font Mono",
    "Symbols Nerd Font",
    "NanumGothicCoding",
    "Fluent Emoji Color",
    "Fluent Emoji Flat",
    "Twemoji",
    "Twitter Color Emoji",
    "SerenityOS Emoji",
    "OpenMoji Color",
    "JoyPixels",
  }),

And in Ghostty it's:

font-family = Andysevka Term
font-family = Iosevka Term Custom
font-family = 0xProto
font-family = 0xProto Nerd Font
font-family = Maple Mono
font-family = Sudo
font-family = Fantasque Sans Mono
font-family = Ubuntu Mono
font-family = Comic Mono
font-family = Share Tech Mono
font-family = Atkinson Hyperlegible Mono
font-family = Symbols Nerd Font Mono
font-family = Symbols Nerd Font
font-family = NanumGothicCoding
font-family = Fluent Emoji Color
font-family = Fluent Emoji Flat
font-family = Twemoji
font-family = Twitter Color Emoji
font-family = SerenityOS Emoji
font-family = OpenMoji Color
font-family = JoyPixels

Activity

  1. raphamorim commented on Apr 2, 2025

    @raphamorim
    Owner

    Hey @AndydeCleyre of course make sense,

    Does https://rioterm.com/docs/config#fontsextras works for you? or is it complaining?

  2. AndydeCleyre commented on Apr 2, 2025

    @AndydeCleyre
    Author

    If I'm using it properly in my first code block above, it complains for any font not present on the system.

  3. raphamorim commented on Apr 2, 2025

    @raphamorim
    Owner

    i think i will add a configuration property, fonts.ignore-extra-warnings does that works for you?

  4. AndydeCleyre commented on Apr 2, 2025

    @AndydeCleyre
    Author

    Yes, that's great, thank you!

  5. AndydeCleyre commented on Apr 2, 2025

    @AndydeCleyre
    Author

    Oh wait -- that does leave the issue of the first choice/primary font being missing sometimes.

  6. raphamorim commented on Apr 3, 2025

    @raphamorim
    Owner

    I see, would make sense to add fonts under platform? https://rioterm.com/docs/config#platform

    So you could map for each OS

  7. AndydeCleyre commented on Apr 3, 2025

    @AndydeCleyre
    Author

    It wouldn't be my preference, because on a single OS I'd like to launch Rio and see "Oh my third favorite font is being used, let me just install my favorite now," without having to change any configuration to use it.

    Honestly it's not so bad to just launch, then use the error message to comment out all missing fonts and maybe switch the first choice, but if this is to be changed it would be best to work like Wezterm and Ghostty, in my opinion.

  8. raphamorim commented on Apr 3, 2025

    @raphamorim
    Owner

    Fair, I think can be more work tbh having to map each font individually per OS but wanted to ask to confirm. I will add a fonts.disable-not-found-warnings configuration property

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions