Title unexpectedly line-wraps at https://www.maisonalyzee.com/
Categories
(Web Compatibility :: Site Reports, defect, P3)
Tracking
(Webcompat Priority:P3, Webcompat Score:3)
People
(Reporter: dholbert, Unassigned)
References
(Depends on 1 open bug, )
Details
(Keywords: webcompat:platform-bug, webcompat:site-report, Whiteboard: [autowebcompat:processed][autowebcompat:repro-success])
User Story
platform:windows,mac,linux,android impact:significant-visual configuration:general affects:all branch:release diagnosis-team:layout user-impact-score:40 autowebcompat-repro-status:success autowebcompat-repro-chrome-mask-fixed:false autowebcompat-repro-channels:nightly,stable,esr autowebcompat-repro-report-os:all autowebcompat-diagnosis-status:success
Attachments
(4 files)
STR:
ACTUAL RESULTS:
The title line-wraps between the E-with-an-accent and the E that follows it.
EXPECTED RESULTS:
No line-wrap.
This is caused by platform-bug 2074261. (This actually was reported in the WebKit bugzilla instance as https://bugs.webkit.org/show_bug.cgi?id=201725 , and tests were added as part of that bug, and those tests caused bug 2074261 to be filed.)
| Reporter | ||
Updated•2 months ago
|
| Reporter | ||
Comment 1•2 months ago
|
||
| Reporter | ||
Comment 2•2 months ago
|
||
(Safari matches Chrome for now, but apparently they have a fix on the way, per https://bugs.webkit.org/show_bug.cgi?id=201725 )
Updated•2 months ago
|
Updated•2 months ago
|
Comment 3•2 months ago
|
||
The main heading "Maison Alyzée" (45px, spaced letters) at the top of maisonalyzee.com line-wraps in Firefox, dropping the trailing "e" (after the accented "é") onto a second line, so the heading occupies two lines. In Chrome the same heading stays on a single line.
Comment 4•2 months ago
|
||
Updated•2 months ago
|
Comment 5•2 months ago
|
||
Root cause analysis generated by autowebcompat bot:
The heading is styled font-weight 700, but the Wix web font (Copperplate Gothic Light, CSS family wf_15d61002cf51476294f273531, requested first via the unresolved alias wfont_7a74db) has an @font-face declaring only a single regular weight-400 face; there is no bold face. To render weight 700 the engine synthesizes faux bold from the 400 face, and Firefox and Chrome diverge: Firefox faux bold increases each glyph advance width, growing the run from about 503px to about 528px, while Chrome and Safari faux bold adds no advance width so the run stays about 503px. Wix fixes the heading block width at 526px content-box no padding, sized to the regular metrics. In Firefox the 528px run exceeds 526px so it wraps at the space before the final e and that e drops to a second line, 2 client rects; in Chrome 503px fits, one line, 1 rect. The text-align justify then stretches the wrapped first line back out to 526px, which is why Firefox spaces look extra wide, a symptom not the cause. This is a browser engine implementation difference in synthetic-bold / font-synthesis advance-width handling when the requested weight has no matching face, not UA sniffing: both browsers load the same font file, get font-weight 700, and use the same 526px width. Spec: CSS Fonts Module Level 4 font-matching and font-synthesis, https://www.w3.org/TR/css-fonts-4/#font-synthesis-weight
Evidence:
Firefox Nightly vs Chrome, 1280x900. Heading span 45px, family wfont_7a74db then wf_15d61002 then orig_copperplate_gothic_light, in an H2 fixed width 526px, font-weight 700, text-align justify in both. getClientRects: 2 rects in Firefox (526+28px), 1 in Chrome (503px). Natural nowrap width: FF 528px (wraps), Chrome 502.7px (fits). The wf_15d61002 @font-face has no weight/style descriptors (defaults 400); loaded in both, only webfont defined. Nowrap clones at 45px family wf_15d61002: FF weight400=457.8, weight700=479.3, weight700 font-synthesis:none=457.8; serif weight700=517.5, invalid family=517.5, so 479.3 is the webfont with faux-bold widening, gone with synthesis:none. Chrome 400=700=synthesis:none=457.7 (no widening). Reduced testcase reproduces: FF 2 lines, 1 line with font-synthesis:none; Chrome always 1 line.
If you'd like to provide feedback on diagnosis, please use the 👍 or 👎 reaction.
Updated•2 months ago
|
Comment 6•2 months ago
|
||
Updated•2 months ago
|
Comment 7•2 months ago
|
||
I think this is really a site authoring issue. It seems pretty natural for a "synthetic bold" effect to increase glyph advances, and this happens in both Firefox and Safari in my testing; only Chrome applies an emboldening effect to the glyphs without adjusting their advances (and this can result in a rather crowded appearance, depending on the font).
All they'd need to do is remove the explicit width: 526px from that element, and it would display fine without making such a fragile assumption about how the text is rendered. Or give it font-weight: 400, removing the span with weight 700 that currently wraps it; applying this when the font they're using comes in only a regular weight is a typographic faux pas anyhow.
Comment 8•2 months ago
|
||
I've opened https://github.com/w3c/csswg-drafts/issues/14523 to request spec guidance/clarification here.
Description
•