[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freetype] Best approach to get anti-aliased font bitmaps?
From: |
Brian Stell |
Subject: |
Re: [Freetype] Best approach to get anti-aliased font bitmaps? |
Date: |
Tue, 14 May 2002 10:05:02 -0700 |
Anthony Fok wrote:
>
> For your information, starting with Mozilla 0.9.7 or 0.9.8,
> the bitmap fonts are anti-aliased whether the bitmaps are reduced
> enlarged (with curves filling in-between when enlarged).
> Note that the original bitmap fonts are just BDF/PCF ones; they are
> originally black-and-white bitmaps. Mozilla just anti-aliases them
> on-the-fly. :-) Not sure who implemented it though, but it is definitely
> way cool.
Thank you for the praise; I implemented anti-aliased scaled
bitmaps (AASB) for Mozilla. The actual code to AASB is not
very difficult. AASB can produce quite good results for up to
about 3x larger or 3x smaller. For magnifications greater than
3x the glyphs look blocky and below 3x the stems disappear. I
have actually been hoping Keith would add this to Xft at some
point although I know he is still pretty busy.
When bitmap fonts are available the code in Moz prefers them
over any kind of scaled font since the bitmaps tend to be
hand tuned. For the most common sizes (9-21 pixel) I find that
most X systems tend to have enough western bitmap sizes so that
moz can generally find a font within a pixel (or two) of the
desired size.
X windows CJK fonts are a very different story. CJK fonts
often have 2000 glyphs or more glyphs so hand tuning is a lot
of work. Thus X windows systems tend to have a few sizes for
CJK fonts. This is where AASB really help.
After coding AASB for moz I found this in chapter 2 of the
TrueType spec:
EBSC - Embedded Bitmap Scaling Table
While this is the sort of thing that outline font
technologies were invented to avoid, there are cases (small
sizes of Kanji, for example) where scaling a bitmap produces
a more legible font than scan-converting an outline.
> Perhaps it could be implemented in FreeType too. :-)
I would prefer that people move toward newer font technology
such as TrueType rather than fixing up older technology such
as X bitmap font. There is nothing wrong with fixing up older
technology since that is what apps find in the field. and I
would gladly talk about how I did AASB for moz if there is
interest.
Still, I would much prefer people move toward outline based
font technologies since this makes decent printing a
possibility which I am currently working on for Moz.
Have you turned on the FreeType/TrueType support in Moz?
http://www.mozilla.org/projects/fonts/unix/enabling_truetype.html
(Note that TrueType support is not available in moz Redhat
RPMs; I think there is a political issue.)
Brian Stell
- [Freetype] Best approach to get anti-aliased font bitmaps?, Pedriana, Paul, 2002/05/13
- Re: [Freetype] Best approach to get anti-aliased font bitmaps?, Anthony Fok, 2002/05/13
- Re: [Freetype] Best approach to get anti-aliased font bitmaps?,
Brian Stell <=
- Re: [Freetype] Best approach to get anti-aliased font bitmaps?, Werner LEMBERG, 2002/05/14
- Re: [Freetype] Best approach to get anti-aliased font bitmaps?, Brian Stell, 2002/05/15
- Re: [Freetype] Best approach to get anti-aliased font bitmaps?, Vadim Plessky, 2002/05/15
- Re: [Freetype] Best approach to get anti-aliased font bitmaps?, Alexander Gelfenbain, 2002/05/15
- Re: [Freetype] Best approach to get anti-aliased font bitmaps?, 山内 英敏, 2002/05/15
Re: [Freetype] Best approach to get anti-aliased font bitmaps?, Vadim Plessky, 2002/05/15