Open Bug 1638825 Opened 4 years ago Updated 4 years ago

Glyphs incorrectly overlap in SVG (Chrome Dev is fine)

Categories

(Core :: Layout: Text and Fonts, defect)

x86_64
Linux
defect

Tracking

()

Tracking Status
firefox-esr68 --- wontfix
firefox76 --- wontfix
firefox77 --- wontfix
firefox78 --- affected

People

(Reporter: jan, Unassigned)

Details

(Keywords: correctness, nightly-community, parity-chrome)

Attachments

(3 files)

KDE, X11, Debian Testing, Macbook Pro

Text in the bottom-left corner looks broken in Firefox:
https://raw.githubusercontent.com/corona-warn-app/cwa-documentation/master/images/solution_architecture/figure_1.svg

Attached image figure_1.svg

The font isn't found and as you've specified glyph positioning that assumes that specific font it doesn't work. This isn't a glyph positioning issue it's a finding the right font issue.

@longsonr: Should we change this bug to reflect the real issue, or is this working as intended?

Flags: needinfo?(longsonr)

I imagine the bug should be changed. Presumably webrender should pick the same font as non- webrender.

Flags: needinfo?(longsonr)

(In reply to Robert Longson [:longsonr] from comment #4)

Presumably webrender should pick the same font as non- webrender.

Both Basic (Skia) and WebRender have this behavior.
Chrome Dev with & without HW acceleration (Skia) is unaffected.

My Mac seems to pick the font you'd expect i.e. the same as Chrome so I don't know what font you're seeing here.

KDE, X11, Debian Testing
Screenshot: mozregression --launch 2020-05-19 -a https://bugzilla.mozilla.org/attachment.cgi?id=9149835

The term "Open Source" in the blue box on the left is "Helvetica" by source code and "NimbusSans-Regular" in reality.
The text in the bottom-left corner (comment 0) is "Helvetica Neue" by source code and "DejaVu Serif Bold" in reality.

Debian's Chromium + Chrome Dev:
Helvetica -> Liberation Sans
Helvetica Neue -> Liberation Serif

Component: SVG → Layout: Text and Fonts

(Jan Andre Ikenmeyer [:darkspirit] from comment #7)

The term "Open Source" in the blue box on the left is "Helvetica" by source code and "NimbusSans-Regular" in reality.
The text in the bottom-left corner (comment 0) is "Helvetica Neue" by source code and "DejaVu Serif Bold" in reality.

Same with Nightly on my gaming Ubuntu 20.04.
(I just wanted to report this web-compat problem as it looks broken in Firefox. It's not my SVG file, I was only interested in looking at it.)

This is probably a result of some fontconfig rules on the affected machine. I'm guessing Helvetica Neue is not present, so some kind of substitution is happening, driven either by fontconfig config files or browser prefs (or some combination of the two). DejaVu has substantially wider glyphs than Helvetica Neue, and so the rendered text doesn't fit in the space intended.

(Chrome's use of Liberation Serif where Helvetica Neue was specified (per comment 8) doesn't make any sense either, it's a totally unrelated typeface, but I guess it happens to have more comparable widths.)

SVG text positioning is not tolerant of font fallback that results in different glyph sizes like this.

The only thing we could do is tweak how we do font fallback. I have been wondering whether DejaVu is a good default / fallback serif font, since it is quite wide, and different from what Chrome uses. But that's probably a broader issue.

Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: