Open Bug 1480977 Opened 8 years ago Updated 4 years ago

underscore is not displayed when scale to 120%

Categories

(Core :: Graphics: Text, defect, P3)

61 Branch
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: kes-kes, Unassigned)

References

()

Details

Attachments

(6 files)

Attached image delete1.jpg —
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 Build ID: 20180712135629 Steps to reproduce: Visit https://metacpan.org/pod/Test2::V0 and scale page to 120% Actual results: Underscore sign is not displayed (see attached file) Expected results: Underscore should be visible
But this happens not always (see attached file)
Has STR: --- → yes
Component: Untriaged → Graphics: Text
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64
I can reproduce the issue with Nightly63.0a1 (zoom level 120%) and also reproduce the issue with Chromium68.0.3440.75 (zoom level 110%) on Linux Mint....
Even if underscore is visible on 120% it is disappears when text is selected
Thoughts Jonathan?
Flags: needinfo?(jfkthame)
Priority: -- → P3
It sounds like the underscore must be rendering outside what we believe to be the vertical bounds of the text, so that it doesn't reliably get repainted. Possibly related to the line-spacing metrics in the font, and/or what freetype is doing when it hints the underscore glyph. Could someone with an affected system confirm exactly what font is being used for the text in question? Then we could have a look at the metrics, etc, and see if anything seems unusual.
Flags: needinfo?(jfkthame)
Attached image fonts tab —
font-family: Menlo, Monaco, "DejaVu Sans Mono", Consolas, "Bitstream Vera Sans Mono", Courier, "Courier New", monospace; a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:10290 html body .syntaxhighlighter inherit a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:10290 html body .syntaxhighlighter * inherit a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:10290 html body .syntaxhighlighter * * inherit a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:10290 html body .syntaxhighlighter * * * inherit a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:10290 html body .syntaxhighlighter * * * * inherit a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:502 .syntaxhighlighter table td "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:502 .syntaxhighlighter table tr "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:502 .syntaxhighlighter table tbody "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:502 .syntaxhighlighter div "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:502 .syntaxhighlighter code "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:502 .syntaxhighlighter table "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:1522 code Menlo, Monaco, "DejaVu Sans Mono", Consolas, "Bitstream Vera Sans Mono", Courier, "Courier New", monospace a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:1522 pre Menlo, Monaco, "DejaVu Sans Mono", Consolas, "Bitstream Vera Sans Mono", Courier, "Courier New", monospace a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:938 code monospace, monospace a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:938 pre monospace, monospace html.css:524 code monospace a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:1108 body "Helvetica Neue", Helvetica, Arial, sans-serif a8fd6d5b3ab38bf9f7a75c704e84134a4f1d0fea.css:843 html sans-serif html.css:253 pre monospace font-size: 12px; font-style: normal; font-weight: 400;
So the affected font is DejaVu Sans Mono. Looking at this font, I see that the underscore glyph is indeed placed very low down, so it falls only just within the font's nominal descent. What I guess is happening at certain sizes is that the underscore glyph is a single pixel thick, and gets nudged slightly downwards by hinting in order to align to the device pixel grid. Meanwhile, the descent of the font may have been rounded upwards to give a line-height that is an integer number of pixels, and the result is that the underscore falls just outside the font's vertical extents. The fact that this can also affect Chromium (per comment 4) suggests that perhaps FreeType's handling of the underscore glyph is the root of the issue, more than something we're doing in Gecko. It's possible that adjusting the degree of hinting used (none/slight/full) might affect the outcome.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: