fix(HCT): text not being centered within the background
The root cause is that line breaks with trailing spaces create extra blank areas. We need a pre-emptive check for spaces; if a space is found, its background should not be rendered. Spaces in the middle of a line will have the background drawn along with the subsequent text, while spaces at the end of a line, the line will have a rectangle drawn using the onEnd method. Bug: 394118810 Flag: com.android.graphics.hwui.flags.high_contrast_text_small_text_rect Test: atest core/tests/coretests/src/android/text/LayoutTest.java Change-Id: Ibf805b5e6681963f17a4df66853f83f8219c1302
Loading
Please register or sign in to comment