Closed Bug 47582 Opened 24 years ago Closed 6 years ago

Chrome and Linux font interaction

Categories

(Core :: XUL, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED INCOMPLETE
Future

People

(Reporter: tenthumbs, Assigned: kinmoz)

Details

(Whiteboard: [p:3])

Attachments

(3 files)

Apologies in advance if I have the wrong component.

On my Linux system, I find the urlbar difficult to use because it uses a
proportional font so I've been experimenting with monospaced fonts which is
what 4.x uses. In the course of this I noticed that Mozilla sometimes lays
out the chrome rather strangely depending on the font used. I also noticed
that it affects all the chrome not just the urlbar.

For this bug, I added the following:

window { 
  font-family: "Courier New",courier,monospace !important; 
  font-size: 12pt !important;
}

or some variant on the font-family to my user.css. My system is a 75dpi one
and I have configured the X server, the font servers, and Mozilla
appropriately. I have the standard XFree86 fonts as well as the common
Microsoft TrueType fonts available. In this test, I am using the xfsft font
server. I also have the LucidaTypewriter font as the default monospace one.

See the attached image for examples of what happens.

For the three cases in the image, Mozilla loads these fonts:

-b&h-lucidatypewriter-medium-r-normal-sans-12-120-75-75-m-70-iso8859-1
-b&h-lucidatypewriter-bold-r-normal-sans-12-120-75-75-m-70-iso8859-1

-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1
-adobe-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1

-monotype-courier new-medium-r-normal--13-*-*-*-m-*-iso8859-1
-monotype-courier new-bold-r-normal--13-*-*-*-m-*-iso8859-1

For the latter two fonts, the X server maps them as follows:

-monotype-courier new-medium-r-normal--13-*-*-*-m-*-iso8859-1
  -> -monotype-courier new-medium-r-normal--13-125-75-75-m-0-iso8859-1
-monotype-courier new-bold-r-normal--13-*-*-*-m-*-iso8859-1
  -> -monotype-courier new-bold-r-normal--13-125-75-75-m-0-iso8859-1

From the image, it is clear that the LucidaTypewriter and Courier fonts
work reasonably well but Courier New is badly positioned. Compare this with
the document area where the same fonts are used and where they are
positioned properly.

In the Courier New case, look carefully and you can see that the urlbar text
(and its caret) are displaced vertically upward from the apparent center
line of the urlbar. I think this is true in all the cases but I think it's
only obvious in the Courier New case.

If you want to consider only the urlbar, you can add 

#urlbar { 
  font-family: "Courier New",courier,monospace !important; 
  font-size: 12pt !important;
}

to user.css or even navigator.css.

Since Linux, and other Unix users, have config files coming out of their
ears and are used to editing them to set preferences, I expect that the
issue here will cause problems.
Attached image PNG screenshot
QA --> Claudius
Component: User Interface: Design Feedback → XP Apps: GUI Features
QA Contact: mpt → claudius
Assignee: bdonohoe → hangas
Component: XP Apps: GUI Features → User Interface: Design Feedback
QA Contact: claudius → mpt
Reassigning from bdonohoe to hangas
It's not just monospace fonts. I see similarly odd layout with the Geneva font.
I've seen this effect, too.  Adding Erik since he's the font guru.
Nor is it all truetype monospace fonts. Andale Mono works.

The modern2 skin does give a possible hint. See the attached image. I use 12pt
for readability and a monospaced font for the urlbar because I find it much
easier to use. Note the interesting box for Courier New.
Attached image Modern2 PNG screenshots
[Sorry, I changed the component before but didn't reassign. Fixing up.]
Assignee: hangas → trudelle
Component: User Interface: Design Feedback → XP Toolkit/Widgets
QA Contact: mpt → jrgm
->evaughan for possible box involvement, or should Erik own this?
Assignee: trudelle → evaughan
It could be a box problem. A good test would be to make a <text> tag in xul put 
a border around it and then try different fonts. Does it get layout correctly? 
Is the text correctly in the borders?

Status: NEW → ASSIGNED
Happens in text fields, not in box. ->mjudge, per evaughan
Assignee: evaughan → mjudge
Status: ASSIGNED → NEW
reassigning this to kin.  he is working on other font issues and will be able to
investigate this one along the way.  leaving at p3
Assignee: mjudge → kin
Whiteboard: [p:3]
Target Milestone: --- → M19
Accepting bug.
Status: NEW → ASSIGNED
moving to future, this is not a must fix
Target Milestone: M19 → Future
hmm, this looks to me similar to bug 78643 - what do you think?
could this be related to bug 89783 ?
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: