Skip to content

[ BUG ] Code snippets aren't rendered in a monospaced font when custom fonts are disabled #312

@gebsh

Description

@gebsh

Browser on which this bug occurs

Mozilla Firefox

Expected Behavior

<code> and <pre> elements should use a monospaced font.

Actual Behavior

<code> and <pre> use a default (usually sans-serif) font when custom fonts are disabled in browser settings.

Extra Details

Firefox allows disabling custom fonts in browser settings. However, <code> and <pre> elements on the Ghostty website only specify JetBrains Mono for font-family, which, when combined with that browser setting, results in them using the default font:

A screenshot of the Ghostty documentation, with a code block and inline code elements rendered in the same sans-serif font as the adjacent text.

Could you consider appending the generic monospace font family to code snippets to ensure that they stay monospaced regardless of that browser setting?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions