Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a4d59758 authored by Tyler Freeman's avatar Tyler Freeman
Browse files

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
parent da945139
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment