RESOLVED CONFIGURATION CHANGED 215258
SVG textPath startOffset unitless decimals values are interpreted as relative to the path length
https://bugs.webkit.org/show_bug.cgi?id=215258
Summary SVG textPath startOffset unitless decimals values are interpreted as relative...
Chris Dowling
Reported 2020-08-06 23:58:43 PDT
Created attachment 406155 [details] Image showing two textPaths, one with percentage and one with decimal startOffset - both render identical in Safari When specifying a unitless decimal value for the startOffset attribute of a textPath element, I would expect the text to be indented by an absolute amount - the specified distance in the user's coordinate system (see https://www.w3.org/TR/SVG11/text.html#TextPathElementStartOffsetAttribute). EG. `startOffset="0.4"` I would expect to indent the text 0.4 units Instead what happens is the decimal is interpreted as a fraction of the total path length. So a value of `0.4` is the same as `40%`. In the attached SVG and the linked CodePen the two textPaths should render with the text offset by different amounts. In Safari they appear identical.
Attachments
Image showing two textPaths, one with percentage and one with decimal startOffset - both render identical in Safari (515 bytes, image/svg+xml)
2020-08-06 23:58 PDT, Chris Dowling
no flags
Radar WebKit Bug Importer
Comment 1 2020-08-08 17:49:46 PDT
Ahmad Saleem
Comment 2 2022-09-03 11:23:55 PDT
I am able to reproduce this bug in Safari 15.6.1 on macOS 12.5.1 but not in Safari Technology Preview 152 and it matches with other browsers (Chrome Canary 107 and Firefox Nightly 106). I am going to mark other engineers to find right commit but I am going to close this as "RESOLVED CONFIGURATION CHANGED". Thanks! In Safari 15.6.1, the circle / image is huge (kind of like zoomed in) while in STP 152, it is in reasonable size similar to other browsers.
Note You need to log in before you can comment on or make changes to this bug.