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

Italic CascadiaCove Nerd Font is loaded completely wrong #95

Closed
fredizzimo opened this issue Jul 25, 2024 · 2 comments · Fixed by #104
Closed

Italic CascadiaCove Nerd Font is loaded completely wrong #95

fredizzimo opened this issue Jul 25, 2024 · 2 comments · Fixed by #104

Comments

@fredizzimo
Copy link
Contributor

fredizzimo commented Jul 25, 2024

StyleProperty::FontStack(FontStack::Source("CaskaydiaCove Nerd Font" ))
StyleProperty::FontStyle(FontStyle::Italic)

Loads as semilight with embolden set to true: CaskaydiaCove NF SemiLight Italic, but CaskaydiaCove NF Italic should be loaded, which has the regular 400 weight, and does not need embolden.

So, this is like a combination of:

But in this case embolden is actually set, although a boolean is not very useful for this case, since if no 400 weight was available, it would only need to embolden 50 units, or almost nothing. Compared to almost doubling the weight to make it bold.

OS: Linux

@dfrg
Copy link
Collaborator

dfrg commented Jul 27, 2024

Hazarding a guess, this might have to do with the transform fontconfig applies in attempt to fit all fonts into the RBIZ model. We do try to undo this to achieve proper family grouping but it’s likely that some patterns have been missed leading to poor matching.

edit: this list is missing “SemiLight”:

const SUFFIXES: &[&str] = &[

@nicoburns
Copy link
Contributor

RBIZ model

For anyone else wondering what this is it's:

  • R - Regular
  • B - Bold
  • I - Italic
  • Z - Bold Italic

And the idea that these are the only 4 font variants (that fits neatly with the typical boolean Bold and Italic buttons in word processors)

github-merge-queue bot pushed a commit that referenced this issue Aug 14, 2024
… cache (#104)

The fonts do not always have these pattern elements defined, and then
the value of the previous font was wrongly used. Clearing the values,
fixes that and ensures that the default values are used. For a more
detailed description see
#92 (comment)

* Fixes #93 
* Fixes #95
* Fixes #96
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 a pull request may close this issue.

3 participants