Closed Bug 1835567 Opened 2 years ago Closed 2 years ago

Ugly font in devtools due to font-visibility pref

Categories

(Core :: Layout: Text and Fonts, defect, P2)

defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox113 --- unaffected
firefox114 --- disabled
firefox115 --- disabled
firefox116 --- fixed

People

(Reporter: Oriol, Assigned: timhuang)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

  1. Open Nightly (a restart is needed if you opened devtools in a normal window)

  2. Open a private window

  3. Open the Inspector devtool (Ctrl+Shift+C)
    Expected: The HTML tree should use the "Noto Sans Mono" font, which about:preferences considers the default monospace font for my system.
    Actual due to bug 1826408 it uses "Noto Sans Mono CJK SC", which I guess it's designed for CJK and looks ugly with latin characters.

  4. Close the private window

  5. In a non-private window, open the Inspector devtool (Ctrl+Shift+C)
    Expected: the "Noto Sans Mono" font, even more so now since now it's not a private window.
    Actual: "Noto Sans Mono CJK SC" again.

So actually I'm complaining about various things here:

  • I get that layout.css.font-visibility.private is trying to hide some fonts, but I don't see why "Noto Sans Mono" is considered unsafe to expose, while "Noto Sans Mono CJK SC" is considered safe.
  • Per bug 1829160, font-visibility restrictions shouldn't apply to chrome contexts. Well, I guess devtools are chrome context and they are affected.
  • Not sure if reusing devtools between private and normal windows is a good idea.

Set release status flags based on info from the regressing bug 1826408

:timhuang, since you are the author of the regressor, bug 1826408, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(tihuang)
Assignee: nobody → tihuang
Severity: -- → S3
Priority: -- → P2

Fixing devtools is nice, but <textarea> in web pages will still be ugly. Can somebody explain why it's fine to expose "Noto Sans Mono CJK SC" but not "Noto Sans Mono"?

Yeah the fact that noto sans mono isn't in https://searchfox.org/mozilla-central/source/gfx/thebes/StandardFonts-linux.inc#102 is probably an oversight?

Flags: needinfo?(jfkthame)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

Yeah the fact that noto sans mono isn't in https://searchfox.org/mozilla-central/source/gfx/thebes/StandardFonts-linux.inc#102 is probably an oversight?

Offhand it does seem surprising.... oh, wait a sec, I see there's a "Noto Mono" present just above there. I wonder if there was a naming change at some point?

We should confirm that "Noto Sans Mono" is indeed present in a default Ubuntu install, and (assuming so) add it to the list, yes.

Flags: needinfo?(jfkthame)

(In reply to Jonathan Kew [:jfkthame] from comment #5)

We should confirm that "Noto Sans Mono" is indeed present in a default Ubuntu install, and (assuming so) add it to the list, yes.

I just did a "minimal" clean install of Ubuntu 22.04 in a VM, and confirmed that "Noto Sans Mono" is present (as well as "Noto Mono" -- and yes, they are different).

Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fa0414d2d40d Don't apply font-visibility restrictions to devtool contexts. r=emilio
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
See Also: → 1836864
Flags: qe-verify+
QA Contact: sbadau
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: