You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line height is a multiplier in Flutter, and is calculated per line based on the largest text in the line. In XD it is a fixed value for all lines in a field. This may result in significant differences when displaying multiline text having multiple text sizes.
It may be possible to improve on this by calculating a line height for each TextSpan individually, though it would require knowing what the "default" line height is.
The unknown is calculating the default height if linespacing is 0. It would also be nice to use that to omit the line spacing code if a range is using the default.
The text was updated successfully, but these errors were encountered:
It may be possible to improve on this by calculating a line height for each TextSpan individually, though it would require knowing what the "default" line height is.
Ex.
spanHeight = (xdNode.lineSpacing ?? _calculateDefaultHeight()) / (span.fontSize)
The unknown is calculating the default height if linespacing is 0. It would also be nice to use that to omit the line spacing code if a range is using the default.
The text was updated successfully, but these errors were encountered: