cosmic-text/fonts/InterVariable-Italic.ttf
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

3 lines
131 B
Text

version https://git-lfs.github.com/spec/v1
oid sha256:d6f1f6a172d9e588438db9f986fd5cfad7b30f644374080a8a9d4d91e344586f
size 910252