Closed Bug 51515 Opened 24 years ago Closed 24 years ago

Modern skin specifies absolute font sizes more than once

Categories

(SeaMonkey :: Themes, defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: tenthumbs, Assigned: hangas)

Details

Attachments

(1 file)

The modern skin uses absolute font sizes, e.g. 3mm here and 9px there, 
in more than one location. I believe a proper skin should have precisely
one place where the font size is specified and uses relative sizes,
e.g. percentages or larger or smaller, everywhere else so that the skin
fonts can be scaled up or down to meet the user's needs.

This is also an XP issue because the current modern skin looks very bad
on Linux. See bug 5236 for more info.

Attached is a list of the places where the skin chooses absolute font
sizes.
Trying to generate interest in an rtm++ bug that would allow for Modern to use 
system fonts.  Let's see what happens :-).
This bug is really about setting the font family and font size in
one and only one place in a skin not about which fonts to use, but that
won't stop me. :-)

X doesn't really have "system" fonts. About the only thing you might
expect is a "fixed" and "variable" font but those names are just aliases
and could be almost anything.
X has various ways of specifying defaults, though, including the gtk defaults
(since we're still building on top of gtk) and the X resources like *font. 
Using any of these would be a huge win over hardwiring the font to some
particular pixel or point size, since that would allow some control for the
user.
Yes, X treats all fonts equally so there are no special defaults and,
therefore, true system fonts.

Sure, you could use gtkrc files but there's no guarantee that they exist
or that their data is valid at run time. Think about how often some
little config file gets out of date and you system goes wonky.

You could use Xresources but they're currently out of fashion and
there's still no guarantee they would be valid.

I am irritated by the current state of affairs where Mozilla has some
hard-coded font names. It will just be a matter of time before it
breaks. I am particularly irritated by the way this system font stuff
seems to have been hacked into Mozilla without any planning. X is not
like the other platforms so what works there won't work here. Why do I
get the feeling Linux is an afterthought?

Enough of this ranting. If it were me, and I needed to get something out
the door real soon now, I would use an environment variable. If
MOZILLA_FIVE_HOME is acceptable then MOZILLA_SYSTEM_FONTS is too. If the
fonts specified aren't available, just die. If that means starting
Mozilla with a shell script wrapper, so be it. Of course, that would
mean writing an error message to stderr which Mozilla sometimes has
trouble with, but that's not my problem. :-)
Modifying user.css is more flexible than setting a single environment variable,
and works already.  And the classic skin now uses system fonts (yay!).

I'm more concerned about the average user who doesn't know enough to modify our
defaults and can't figure out why mozilla comes up with unreadable fonts while
everything else on the system looks fine.  We're going to make a lousy first
impression, and will lose some people right there.
Status: NEW → ASSIGNED
I was unclear. Since "system fonts" are defined outside of Mozilla (or
should be), there needs to be a way to specify them. That's what the
environment variable is for. You shouldn't assume a user.css file
exists or contains anything relevant.

It might even contain inappropriate information for the current
invocation. For example, right now I can say something like:
  DISPLAY=fred:0 ./mozilla
and a window will pop up on the fred machine across the room. This is a
feature of the X protocol and I certainly don't want to cripple Mozilla
just because the other platforms can't do this; but note that means
Mozilla is using fred's fonts and fred's screen resolution. It would
just make Mozilla a poor X application if it failed to act reasonably. 

Basically, I don't think Mozilla should assume anything that's
absolutely, positively not necessary and there must be ways to override
these things at run time without editing config files.

I agree completely with you that Mozilla often makes a very bad first
impression. I think that's because Mozilla isn't really cross-platform.
It often implicitly assumes the Windows model for many things, like
fonts. Real X apps know what to do. It's also true that almost no other
X app tries to use arbitrary fonts at arbitrary sizes. Mozilla, and 4.x,
make some sub-optimal choices. Now this can be dealt with but it's more
difficult that it seems and requires quite a bit of work. Unfortunately,
the font code has been pretty much frozen for months and no major
changes are going to happen any time soon.
Font sizes are now specificed using relative terms such as "smaller" and
"larger".  Fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Marking verified on Linux (2001-01-12-08-Mtrunk).
Status: RESOLVED → VERIFIED
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: