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

Commit 1beb2830 authored by chenjean's avatar chenjean
Browse files

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
parent 107fe807
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment