Skip to content

Commit

Permalink
fontique: Clear weight, style and stretch when parsing the fontconfig…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
fredizzimo authored Aug 14, 2024
1 parent 2ec4147 commit d8fa0bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fontique/src/backend/fontconfig/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ impl CachedFont {
self.path.clear();
self.index = 0;
self.coverage.clear();
self.weight = Weight::default();
self.style = Style::default();
self.stretch = Stretch::default();
}
}

Expand Down

0 comments on commit d8fa0bf

Please sign in to comment.