Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font Improvements #2143

Merged
merged 10 commits into from
Aug 24, 2024
Merged

Font Improvements #2143

merged 10 commits into from
Aug 24, 2024

Conversation

mitchellh
Copy link
Contributor

@mitchellh mitchellh commented Aug 24, 2024

Fixes #2141
Improves #2140

Multiple fixes or improvements:

  • If a style isn't found for a defined font family, we fallback to the regular face instead of looking for a fallback family that supports the style. This is less jarring. (do not fallback to a different font family for a style if the style isn't supported #2141)

  • If bold italic isn't supported, we fallback to italic first if it's available. If italic isn't available, we fallback to the regular font style.

  • If a font variation setting is set (font-variation-*) and the defined font style is not found, then we retry searching for the font family without the style bits set. This addresses fonts that don't set that they support certain styles. (Berkeley Mono Variable not automatically finding bold variant #2140)

  • Non-regular font variations are now respected. This was a typo where we were only applying the regular font variation (font-variation) and ignoring styled variations (font-variation-bold). No reported bug for this.

@mitchellh mitchellh merged commit 98f7ed2 into main Aug 24, 2024
36 checks passed
@mitchellh mitchellh deleted the font-tweaks branch August 24, 2024 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

do not fallback to a different font family for a style if the style isn't supported
1 participant