If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

before bitmap scaling look for other font foundries

RESOLVED FIXED in Future

Status

()

Core
Layout
RESOLVED FIXED
17 years ago
16 years ago

People

(Reporter: tenthumbs, Assigned: Frank Tang)

Tracking

({fonts})

Trunk
Future
x86
Linux
fonts
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

17 years ago
Mozilla needs to look outside the font foundry for fonts, particularly 
large ones. Right now it always sticks with one foundry.  My default font 
is helvetica so mozilla uses -adobe-helvetica-* fonts using scaled bitmap 
variants when it wants to. Not surprisingly, that looks crappy.

It could look better because I have scalable type1 helvetica fonts 
available. If fact there listed before the scaled bitmap ones. The font 
path goes
  /usr/X11R6/lib/X11/fonts/75dpi/:unscaled
  ...
  /usr/X11R6/lib/X11/fonts/urw/
  /usr/X11R6/lib/X11/fonts/Math/Mathematica/type1 
  ...
  /usr/X11R6/lib/X11/fonts/75dpi
so xlsfonts shows
  -adobe-helvetica-bold-o-normal--10-100-75-75-p-60-iso8859-1
  [ a bunch more unscaled bitmap varieties ]
  -adobe-helvetica-medium-r-normal--34-240-100-100-p-176-iso8859-1
  -urw-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-1
  -urw-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1
  -urw-helvetica-medium-o-normal--0-0-0-0-p-0-iso8859-1
  -urw-helvetica-medium-r-normal--0-0-0-0-p-0-iso8859-1
  -wri-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-1
  -wri-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1
  -wri-helvetica-medium-o-normal--0-0-0-0-p-0-iso8859-1
  -wri-helvetica-medium-r-normal--0-0-0-0-p-0-iso8859-1
  [ repeated unscaled adobe varieties ]
  -adobe-helvetica-bold-o-normal--0-0-100-100-p-0-iso8859-1
  -adobe-helvetica-bold-r-normal--0-0-100-100-p-0-iso8859-1
  -adobe-helvetica-medium-o-normal--0-0-100-100-p-0-iso8859-1
  -adobe-helvetica-medium-r-normal--0-0-100-100-p-0-iso8859-1

So, when it's looking for a largish font, say 42pt, it ignores the
scalable URW and WRI fonts and goes for the ugly scaled bitmaps. Using
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=39772 as an
example, mozilla goes for this:

loaded -adobe-helvetica-medium-r-normal--8-80-75-75-p-46-iso8859-1
loaded -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1
loaded -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1
loaded -adobe-helvetica-medium-r-normal--24-240-75-75-p-130-iso8859-1
loaded -adobe-helvetica-medium-r-normal--31-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--32-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--33-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--34-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--35-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--36-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--37-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--38-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--39-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--40-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--41-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--42-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--43-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--44-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--45-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--46-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--47-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--48-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--49-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--51-*-*-*-p-*-iso8859-1
loaded -adobe-helvetica-medium-r-normal--52-*-*-*-p-*-iso8859-1

Lots of ugliness there.

Comment 1

17 years ago
interesting idea: before chosing a bitmap scaled font wildcard the foundry and 
search for a better fit.

Comment 2

17 years ago
Created attachment 40228 [details] [diff] [review]
patch; look for an outline font from alternate foundry instead of a bitmap scaled font

Comment 3

17 years ago
this patch looks for an outline scaled font from any foundry in place of a
bitmap scaled font.

Unfortunately, the -adobe-helvetica-medium-r-normal--0-0-0-0-p-*-iso8859-1 looks
awful at large sized.

Comment 4

17 years ago
Created attachment 40229 [details]
adobe-helvetica outline scaled font at 52 pixel (it is ugly)

Comment 5

17 years ago
The image above is *not* magnified. It was taken by "xmag -mag 1". 

At small pixel sizes the adobe-helvetica looks good while the wri-helvetica
looks jaggy.

Oddly, at larger sizes the adobe-helvetica font is jaggy/ugly at while the
wri-helvetica looks pretty good. 

Very strange.

Updated

17 years ago
Status: NEW → ASSIGNED
Target Milestone: --- → Future
(Reporter)

Comment 6

17 years ago
Created attachment 40284 [details]
large-fonts-1.zip; an example
(Reporter)

Comment 7

17 years ago
FWIW, I've attached an example of how mozilla displays scalable and scaled
bitmap fonts at large sizes. I had to add some font aliases so that I could
specify exactly which fotn to use but it does give the idea. For 28pt, mozilla
decided to use a 24pt bitmap font which is why it's smaller. That's the only
exception.

Comment 8

17 years ago
The patch in attachment 40228 [details] [diff] [review] does not work. I thought if I asked for a font
with this spec "-*-%s-%s-%s-%s-%s-0-0-0-0-%s-*-%s" it would return an 
outline scaled font. Not true. Hence the what I thought were outline scaled
adobe-helvetica glyphs were in fact bitmap scaled.

Comment 9

16 years ago
The current Mozilla font code has two layers:

 1) select a foundry/family that can display the glyph

 2) select a size within that foundry/family

So when the code finds out that only a bitmap scaled font will work
we are not at a level where we can choose a different foundry or
family.

Maybe if I added a test to the upper loop, wouldBitmapScale, it could
then check other foundries before accepting the bitmap scaled font.
Summary: [Unix] Mozilla needs to look at different font foundries for fonts → before bitmap scaling look for other font foundries

Comment 10

16 years ago
I believe that bug 94327 will solve the most common cases of this bug.
Attachment #40228 - Attachment is obsolete: true
Keywords: fonts

Updated

16 years ago
Depends on: 94327

Comment 11

16 years ago
--> ftang
Assignee: bstell → ftang
Status: ASSIGNED → NEW
(Assignee)

Comment 12

16 years ago
bulk move NEW FUTURE bug to ASSIGN
Status: NEW → ASSIGNED

Comment 13

16 years ago
now that bug 94327 is fixed this should be fixed
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.