tight kerning for characters rendering on Canvas in Google Sheets
Categories
(Core :: Graphics: Canvas2D, defect, P3)
Tracking
()
People
(Reporter: karlcow, Assigned: bradwerth)
References
()
Details
(Keywords: webcompat:platform-bug)
Attachments
(5 files)
[Tracking Requested - why for this release]:
This has happened for a while already, and its not a breaking behavior, but given this is Google Sheets with a lot of users from a Webcompat priority point of view this is important, but not critical.
- With Firefox on Windows
- Go to https://docs.google.com
- Open a blank sheet.
- In a cell type "8x version of »
Expected:
Character spacing is good
Actual:
Character spacing is tight
Note:
https://github.com/webcompat/web-bugs/issues/94457
This doesn’t happen on macOS.
This doesn’t happen on Chrome.
Note Google has been contacted already and suspected this is on Firefox side and text rendering in Canvas.
![]() |
Reporter | |
Comment 1•3 years ago
|
||
Probably having a test case that would reproduce the issue outside of Google Sheets would help here.
![]() |
Reporter | |
Comment 2•3 years ago
|
||
This is an attempt at a test case, but that would require someone with windows to test.
Oana,
could you double check on windows if it's reproducing the issue? Comparing Chrome and Firefox rendering.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
The issue still occurs on my side.
Tested with:
Browser / Version: Firefox Nightly 99.0a1 (2022-02-27)
Operating System: Windows 10 Pro
Comment 4•3 years ago
|
||
Updated•3 years ago
|
![]() |
Reporter | |
Comment 5•3 years ago
|
||
So after checking with Oana, my test case doesn't reproduce the issue on windows. Need to create a better test case.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Comment 6•2 years ago
|
||
This came up on gfx bug triage meeting, I can repro the issue and others can as well. It looks to me like the / characters in the string "8/5/21" are one pixel to the left of where it should be, but the placement of the other characters looks the same to me, so I'm not sure if this precisely falls into the concept of a kerning issue because the overall string width is unchanged. Only the rendered cells of the sheet are affected, the edit box above the sheet is correctly spaced.
Comment 7•2 years ago
|
||
In the original screenshot here, I think the more obvious issue is the cells containing "8x version of", where the glyph spacing looks too tight. It feels like what might happen if the glyphs are being measured and rendered with different modes (hinted vs unhinted, GDI-compatible vs "natural", etc). However, I'm not seeing this at all with current Nightly on my Windows machine; entering the same text, with the same Arial 10 font, it looks fine here.
Comment 8•2 years ago
|
||
Per gfx-triage meeting, I'll try to figure out the repro for this and confirm it's still happening with :jfkthame, this definitely looks like something that would deeply bother some significant number of users when using Google Sheets which is a popular app.
Assignee | ||
Comment 9•2 years ago
|
||
I'll take this on.
Comment 10•1 year ago
|
||
Karl, looking back through the history, we seem to have a problem reproducing this issue. Is it still happening for you with the most current Nightly (Fx120)?
Lacking reliable STR, I'm flagging this as stalled
.
![]() |
Reporter | |
Comment 11•1 year ago
|
||
In the past this is what Google replied when contacted. It was in February 2022. If there was a followup, you should ask someone from the Moz webcompat team (I'm not part of Mozilla anymore).
We took a look at the reported issue, and believe the unexpected character spacing is due to how Firefox on Windows handles text rendering on canvas in general and is not specific to Google Sheets.
This JsFiddle demonstrates rendering the same text using HTML and Canvas. We notice that on most browser/platform combinations, the HTML and canvas text are rendered very similarly, whereas on Firefox Windows, the canvas rendering is noticeably different and shows the incorrect character spacing.
There has been some discussion about Firefox Windows' handling of canvas text rendering, and its impact on Sheets, in the past (Bugzilla/890733). Recently, a Firefox change was submitted which did improve the situation in some cases (Bugzilla/1730772) but it looks like there are still some room for improvement. Ideally, rendering text to Canvas would produce the same quality results as rendering that same text to HTML. This seems to be the case on most platforms but I don't know how feasible that is in practice here.
Assignee | ||
Comment 12•1 year ago
|
||
Lee, is this something we can correct in our Canvas text drawing?
Updated•1 year ago
|
Comment 13•1 year ago
|
||
Based on current prioritization, I don't think this is a Webcompat P1; let's re-triage.
Comment 14•1 year ago
|
||
We haven't seen a breakage report about this in a while. Let's unset the webcompat-priority flag for now, we can increase the priority if we get reports again.
Assignee | ||
Updated•11 months ago
|
Comment 15•11 months ago
|
||
Comment 16•11 months ago
|
||
Comment on attachment 9394938 [details]
Incorrect kerning in Firefox 115.9.1 on Windows 10
This is an example of overly tight kerning which affects Firefox 115.9.1 running on Windows 10.
The effect is exacerbated in footnotes.
Updated•6 months ago
|
Comment 17•4 months ago
|
||
I'm pretty sure this is fixed in Nightly by bug 1919906. (I just noticed that similar-ish bug 1769326 was fixed by bug 1919906 and verified the fix-range via mozregression).
In this bug here, I just did a quick spot-check of current Firefox release 131.0.3 which reproduces the bug, vs. current Nightly 133.0a1 (2024-10-21) which does not. Here's a screenshot to demonstrate that comparison.
Updated•4 months ago
|
Comment 19•4 months ago
|
||
For completeness, here's a similar screenshot with the sample-text from comment 0 here.
Updated•4 months ago
|
Updated•4 months ago
|
Comment 20•4 months ago
|
||
Since the bug is closed, the stalled keyword is now meaningless.
For more information, please visit BugBot documentation.
Updated•3 months ago
|
Description
•