LadybirdBrowser / ladybird

Truly independent web browser
https://ladybird.org
BSD 2-Clause "Simplified" License
10.24k stars 402 forks source link

Bold text is no longer displaying as bold #351

Open alec3660 opened 4 days ago

alec3660 commented 4 days ago

not-so-bold

OS: Fedora 40 x86_64 Top: Firefox 127.0.2 (64-bit) Bottom: Ladybird @ commit 09f7609

skyrising commented 4 days ago

What is the source code for that HTML file?

alec3660 commented 3 days ago

What is the source code for that HTML file?

If I may be so <b>bold</b>

skyrising commented 3 days ago

Interestingly it works as expected for me image

Do you know when this regressed for you?

One possibility I can think of is that font-config doesn't pick up the bold variant of your serif font. Does If I may be so <b style="font-family: sans-serif">bold</b> look bold for you?

alec3660 commented 3 days ago

Screenshot_2024-07-02_03-12-39

Same result with sans-serif. I'm unsure when the issue first occurred, I just happened to notice it while browsing.

AtkinsSJ commented 3 days ago

My guess is somehow that font doesn't have a bold variant, or Ladybird isn't finding it... We need better font debugging tools.

Equinox4 commented 3 days ago

Note that the "b" tag has long ceased to mean "bold text", but rather " bring attention to". The browser is not required to apply any particular style to this tag by default.

skyrising commented 3 days ago

While it's true that <b> nowadays has a semantic meaning rather than a stylistic one, the HTML spec still expects it to have font-weight: bolder: https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3. Which Ladybird has in Default.css, so that's not the cause of this issue.

Equinox4 commented 3 days ago

As mentioned in the introduction https://html.spec.whatwg.org/multipage/rendering.html#rendering and here a visual user agent is not required to present HTML documents in any particular way and I have not found any information in the documentation for this browser indicating that it is designated as supporting the suggested default rendering. However, I only said this for informational purposes, I don't think it is linked to the problem mentioned.

nicolasdanelon commented 3 days ago

hi, just trying to add more info

this is Ladybird on mac, with --enable-skia-painting flag

image

this is Ladybird on mac, without --enable-skia-painting flag

image

master branch, 72b4d44d07e12cc04bde90872e2f31aaab64aa00

My guess is somehow that font doesn't have a bold variant, or Ladybird isn't finding it... We need better font debugging tools.

I’m pretty sure this is the reason why it’s not working. I had this issue with fresh installations of Arch Linux.