Skip to content

Conversation

@waywardmonkeys
Copy link
Contributor

Change TextStyle to take two lifetimes: one for FontFamily and one for OpenType settings (FontVariations / FontFeatures). This lets callers keep a long-lived font-family value while borrowing per-run settings without forcing both to share a single lifetime.

Update internal APIs and tests to use TextStyle<'_, '_, B>.

Change `TextStyle` to take two lifetimes: one for `FontFamily` and one for OpenType
settings (`FontVariations` / `FontFeatures`). This lets callers keep a long-lived
font-family value while borrowing per-run settings without forcing both to share
a single lifetime.

Update internal APIs and tests to use `TextStyle<'_, '_, B>`.
@waywardmonkeys
Copy link
Contributor Author

This is split from #516 and should be more generally useful.

@waywardmonkeys
Copy link
Contributor Author

If we do something to change the lifetime structure of the font family, then this might be less necessary. But that also isn't currently clear...

@waywardmonkeys waywardmonkeys requested review from dfrg and taj-p January 17, 2026 07:26
@waywardmonkeys waywardmonkeys added this pull request to the merge queue Jan 17, 2026
Merged via the queue into linebender:main with commit 1044b8b Jan 17, 2026
24 checks passed
@waywardmonkeys waywardmonkeys deleted the textstyle-lifetime-split branch January 17, 2026 23:42
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.

2 participants