From: lee@sq.sq.com (Liam R. E. Quin)
Subject: Re: "Hinting" using antialiasing? A GNUish alternative...
Organization: SoftQuad Inc., Toronto, Canada
X-Feet: bare
Date: Thu, 17 Dec 92 21:06:04 GMT

pcg@aber.ac.uk (Piercarlo Grandi) writes:
> [...]
> I have been wandering if, via antialiasing, one can achieve the same
> effect as "hinting" in a different way, and secondly, if the high
> desirability of antiliased bitmaps means that Type 1 is a more
> appropriate than TrueType for outlining.

Anti-aliasing doesn't dispense with the need for hinting altogether,
because you are still only working with relatively few pixels per em.
It certainly does reduce the need for hinting, but drop-outs still matter
a lot, of course -- if there is no cross-bar in the `H' you can't see it
with grey-scale fonts either :-) -- and the effects of other hints can be
seen.

OpenWindows 3 includes a PostScript previewer 9pageview) with antialiasing;
try "pageview -aa"...
The main difference between the anti-aliasing here and grey-scale fonts 
is that pageview renders an entire image and then shrinks it using the
built-in anti-aliasing support of NeWS, rather than using individual grey
characters.  The results are often a little better than those of Xdvi,
because this allows pageview to position characters within a word on
sub-pixel boundaries.

The MIT X Consortium are considering greyscale font support.  When I asked
last year whether it would be part of the font server protocol, I was told
no, because of `lack of prior art', despite the use of grey-scale and
colour fonts in the graphics design idustry, to name a single example.

> [...] given that Type 1 assumes that the hinting is done by the renderer,
> antialiased font pixmaps are likely to be easier to derive from Type 1
> outlines than from TrueType programs, whose hinting algorithms are simply
> not designed for grayscaling.

This doesn't follow.  The Sun F3 fonts contain algorithmic hinting [2],
although the F3 renderer (TypeScaler) is responsible for others.  The F3
fonts look pretty good when rendered with anti-aliasing.  It is probably true
that special hints could be developed; I am not aware of any current
resarch in this area, but I don't follow it all that closely.
A good bibliography appears in Avi Naiman's thesis [3], although it's
probably a little out of date already.


>* From a single set of bitmaps once can derive all sort of lower
>  resolution ones, I think much quicker than using outlining

Yes, but you get all sorts of ugly quantisation effcts, even if you make
your bitmaps all at 1000 pixels per em (ppem); scaling a bitmap down by,
say, a factor of 7, is likely to be harder than recomputing the outline,
as you have to do some sort of dithering or smoothing.

>* Filtering high resolution bitmap fonts into lower resolution
>  grayscale pixmaps is easy,
yes
>  very quick,
reasonably
>  and gives excellent apparent resolution,
yes, but see [4] for a paper on legibility results
>  better than outlining + hinting, even with naive algorithms.
That is debateable.

>* Filtering high resolution bitmap fonts into lower resolution
>  bitmaps (possibly passing thru the intermediate step of producing
>  pixmaps at that resolution first) can be made to give good quality
>  results,  probably similar to outlining + hinting, given relatively
>  easy but not entirely naive filtering algorithms.

I think you need to denonstrate that.

>* The storage needed for high resolution bitmaps is not significantly
>  larger than that needed for hinted outlines.

Hmm, in typography a high resolution bitmap is, say, 4,000 lines per inch :-)

>			"CONSPIRACY" SECTION
>Well, if it is all as simple as I say (just store high resolution
>bitmaps, and filter them on the fly to the appropriate lower resolution
>bitmap/pixmap, instead of storing a curvaceous outline and then
>rendering it to bitmap to be corrected by hints if necessary), why
>Adobe, Apple, Microsoft and their friends don't do this?

Because it isn't that simple.

>The most bizarre point is that, except for Acorn, nobody seems to use
>grayscale fonts [...]
True.  It's coming.

Note that PostScript, designed originally for one-bit printers, does not
include mechanisms for colour or grey-scale fonts.  This might mean it's a
little harder than it might have been to add thse things to ATM, for example.

>* Antialiased fonts greatly improve the apparent resolution of text,

They do make the text appear fuzzy, and not as good in appearance as good
hand-tuned bitmaps.  The real advantage is that you can have the same metrics
as pritner fonts, with sub-pixel positioning.
People who like really sharp text are less likely to like greyscale fonts,
I suspect.

I'd certainly like to see grey-scale and colour fonts in wider use.

Lee


References:

[1] Bob Scheifler, `From the X Consortium: Current Projects', in issue 2 of
    _The X Resource_, pub. O'Reilly & Assoc., Spring 1992.

[2] SunPICS, `F3 Font Format Specification', August 1991, Part No. 800-6854-10

[3] Naiman, Avi C., `The Use of Greyscale for Improved Character Presentation',
   (Ph.D. thesis), University of Toronto, March 1991, Tech. Report CSRI-253

[4] Black, Alison & Boag, Andrew, `Choosing Binary or Greyscale Bitmaps: some
    Consequences for Users', in Proc. Electronic Publishing, 1992, Cambridge
    Univ. Press, 1992, pp.247 ff.



-- 
lee@sq.com (Liam Quin) the barefoot programmer; SoftQuad Inc +1 416 239 4801
 OPEN LOOK UI FAQ; Metafont list; HexSweeper NeWS game; lq-text text retrieval
 `The delights of hirsute sex
  let us leave to Welsh shepherds'		-- Meleager, ~4th C BCE
Newsgroups: comp.fonts