RESOLVED INVALID 150224
a DOM-element's style.width differs from canvas.measureText for identical string and css
https://bugs.webkit.org/show_bug.cgi?id=150224
Summary a DOM-element's style.width differs from canvas.measureText for identical str...
Daniel Böhringer
Reported 2015-10-15 23:11:11 PDT
when i size a string in canvas with a css font, i expect that a span containing the same string and the same css font returns the same width (style.with property), given zero border/maring and zero padding settings. this is not the case in safari (any version, any OS). works as expected in the other major browsers.
Attachments
Daniel Böhringer
Comment 1 2016-10-09 04:43:03 PDT
The situation has improved in the meantime substantially. The issue is mostly resolved. However, text sizing is still wrong sometimes if you set the font every tome before sizing, even if that font is already set.
Daniel Böhringer
Comment 2 2016-10-09 04:48:53 PDT
Sorry, should read: The situation has improved in the meantime substantially. The issue is mostly resolved. However, text sizing is still wrong sometimes _unless_ you set the font every time before sizing, even if that font is already set.
Brent Fulgham
Comment 3 2022-07-18 14:42:55 PDT
It's difficult to confirm this bug without a test case. We don't believe there is an ongoing issue here. If you do feel there is a problem, please REOPEN this bug and include a test case illustrating the issue.
Note You need to log in before you can comment on or make changes to this bug.