Closed Bug 104850 Opened 23 years ago Closed 23 years ago

Verdana font size issue

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 102199

People

(Reporter: athun, Assigned: dbaron)

References

()

Details

Attachments

(1 file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.5) Gecko/20011011
BuildID:    0.9.5

In the Linux 0.9.5 release, the Verdana font is ignored in Linux. I am using Red
Hat 7.1 with xfs. I copied over all my Windows TTF fonts. In 0.9.4 sites that
used Verdana displayed properly. In 0.9.5, Verdana seems to be ignored and Arial
is used instead. The Arial font is much smaller and results in some pages being
harder to read. Other pages that use Verdana in small point sizes become
illegible. I noticed this problem in a nightly build before 0.9.4 came out, but
since 0.9.4 worked fine I assumed it was fixed. Apparently not. I just checked
and Verdana works fine in the Win32 version of 0.9.5.

Reproducible: Always
Steps to Reproduce:
1. Go to a site that uses Verdana as its primary font
(http://www.ars-technica.com, http://www.evilavatar.com,
http://shogo.thehaus.net, for example) with 0.9.5

Actual Results:  The sites' text is displayed in an (smaller) Arial font.

Expected Results:  The sites' text should be displayed in the Verdana font.
Not sure where this belongs, but it's not a DOM Style issue, trying Style System.
Assignee: jst → dbaron
Component: DOM Style → Style System
There's another report somewhat similar to this, I think.
please the environment variable NS_FONT_DEBUG=5, do a minimal run 
(eg: ./mozilla http://some.website.com/some_content.html), capture the output,
and attach it to this bug
I see verdana getting loaded alot in attachment 54189 [details].
From email from Matthew Arnold <marnold@ez-net.com>

> http://bugzilla.mozilla.org/show_bug.cgi?id=104850
> ------- Additional Comments From bstell@netscape.com  2001-10-19 14:40
> ------- I see verdana getting loaded alot in attachment 54189 [details].

After doing a little more research it appears that Mozilla is indeed using 
the Verdana font, but for whatever reason it is displaying it about 2 points 
smaller in Linux than in Windows. The easiest way to see the difference is to 
look at the page I referenced (http://shogo.thehaus.net) in 0.9.5 in Windows 
and in Linux. To get the page to display in Linux the way it does in Windows, 
I need to increase the font size in the stylesheet file by two points. On 
that site, two points doesn't make much difference. However on a site like 
Planet Diablo (http://www.planetdiablo.com) that uses 8pt Verdana for its 
navigation menu on the left side, those two lost points almost make it 
illegible.

I don't know why Mozilla in Win98 and in Linux would render that font 
differently. It worked fine in Linux with 0.9.4. The problem seems to be 
specific to the Verdana font for whatever reason.

Mat
Summary: Verdana font ignored → Verdana font size issue
The older font code totally avoided scaled fonts as it could not distinguish
between bitmap scaled (horrible) and outline scaled (so-so) hence it tried
REALLY HARD to find a non-scaled font and often used badly sized fonts as
a result.

The newer font code can distinguish between outline scaled and bitmap scaled,
bug 83416 and bug 74889, and now works very hard to pick the size that
layout as directed by the web page designer and/or user.

It seems to me that if layout is asking for an 8 pixel verdana font and the
font subsystem is supplying an 8 pixel verdan font then that by definition is 
the correct behavior for the font subsystem.
Matthew Arnold wrote:
> 
> On Friday 19 October 2001 08:04 pm, you wrote:
> 
> > point or pixel?
> 
> point
> 
> Another (probably easier) way to see the difference is to install both
> Mozilla 0.9.4 and 0.9.5 and just alt-tab between the two versions. The
> difference is immediately apparent.
> 
> Matt
But which is displaying the correct fonts? (eg: the fonts requested 
by layout).

Different does not mean right or wrong.

Web pages or mis-configured browsers that used to work because the
font subsystem did the wrong thing do not justify requiring we keep
the font subsystem doing the wrong thing.
from private email:

Matthew Arnold wrote:
> 
> On Fri, 19 Oct 2001 19:38:53 -0700, you wrote:
> 
> >Matthew Arnold wrote:
> >>
> >> >But which is displaying the correct fonts? (eg: the fonts requested
> >> >by layout).
> >> ...
> >> In any case, I don't think it's A Good Thing that Mozilla on differing
> >> platforms displays the same page differently.
> >
> >How could Mozilla possibly work correctly cross platform if one of
> >the font subsystems used font sized that were *not* requested by the
> >cross-platform layout code?
> 
> So, if I am following correctly (which I may not be) is that the problem may
> very well lie with the way either xfs in Linux or Windows itself handles the
> Verdana font?
> 
> >Did you check your screen resolution setting?
> 
> Yep. I've got it set to "System setting." I tried changing it to 96 and 72 dpi
> but that didn't seem to affect the layout of the page at all.
> 
> I did discover that if I changed the stylesheet to set the font size in pixels
> instead of points, the page would display the same way on Mozilla 0.9.5 and
> 0.9.4 in Linux, IE 5.5, and Mozilla 0.9.5 in Windows. I'm not certain if that
> fact should surprise me or not. That does solve the problem for my site.
> Obviously it doesn't solve the legibility problems on some other sites. Maybe
> there just won't be a good way of dealing with that issue.
> 
> Once again I'd like to thank you for your time in helping me figure this whole
> thing out. I really do enjoy Mozilla and think it's the best thing to hit 
Linux
> since the kernel itself.
> 
> Matt
It fine to look at older code to see when things changed but this presumes
that the older code was working correctly.

The questions we should be asking is:

 1) What size fonts should be displayed?

 2) If the font's size is not correct; which part of the system
    is responsible for the size issue?

If in the past the font subsystem picked the wrong size (perhaps that was the 
nearest size ait could find) and that masked a mistake by a layer above the 
font subsystem that does not mean that things were working correctly back then.

Can we get a simplified test case that demonstrates the problem?

If the layer above the font subsystem asks for the wrong size then the issue
is in that area.

If the layer above the font subsystem asks for the correct size and the font
system displays a different size then we need to determine why and if there is
a better size why it was not choosen.
> I did discover that if I changed the stylesheet to set the font size in pixels
> instead of points, the page would display the same way on Mozilla 0.9.5 and
> 0.9.4 in Linux, IE 5.5, and Mozilla 0.9.5 in Windows.

So, is this a dup of bug 102199?
Sorry about the delay, it's been quite a hectic couple of weeks. I've been doing
a bit more research on this because I noticed that a couple of sites seemed to
be displaying the Verdana font correctly in Mozilla 0.9.5 in Linux (that is, the
same in Mozilla 0.9.4 in Linux as IE and Mozilla in Windows). In every case, the
page specified the font size in px or em. Every time the font size was specified
in pt, Mozilla 0.9.5 in Linux would display it a couple of points smaller than
the other browsers.

As far as a simplified test case goes, what are you looking for? Do you just
want a page with some text in a 12pt Verdana?

I have no idea what in the code is causing the problem. My C++ skills are
extremely lacking, to put it charitably.
Your description confirms that it is a dup of bug 102199.

*** This bug has been marked as a duplicate of 102199 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: