Skip to content

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.

dabley added 5 commits March 7, 2022 12:49
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