wrexhamafc.co.uk - Bolder/bigger text resulting in layout changes on some pages
Categories
(Web Compatibility :: Site Reports, defect, P3)
Tracking
(Webcompat Priority:P3, Webcompat Score:1, firefox152 affected, firefox153 affected, firefox154 affected)
People
(Reporter: ctanase, Unassigned)
References
()
Details
(Keywords: webcompat:needs-diagnosis, webcompat:site-report, Whiteboard: [autowebcompat:processed][autowebcompat:repro-success])
User Story
platform:windows,mac,linux,android impact:minor-visual configuration:general affects:all branch:release user-impact-score:2 autowebcompat-repro-status:success autowebcompat-repro-chrome-mask-fixed:false
Attachments
(5 files)
Environment:
Operating system: Windows
Firefox version: Firefox 152/153/154
Preconditions:
- Clean profile
Steps to reproduce:
- Navigate to: https://www.wrexhamafc.co.uk/videos
- Observe the title of the upcoming matches.
Expected Behavior:
The title is fully visible.
Actual Behavior:
The title is not fully visible if the title is longer.
Notes:
- It can also affect sections where the text should be on a row but gets displayed on 2 rows
- Reproducible on the latest Release, Beta and Nightly
- Reproducible regardless of the ETP setting
- Works as expected using Chrome
Updated•4 months ago
|
| Reporter | ||
Comment 1•4 months ago
|
||
Updated•4 months ago
|
Comment 2•4 months ago
|
||
Reproduced in Firefox, not in Chrome — a genuine web-compat layout issue. On https://www.wrexhamafc.co.uk/videos the "upcoming matches" carousel cards render with a narrower content width in Firefox (measured clientWidth ~304px for the first card and ~336px for the others) than in Chrome (~400px for every card). The match-title h4 elements use single-line -webkit-line-clamp:1 with overflow hidden. Because the intrinsic title text width is nearly identical in both browsers (e.g. "Wrexham AFC v Manchester United" ≈ 383px), the narrower Firefox cards cause the longer titles to overflow and get truncated with an ellipsis (shown as "Wrexham AFC V…"), and "Wrexham AFC vs Sunderland AFC" (textW ~360px > 336px) is also clipped. In Chrome the 400px cards fit these titles, so they display in full. This matches the report: titles are not fully visible for longer titles in Firefox but work as expected in Chrome. The breakage is visual/layout in nature.
Updated•4 months ago
|
Comment 3•4 months ago
|
||
Comment 4•4 months ago
|
||
Comment 5•4 months ago
|
||
The rendering difference here seems to be that Chrome is simply ignoring the font-weight here for some reason, for this specific "Cooper Hewitt" font.
The attached testcase goes through font-weight:100 through font-weight:900, and typically you'd expect that higher font-weights would start looking bold at some point.
In Firefox and Safari, font-weight: 600 and up are rendered bolder (and wider).
In Chrome, all of the lines are rendered the same.
I think this is just a Chrome bug or quirk with how they handle this font.
I don't think we need to really worry about this on our side, since the two issues called out in comment 0 and the screenshot are normal font-layout variations and the site handles them reasonably elegantly:
(1) "The title is not fully visible if the title is longer" -- this is just text being ellipsized, as the site expects. (This happens in Chrome as well if the title is long enough; it just happens at a slightly lower threshold in Firefox due to us honoring the site's requested boldness.)
(2) linewrapped "Already Registered" text -- again, this is just from us honoring the site's requested boldness, and the site still looks fine with the text linewrapped.
Comment 6•4 months ago
•
|
||
Closing as INVALID since this seems to be a bug on Chrome's end rather than ours (and the Firefox experience isn't materially worse to the extent that it'd make us consider an intervention or attempting a bug-compatibility hack)
Updated•4 months ago
|
Comment 7•4 months ago
•
|
||
Safari matches us here, BTW (using a visibly bolder font for font-weight:600 and greater).
However, the heavier font-weight here appears to be synthesized, because it goes away (Firefox/Safari change to match Chrome) if I add font-synthesis-weight: none; to the .test {...} CSS rule in the testcase. So that bolder text is not part of the font; Firefox/Safari are adding it by synthetically thickening the glyphs.
It looks like browsers have discretion on whether or not to do this, per the word "allowed" at https://drafts.csswg.org/css-fonts-4/#valdef-font-synthesis-weight-auto
I don't know offhand why Chrome elects not to do it here, but I filed https://issues.chromium.org/issues/537185410 to let them know that they differ from other engines on this.
Updated•3 months ago
|
Comment 8•2 months ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #7)
I don't know offhand why Chrome elects not to do it here, but I filed https://issues.chromium.org/issues/537185410 to let them know that they differ from other engines on this.
I suspect it's because the font is already "bold" according to its internal metadata; but per CSS Fonts spec, that should be ignored and the @font-face attributes respected. I've commented in the chromium issue.
Description
•