Closed Bug 1568314 Opened 6 years ago Closed 4 years ago

CCComicrazy Roman webfont has a Firefox baseline that makes text look like it has a strike-thru effect applied instead

Categories

(Web Compatibility :: Site Reports, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: twisniewski, Unassigned)

References

()

Details

(Whiteboard: [webcompat])

Attachments

(2 files)

The attached webfont is given a very high baseline in Firefox compared to Chrome, making it look struck-through instead of underlined, as seen at http://bobadventures.smackjeeves.com/

Attached file testcase.html

Unfortunately, the test-case will not load the font as-is, due to CSP. But I've uploaded it anyway, to make it easier to reproduce the issue.

(In reply to Thomas Wisniewski [:twisniewski] from comment #0)

The attached webfont is given a very high baseline in Firefox compared to Chrome, making it look struck-through instead of underlined, as seen at http://bobadventures.smackjeeves.com/

The text at http://bobadventures.smackjeeves.com/ looks OK to me (Nightly on macOS); could you attach a screenshot of the problem you're seeing?

Oh, never mind - if I hover over the Leave a Comment link, I see what you're talking about.

OK, the root of the problem is that it's a buggy font. There are three places in an OpenType font where we find "descender" values: hhea.descender, OS/2.sTypoDescender, and OS/2.usWinDescent. In a Latin or similar font, it's expected that hhea.descender and OS/2.sTypoDescender will be negative (as the font extends below the baseline); OS/2.usWinDescent is different in that it measures downward distances as positive, so it will normally be positive.

However, in this font we find that all three of these fields are positive; excerpts:

<hhea>
  <ascent value="775"/>
  <descent value="207"/>

<OS_2>
  <sTypoAscender value="775"/>
  <sTypoDescender value="207"/>
  <usWinAscent value="1014"/>
  <usWinDescent value="216"/>

The wrongly-signed hhea.descent and OS/2.sTypoDescender values here cause us to use an incorrect font bounding box as the basis for vertical positioning and baseline calculations.

So the solution is for the font developer to correct these fields in the font.

Component: Graphics: Text → Desktop
Product: Core → Web Compatibility

Sure, but the font also looks fine in other browsers, so it would be good to consider interop here. I'd hate Firefox to be the only browser that suffers because of font bugs if it doesn't have to.

I think this is a part of the broader issue that browsers don't agree on exactly how the metrics provided in fonts are used to derive line heights, spacing, baselines.... for many reasons, including that there's a tension between wanting to abide by platform conventions (which differ between OSes) and wanting to have consistency, as well as the presence of multiple, sometimes-conflicting sets of metrics in the fonts.

I certainly do agree that this is an area that should be kept open enough for the sake of preferences and innovation, but we're in a bind being the only alternative (and not dominant) browser which behaves differently in these kinds of cases. I fear that we're hitting a point where the open web may be better off standardizing on how font metrics are parsed, even if those standards are platform-specific rather than one-size-fits-all (as ugly as that may be). At the very least, it doesn't seem unreasonable to a layperson like me that the resolution of conflicting settings might be possible to standardize. Do you suppose that much is even remotely feasible as a start?

Flags: needinfo?(jfkthame)

For me the site is unreachable. I've tried with different VPN location but not luck.
https://prnt.sc/10du0tn

Tested with:
Browser / Version: Firefox Nightly 88.0a1 (2021-03-04), Chrome 89.0.4389.72
Operating System: Windows 10 Pro

Tom can you still access the site?

Flags: needinfo?(twisniewski)

Needs Triage.

Flags: needinfo?(raul.bucata)
Flags: needinfo?(oana.arbuzov)

The site is still down.

Tested with:
Browser / Version: Firefox Nightly 92.0a1 (2021-07-14), Chrome 89.0.4389.72
Operating System: Windows 10 Pro

I'll close the issue.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(oana.arbuzov)
Flags: needinfo?(jfkthame)
Resolution: --- → INVALID
Flags: needinfo?(raul.bucata)
Flags: needinfo?(twisniewski)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: