[links-list] Re: font problem and fix

Sven Neumann sven at convergence.de
Sat Nov 9 07:37:44 PST 2002


Karel Kulhavy <clock at atrey.karlin.mff.cuni.cz> writes:

> Is it alpha-resampled (antialiased)? And by this I don't mean that
> additional blurring of already botched fonts some people imagine under
> antialiasing, I mean true resampling, which comes by resampling from 16
> times bigger resolution down.

no, fortunately FreeType2 doesn't do antialiasing by resampling from
larger fonts. I wouldn't call such an approach antialiasing at all.
FreeType2 aligns the stems to the grid and only uses grayscale levels
where needed. This leads to much clearer and more readable fonts
especially at small sizes. FreeType2 uses embedded hinting information
and provides a reasonably good autohinter for unhinted fonts. Here's a
screenshot that shows native hinting:


and here's one that shows the result of the autohinter:


> Is it based on physically correct linear luminous model, not just
> "we put the data into that telly and it shows up somehow"? Do those
> FreeType renderers have gamma calibration that is easily accessible?

you can either do your own gamma correction when drawing to the screen
(FreeType2 doesn't do that for you) or you tell the renderer what
gamma ramp to use when creating bitmaps from the glyph outlines.

> Do those FreeType renderers support LCD optimization?

FreeType2 has a mode that produces optimized output for LCD displays.
Most of the work has to been done outside FreeType2 but the LCD mode
changes the stem alignment and grid-fitting in a way that minimizes
color fringes.

> Do TrueType font renderers work reliably also on 16- and 256-colour
> displays by appropriate dithering? Do they dither on 15- and 16- bit
> displays to move the quantization noise into spatial spectral regions
> to which the eye is less sensitive?

FreeType2 only produces bitmaps with 256 levels of grayscale. It's up
to you to draw them to the screen.

> Are they able to run at high interline pixel pitches without
> performance loss? This is very handy for slide presentation, you
> just take some HTML and Links, click up some big letters and image
> magnification, calibrate to your LCD projector, and are able to
> start lecture. If someone cries from the back that his glasses are
> not thick enough, you just reconfigure the line pitch to a bigger
> one and continue. This will crash poorly written TT implementation
> due to font cache overflow (Links runs on LRU here).

you are free to cache the font bitmaps yourself. FreeType2 only offers
a (very good) bitmap cache that your application can use but it doesn't
force you into using it.

> As soon as all the question will result in "Yes" on all platforms Links
> supports, I'll start thinking about adding TrueType font renderer among
> the graphics primitives.

I think you should really have a look at FreeType2 (www.freetype.org).

Salut, Sven
Unsubscribe: send email to links-list-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message

More information about the links-list mailing list