monospace font no longer fixed width

RESOLVED WORKSFORME

Status

()

Core
Graphics: Text
RESOLVED WORKSFORME
a year ago
8 months ago

People

(Reporter: Brent, Unassigned)

Tracking

44 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gfx-noted])

Attachments

(4 attachments)

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
Build ID: 20160728203720

Steps to reproduce:

View page with monospace text: https://bugzilla.mozilla.org/attachment.cgi?id=654724 (from bug 785181)
Also broken on https://www.mirbsd.org/MirOS-Licence.asc (see bug 1283802)


Actual results:

The right side of the given page uses a fixed width font to display dates, using underscores for unknown dates.  Starting in Firefox 44, the underscore character is a smaller width.  The dates no longer line up.  Firefox 43 displays the page correctly, so this is a regression.


Expected results:

Display should be same as in Firefox 43, the left edge of the right column should be even.

Comment 1

a year ago
Created attachment 8778545 [details]
mbug1292713.png

(In reply to Brent from comment #0)
> Steps to reproduce:
> View page with monospace text:
> https://bugzilla.mozilla.org/attachment.cgi?id=654724 (from bug 785181)
> 
> Actual results:
> Starting in Firefox 44, the underscore
> character is a smaller width.  The dates no longer line up.

Not happening here (Fedora 24).
Did you report this to Ubuntu's issue tracker and were you asked to file this report upstream? It is really up to distributions how they (do not) change the default fonts and which fonts they ship.
Flags: needinfo?(bzipitidoo)

Updated

a year ago
Component: Untriaged → Graphics: Text
Product: Firefox → Core
(Reporter)

Comment 2

a year ago
Created attachment 8778626 [details]
fixedfontnobugin43.png
(Reporter)

Comment 3

a year ago
Created attachment 8778627 [details]
fixedfontbugin44.png
(Reporter)

Comment 4

a year ago
Created attachment 8778628 [details]
fixedfontnobugin48differentprofile.png

Uploaded 3 pics showing Firefox version 43 without the problem, 44 with the problem, and 48 without the problem apparently because Firefox was run under a different user account.

If this is a problem in Ubuntu (I am actually using Lubuntu), then why does Firefox version 43 display correctly, but not version 44?  Looks like Firefox shifts to a different font between 43 and 44.

But, under another user account that is seldom used, Firefox uses a different font than either one I saw earlier, and it displays correctly in all the versions I tested.
(Reporter)

Comment 5

a year ago
> Did you report this to Ubuntu's issue tracker and were you asked to file this report upstream?

No.  Have not reported this problem anywhere else.
From the screenshots, I suspect that on the "problem" system, the font configuration maps 'monospace' to a bitmap-only font that is no longer supported (since Firefox 44, see bug 1180560). Therefore, although that text is styled as 'monospace' by the default CSS for the <tt> element, it ends up falling back to a (non-monospaced) default font instead.

This can probably be fixed either within the Firefox preferences by configuring the 'monospace' font to explicitly use a (fixed-pitch) TrueType font instead of the system generic name 'monospace'; or at a system (user account) level by modifying the fontconfig configuration to map 'monospace' to a font that is available to Firefox.

The different behavior seen under different user accounts (comment 4) suggests that the two user accounts have different fontconfig setups; on the one that doesn't show the problem, the generic 'monospace' name is probably mapped to a fixed-pitch TrueType font, so it works fine in Firefox.
(Reporter)

Comment 7

a year ago
Okay, I have a workaround which has also made me unable to reproduce the bug.

In Firefox 48 I went into preferences->content->advanced, and saw "monospace" for the monospace font.  I changed that to FreeMono, and immediately, Firefox changed to that font and the page displayed correctly.  I changed back to "monospace", and Firefox changed fonts, but this displayed correctly.  Looks like the same font as used under the other user account.  I tried other fonts, and could not return to the problem I was seeing.  Problem solved, I guess?
Whiteboard: [gfx-noted]
(Reporter)

Comment 8

8 months ago
May as well close this bug.  Haven't seen it recur since I reported it, and have upgraded Firefox every time a new version arrived.  Now on version 52.0.1.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 months ago
Flags: needinfo?(bzipitidoo)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.