Closed ksokolovskyi closed 11 months ago
According to the Flutter documentation of the TextStyle class (https://api.flutter.dev/flutter/painting/TextStyle/height.html): height - "The height of this text span, as a multiple of the font size."
TextStyle
height
Currently, when the user sets a Line height parameter of the font, the plugin just uses this value for the height of the TextStyle, which is wrong.
Line height
I propose to do the next:
Line height unit == AUTO
Line height unit == PIXELS
lineHeight.value / fontSize
Line height unit == PERCENT
lineHeight.value / 100
According to the Flutter documentation of the
TextStyle
class (https://api.flutter.dev/flutter/painting/TextStyle/height.html):height
- "The height of this text span, as a multiple of the font size."Currently, when the user sets a
Line height
parameter of the font, the plugin just uses this value for the height of theTextStyle
, which is wrong.I propose to do the next:
Line height unit == AUTO
: skip it inTextStyle
;Line height unit == PIXELS
: set value aslineHeight.value / fontSize
inTextStyle
;Line height unit == PERCENT
: set value aslineHeight.value / 100
inTextStyle
.