Closed Bug 160916 Opened 22 years ago Closed 22 years ago

Microsoft Courier Font rendered jagged in Mozilla when not antialiased

Categories

(Core :: Internationalization, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 114885

People

(Reporter: jjramsey_6x9eq42, Assigned: shanjian)

Details

(Keywords: intl)

Attachments

(7 files)

I had set Mozilla to only render fonts 17 pt and larger. After that was done,
most of the MS fonts looked fine, but Courier was rendered jagged. This only
seemed to affect Mozilla. Neither xfontsel nor the font dialog of Gimp 1.2
showed any problems.
> I had set Mozilla to only render fonts 17 pt and larger.

you mean that you set it to not antialias fonts below 17pt, right?

The problem here seems to be that TrueType fonts look *really* bad when they're
not anti-aliased.  Should the freetype code ignore the minimum-font-size pref?
Assignee: Matti → yokoyama
Status: UNCONFIRMED → NEW
Component: Browser-General → Internationalization
Ever confirmed: true
QA Contact: asa → ruixu
> The problem here seems to be that TrueType fonts look *really* bad when they're
not anti-aliased.  Should the freetype code ignore the minimum-font-size pref?

That's *not* the problem. For one, it only happens to the MS Courier font.
Second, it's only a problem in Mozilla, not in any other apps that I've seen.
Like I said, "[n]either xfontsel nor the font dialog of Gimp 1.2 showed any
problems."

Do *not* ignore the minimum-font-size pref. That will just make things bad in a
different way. Antialiasing medium-sized fonts makes them fuzzy and harder to
read. MS Windows doesn't antialias medium-sized fonts for just that reason.
When I set the preference font.FreeType2.enable to false, the Courier font looks
fine, even when I have Mozilla set to use MS TrueType fonts for the default
fonts in the preferences dialog. 

I don't know if this is significant or not since I don't know whether setting
font.FreeType2.enable to false removes all Truetype font support for Mozilla, or
if it just bypasses Mozilla's own private TTF support, making Mozilla use the
generic X11 font support, which in my case happens to support TTF.
Even with the preference font.FreeType2.enable set to false, Mozilla is still
using TrueType fonts. For example, close up examination of the font used in
Linux Today shows that it's Arial, not the default X11 font Helvetica.
To determine what moz is doing we need to find out what the fonts sub system is
doing.

JJ: could you make a very simplified test case, set the environment variable
NS_FONT_DEBUG to FFF, do a minimal run, capture the output, and attach it to 
this bug? 

This is how to do a minimal run:

  ./mozilla file://somedir/yourtestcase.html > output
->shanjian
Assignee: yokoyama → shanjian
> bstell@ix.netcom.com	2002-08-05 09:25 -------
> To determine what moz is doing we need to find out
> what the fonts sub system is
> doing.
> 
> JJ: could you make a very simplified test case, set
> the environment variable
> NS_FONT_DEBUG to FFF, do a minimal run, capture the
> output, and attach it to 
> this bug? 
> 
> This is how to do a minimal run:
> 
>   ./mozilla file://somedir/yourtestcase.html > output

Done. Output shown in attachment.
would you also kindly attach the test case?
Keywords: intl
QA Contact: ruixu → ylong
Here is the test case. In the tarball is "ShowLetter.html", which I viewed with
Mozilla, and a directory called ShowLetter_Files, containing assorted whatzits
linked to by ShowLetter.html.
This testcase has many font families and sizes which fill the debug output
with a lot of unrelated clutter. Can it be reduced to just a font spec and a 
short bit of text?
> This testcase has many font families and sizes which fill the debug output
with a lot of unrelated clutter. Can it be reduced to just a font spec and a 
short bit of text?

Not by me, I'm afraid. I wouldn't know where to start. I'd look for what it does
to the Courier font--that the only font that seems to show badly.

looks pretty bad to me
Attached file testcase for courier
set monospace font to courier new and load this.
Thanks for the simplified testcase/data.

Here are the loaded fonts:

loaded "Agfa Monotype-times new roman-iso8859-1", size=16, 
filename=/usr/X11R6/lib/X11/fonts/MS_TTF/times.ttf

loaded -adobe-helvetica-medium-r-normal--10-100-75-75-p-*-iso8859-1

loaded -adobe-helvetica-medium-r-normal--12-120-75-75-p-*-iso8859-1

loaded -adobe-helvetica-bold-r-normal--12-120-75-75-p-*-iso8859-1

loaded "Agfa Monotype-times new roman-iso8859-1", size=16, 
filename=/usr/X11R6/lib/X11/fonts/MS_TTF/times.ttf

loaded "Agfa Monotype-courier new-iso8859-1", size=12, 
filename=/usr/X11R6/lib/X11/fonts/MS_TTF/cour.ttf

loaded "Agfa Monotype-courier new-iso8859-1", size=12, 
filename=/usr/X11R6/lib/X11/fonts/MS_TTF/cour.ttf

I see that AA is set to 17 pixel minimum:

gAntiAliasMinimum = 17, nsFontMetricsGTK.cpp 990

Have you tried displaying this font with a FreeType2 reference viewer such as
ftstring?

It looks like you do not have the patented TrueType hinting available.

You could try turning on FreeType2 autohinting bug I found that with FreeType2 
autohinting some fonts' (eg: serif'd fonts') characters became broken up even
with antialiasing so it is off by default.

dup'd to Bug 114885 "FreeType2 glyph rendering issues"

*** This bug has been marked as a duplicate of 114885 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Mark as verified as dup.  Please reopen if disagree.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: