Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix text extent calculation in SkijaGC #156

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

HeikoKlare
Copy link

SkijaGC text extent calculation did not properly consider trailing whitespaces. The bounding box calculated by the textExtent operation does not consider those whitespaces. This change replaces the calculation to properly consider the actual text width and the height of the font instead of the height of the actual text to conform with the behavior of existing GC implementations.

Copy link

github-actions bot commented Mar 12, 2025

Test Results

   341 files  +3     341 suites  +3   2m 22s ⏱️ +9s
 3 955 tests +1   3 671 ✅ +1  284 💤 ±0  0 ❌ ±0 
11 693 runs  +3  10 808 ✅ +3  885 💤 ±0  0 ❌ ±0 

Results for commit 84eb042. ± Comparison against base commit 451e42a.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare force-pushed the skijagc-extent-calculation branch 2 times, most recently from 61e6dc8 to fb0a667 Compare March 12, 2025 13:46
@HeikoKlare HeikoKlare marked this pull request as ready for review March 12, 2025 13:54
@HeikoKlare HeikoKlare force-pushed the skijagc-extent-calculation branch 2 times, most recently from 15b9ae1 to 9327caf Compare March 12, 2025 15:48
SkijaGC text extent calculation did not properly consider trailing
whitespaces. The bounding box calculated by the textExtent operation
does not consider those whitespaces. This change replaces the
calculation to properly consider the actual text width and the height of
the font instead of the height of the actual text to conform with the
behavior of existing GC implementations.
@HeikoKlare HeikoKlare force-pushed the skijagc-extent-calculation branch from 9327caf to 84eb042 Compare March 12, 2025 15:55
@HeikoKlare HeikoKlare merged commit fc17e56 into master Mar 12, 2025
5 checks passed
@HeikoKlare HeikoKlare deleted the skijagc-extent-calculation branch March 12, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant