RESOLVED FIXED 118818
Account for zoom when computing SVG font size
https://bugs.webkit.org/show_bug.cgi?id=118818
Summary Account for zoom when computing SVG font size
Ryosuke Niwa
Reported 2013-07-17 15:11:36 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/5624c6e475af92d541edc8a3394602e320d00323 Previously, text that was zoomed appeared larger than geometry under the same zoom value. This was caused by two bugs: 1) When setting the computed font size, we incorrectly referenced the computedTextSize instead of the specified size. 2) Text with GeometricPrecision did not set a computed size but instead relied on the text size being correct. This change addresses both of these issues and adds a test to prove correctness.
Attachments
Simon Fraser (smfr)
Comment 1 2022-09-17 09:28:20 PDT
Ahmad Saleem
Comment 2 2022-09-19 00:52:01 PDT
There is an issue in this patch as it is and cause following regression: https://src.chromium.org/viewvc/blink?view=revision&revision=180995
Ahmad Saleem
Comment 3 2022-09-20 02:50:55 PDT
Just to document my PR attempt: https://github.com/WebKit/WebKit/pull/4011 ____________ 1) ScalingFactor can go below '1' so restricting it at "1" is not ideal. Someone need to think about on how to add this to the code and manage it. 2) iOS-wk2 has "text-size-adjst" in svg.css as "UA" stylesheet, so "font-small-enlarged-minimum-larger-expected.svg" does not work and have to add "platform" specific expectations. 3) font-small-enlarged-minimum-larger-expected.svg has "Script" in it, while it can be hardcoded to "80" to work perfectly fine except (2). 4) Due to LBSE work, GeometricPrecision work is now handled differently. ___________ Further, this patch had issue, which was resolved further in Comment 02 patch, so when merging, you had to account for both. I am waiting on final response but if I am not able to tackle it. I will close my PR 4011 and then leave it to someone else to finish it. Just wanted to summarise the work here.
Ahmad Saleem
Comment 4 2023-10-03 15:03:02 PDT
It is reproducible in LBSE only for 'purple' container, where the text 'A' does not go out of 'yellow' constraint but 'purple' container does get bigger. Adding tag to flag following issue.
Ahmad Saleem
Comment 5 2023-10-25 04:03:00 PDT
Fujii Hironori
Comment 6 2024-07-24 13:07:10 PDT
*** Bug 276984 has been marked as a duplicate of this bug. ***
Fujii Hironori
Comment 7 2024-07-30 00:42:22 PDT
EWS
Comment 8 2024-08-06 15:18:59 PDT
Committed 281919@main (6639b68a68a6): <https://commits.webkit.org/281919@main> Reviewed commits have been landed. Closing PR #31452 and removing active labels.
Radar WebKit Bug Importer
Comment 9 2024-08-06 15:19:14 PDT
Note You need to log in before you can comment on or make changes to this bug.