cosmic-text/fonts
Wren [Undefined] a03faa654d
Variable font support (#400)
* Variable font support

Here's a pretty naïve solution for variable fonts.

The iterator doesn't use the match keys' weight, but instead tries to
get the requested ideal weight, if the font is variable, otherwise it is
ignored and the actual (non-variable) weight is used. This is because I
didn't implement finding variable weight support for match keys; doing
so would be impossible without parsing TTF files when matching and I
didn't want to add that potentially expensive infrastructure if not
entirely necessary.

This is a breaking change, and I'm open for ideas on how to fix that
if it's an issue.

* cargo fmt

* Add variable font example to rich-text example
2025-07-07 08:50:40 -06:00
..
FiraMono-LICENSE Fix #134 and include a test for it. 2023-08-25 21:00:46 -04:00
FiraMono-Medium.ttf Add image render tests 2023-09-27 11:57:18 +03:00
Inter-LICENSE Embed font for wrap_word_fallback test 2024-06-06 19:38:40 -06:00
Inter-Regular.ttf Embed font for wrap_word_fallback test 2024-06-06 19:38:40 -06:00
InterVariable-Italic.ttf Variable font support (#400) 2025-07-07 08:50:40 -06:00
InterVariable.ttf Variable font support (#400) 2025-07-07 08:50:40 -06:00
NotoSans-LICENSE Add image render tests 2023-09-27 11:57:18 +03:00
NotoSans-Regular.ttf Add image render tests 2023-09-27 11:57:18 +03:00
NotoSansArabic.ttf Add image render tests 2023-09-27 11:57:18 +03:00
NotoSansHebrew.ttf Add image render tests 2023-09-27 11:57:18 +03:00