Open Bug 1804878 Opened 3 years ago Updated 2 years ago

Incorrect thickness of links underline (often the underlines are too thin)

Categories

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

Firefox 107
enhancement

Tracking

()

People

(Reporter: 5silentrain, Unassigned)

Details

Attachments

(30 files)

59.58 KB, image/png
Details
55.72 KB, image/png
Details
55.38 KB, image/png
Details
239.07 KB, image/png
Details
237.60 KB, image/png
Details
235.98 KB, image/png
Details
87.63 KB, image/png
Details
85.33 KB, image/png
Details
85.16 KB, image/png
Details
18.59 KB, image/png
Details
18.15 KB, image/png
Details
19.24 KB, image/png
Details
81.24 KB, image/png
Details
79.54 KB, image/png
Details
92.31 KB, image/png
Details
106.50 KB, image/png
Details
101.29 KB, image/png
Details
103.01 KB, image/png
Details
73.66 KB, image/png
Details
68.39 KB, image/png
Details
64.88 KB, image/png
Details
114.69 KB, image/png
Details
109.30 KB, image/png
Details
99.17 KB, image/png
Details
10.54 KB, image/png
Details
10.27 KB, image/png
Details
10.82 KB, image/png
Details
465.88 KB, image/png
Details
464.02 KB, image/png
Details
454.65 KB, image/png
Details
Attached image Firefox 1.png
Attached image Chrome 1.png
Attached image Safari 1.png
Attached image Firefox 2.png
Attached image Chrome 2.png
Attached image Safari 2.png
Attached image Firefox 3.png
Attached image Chrome 3.png
Attached image Safari 3.png
Attached image Firefox 4.png
Attached image Chrome 4.png
Attached image Safari 4.png

On Wikipedia: https://en.wikipedia.org/wiki/Loona
Link underlines are too thin, which is especially noticeable on monitors with a high pixel density (my monitor LG 27UP650-W has 163 PPI). Looks terrible!!!

Firefox: https://i.imgur.com/4Mlcwan.png
Chrome: https://i.imgur.com/ZlIMoIf.png
Safari: https://i.imgur.com/zMN9DTt.png

Firefox: https://i.imgur.com/eO6p0Ox.png
Chrome: https://i.imgur.com/gJIFcao.png
Safari: https://i.imgur.com/wOnu8Eb.png

Attached image Firefox 5.png
Attached image Chrome 5.png
Attached image Safari 5.png
Attached image Firefox 6.png
Attached image Chrome 6.png
Attached image Safari 6.png
Summary: Incorrect thickness of links underline → Incorrect thickness of links underline (often the underlines are too thin)
Status: UNCONFIRMED → NEW
Type: defect → enhancement
Component: Untriaged → Layout: Text and Fonts
Ever confirmed: true
Product: Firefox → Core

I think what's happening in each of these cases is that Firefox is using the underline thickness specified by the font that's in use.

E.g. on the https://steelseries.com/gaming-mice page, the product name is using a webfont "ReplicaPro TT Heavy". Checking the 'post' table of that font, we find

    <underlinePosition value="-140"/>
    <underlineThickness value="20"/>

which means the specified underline thickness is 20/1000 of the font size. The size used there is approximately 18px, so the expected underline thickness would be 0.36px. Setting text-decoration-thickness: from-font; on the element in Chrome or Safari results in a similarly thin underline.

So Firefox is simply honoring what the font designer has specified. The author could override that using something like text-decoration-thickness: 0.1em (or any other desired value), but in the absence of any specific request from the author, we respect what the font asks for.

But it looks awful in Firefox compared to Chrome and Safari!

Attached image Firefox 7.png
Attached image Chrome 7.png
Attached image Safari 7.png
Attached image Firefox 8.png
Attached image Chrome 8.png
Attached image Safari 8.png
Attached image Firefox 9.png
Attached image Chrome 9.png
Attached image Safari 9.png

Here's another good example that clearly shows how badly Firefox renders link underlines: https://www.iphones.ru/iNotes/vladelcy-iphone-14-pro-nachinayut-zhalovatsya-na-ostatochnoe-izobrazhenie-iz-za-vsegda-vklyuchennogo-ekrana-04-26-2023

Screenshot: https://i.imgur.com/7riQU8j.png

🤦‍♂️ 🫣 👎

Attached image Firefox 10.png

Now take a look at how Chrome and Safari render link underlines:
Chrome: https://i.imgur.com/ENDza7r.png
Safari: https://i.imgur.com/bK2k0BY.png

😍 👏 👌 👍

Attached image Chrome 10.png
Attached image Safari 10.png

This happens because the <a> element that is generating the underline has font-size: 0.

Okay, but what worries me most is: are the developers planning to fix this bug? 🤔

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: