Skip to content

parley: drop Source OpenType settings, simplify settings types#506

Open
waywardmonkeys wants to merge 1 commit intolinebender:mainfrom
waywardmonkeys:remove-opentype-settings-source
Open

parley: drop Source OpenType settings, simplify settings types#506
waywardmonkeys wants to merge 1 commit intolinebender:mainfrom
waywardmonkeys:remove-opentype-settings-source

Conversation

@waywardmonkeys
Copy link
Contributor

  • Remove Source variants and From<&str> for FontFeatures / FontVariations; Parley no longer parses CSS-like OpenType strings during resolution.
  • Add a unit test demonstrating text_primitives::{FontFeature, FontVariation}::parse_css_list and passing the typed lists into Parley.
  • Replace the now-single-variant enums with newtype wrappers around Cow<[FontFeature]> / Cow<[FontVariation]> for simpler, slice-like ergonomics.
  • Add StyleProperty conversions from &[FontFeature], &[FontVariation], and &[T; N]; simplify resolution helpers to operate on slices and update tests.

* Remove `Source` variants and `From<&str>` for `FontFeatures` / `FontVariations`; Parley no longer parses CSS-like OpenType strings during resolution.
* Add a unit test demonstrating `text_primitives::{FontFeature, FontVariation}::parse_css_list` and passing the typed lists into Parley.
* Replace the now-single-variant enums with newtype wrappers around `Cow<[FontFeature]>` / `Cow<[FontVariation]>` for simpler, slice-like ergonomics.
* Add `StyleProperty` conversions from `&[FontFeature]`, `&[FontVariation]`, and `&[T; N]`; simplify resolution helpers to operate on slices and update tests.
@waywardmonkeys waywardmonkeys requested review from dfrg and taj-p January 10, 2026 09:20
@dfrg
Copy link
Collaborator

dfrg commented Jan 13, 2026

To me, this breaks the nice symmetry with FontFamily for list like properties. I think we should either drop the font family type or move these to text_primitives.

Copy link
Contributor

@taj-p taj-p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be OBE? If not, please re-request after addressing Chad's comment and I can take a look 🙏

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.

3 participants