No-break spaces have different width than plain spaces
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
People
(Reporter: wavexx, Unassigned)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0
Steps to reproduce:
and U+00A0 should have the same width as a regular space.
Actual results:
and U+00A0 are larger than a regular space in FF76.0.1 under Linux (debian unstable), using any font.
Note that this is a regression. FF used to render this correctly in earlier versions.
Comment 4•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 5•4 years ago
•
|
||
This is working as expected for me on Nightly.
EDIT: also on 76.0.1, both macOS
Do you see the same problem on a new profile?
https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles#w_manage-profiles-when-firefox-is-open
Yes, I reproduced this on a fresh profile and on an fresh user account as well to avoid issues with fontconfig.
I cannot test Nighly right now due to my connection, and I'm unsure of when this issue appeared, could have been earlier than 76.0.1 (the change is subtle; I just noticed by chance).
I point out I'm running FF on linux with integrated intel graphics. This combination has known issues with font rendering not grid-fitting properly depending on the HW acceleration settings (notably, it's half-broken on UI elements with acceleration off since FF quantum!). Toggling layers.acceleration.force-enabled=true didn't do anything in this case though. Font rendering seems ok on page elements, it's just the nbsp which seems to have an arbitrary size.
Comment 7•4 years ago
|
||
Please use the Inspector to examine the text in your testcase and see what font or fonts it reports as being used (not what the value of the font-family property is, but what actual font face(s) are reported in the Fonts panel of the inspector). I'm curious if NBSP is being taken from a different font from the rest of the text for some reason.
Comment 9•4 years ago
|
||
Bitstream Vera Serif has a very wide NBSP glyph, for some reason:
<hmtx>
...
<mtx name="nonbreakingspace" width="1303" lsb="0"/>
...
<mtx name="space" width="651" lsb="0"/>
...
</hmtx>
I see the same result on macOS in both Firefox and Chrome if I use the Bitstream Vera Serif font. The screenshot in comment 1 shows Chrome using a sans-serif default font; if you explicitly set it to use Vera Serif, I expect it'll show the same result as Firefox.
Reporter | ||
Comment 10•4 years ago
|
||
Wow, ok. Didn't realize nbsp had an actual glyph. Indeed, checking with 'DejaVu Sans' for example renders properly. Sorry for the noise.
Updated•4 years ago
|
Updated•4 years ago
|
Description
•