Skip to content

Add quotes to font names #326

@RUN-Projects

Description

@RUN-Projects

There are no keywords in the font-detect-rhl font lists, so it is recommended that they be wrapped in quotes. Earlier examples did not do so (my fault). Most do also work perfectly fine without quotes, except where special characters are in the font name.

On the other hand a font request for a keyword placed in quotes, like 'sans-serif', will look for a font by that specific name instead of applying the keyword. When not found, with no additional fallback font the default system font or browser's standard font will be applied. That could coincidentally be a sans-serif font (e.g., Arial), though it might be a monospace font (e.g., Courier), or a serif font (e.g., Times New Roman), or another type.

Here is an updated tailwind example showing one approach to taking keywords into account and adjusting on whether or not to apply quotes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions