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)
Tracking
()
UNCONFIRMED
People
(Reporter: kes-kes, Unassigned)
References
()
Details
Attachments
(6 files)
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
| Reporter | ||
Comment 1•8 years ago
|
||
But this happens not always (see attached file)
| Reporter | ||
Comment 2•8 years ago
|
||
Updated•8 years ago
|
Has STR: --- → yes
Component: Untriaged → Graphics: Text
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64
| Reporter | ||
Comment 3•8 years ago
|
||
Comment 4•8 years ago
|
||
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....
| Reporter | ||
Comment 5•8 years ago
|
||
Even if underscore is visible on 120% it is disappears when text is selected
| Reporter | ||
Comment 6•8 years ago
|
||
the picture is taken from here:
https://metacpan.org/pod/DBIx::Class::Migration#install_if_needed
Comment 8•8 years ago
|
||
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)
| Reporter | ||
Comment 9•8 years ago
|
||
| Reporter | ||
Comment 10•8 years ago
|
||
| Reporter | ||
Comment 11•8 years ago
|
||
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;
Comment 12•8 years ago
|
||
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.
Updated•4 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•