AppleNewsAPI icon indicating copy to clipboard operation
AppleNewsAPI copied to clipboard

Add extra TextStyle and ComponentTextStyle properties

Open dabley opened this issue 2 years ago • 0 comments

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 avatar Mar 07 '22 13:03 dabley