fix(non linear font scaling): preserve proportionality of lineHeight when...
fix(non linear font scaling): preserve proportionality of lineHeight when non-linear font scaling is in effect This ensures that the design intent is preserved when using large font scales and non-linear font scaling: the line height proportions should still match even when using SP units for both text size and line height. If the dev does not define both textSize and lineHeight in SP units, we don't do the corrective recalculation. Unfortunately, this could result in cramped-looking text due to the lineHeight not scaling with text size. There are linters to warn the developer of this though, so we hope they do the right thing. Bug: 273326061 Test: atest cts/tests/tests/widget/src/android/widget/cts/TextViewFontScalingTest.kt Change-Id: I17f9b7c8d3e0e63deed4037ebf0e99b690bc694a
Loading
Please register or sign in to comment