summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Tyler Freeman <fuego@google.com> 2023-03-23 23:31:11 +0000
committer Tyler Freeman <fuego@google.com> 2023-04-13 23:57:11 +0000
commita4d59758d4790e7f32d11699a0292199dee9c12b (patch)
treedcc14c6199e552038fab892567f5d7efa35313d9 /libs/androidfw/StringPool.cpp
parentda94513967737d605b58bffbaccbe90b1f152e1c (diff)
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions