Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra TextStyle and ComponentTextStyle properties #32

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dabley
Copy link

@dabley dabley commented Mar 7, 2022

These changes add support for a number of additional TextStyle and ComponentTextStyle properties:

Extra TextStyle properties:

  • fontFamily
  • fontWeight
  • fontStyle
  • fontWidth

Extra ComponentTextStyle properties:

  • firstLineIndent
  • fontScalng
  • hangingPunctuation
  • paragraphSpacingAfter
  • paragraphSpacingBefore

The TextStyle::fontWeight property is allowed to be a string or an integer, so that it can be set to a named font weight (e.g. "medium") or a numeric one (e.g. 500). (Applenews doesnt allow numeric font weights to be supplied as strings - so "500" is not valid.)

The ComponentTextStyle::linkStyle property can now optionally be set using an array, which makes things easier when creating a ComponentTextStyle object.

As well as strings representing named font weights, the fontWeight property
can also be an integer. Note that Apple News does not allow an integer
fontWeight to be given as a string.
This allows the linkStyle property to be set easily with values from a
config entity object.
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.

1 participant