From: johnm@cory.Berkeley.EDU (John D. Mitchell)
Subject: Re: "Hinting" using antialiasing? A GNUish alternative...
Organization: University of California, at Berkeley
Date: Sun, 27 Dec 1992 22:53:47 GMT

In article <PCG.92Dec27213908@decb.aber.ac.uk> pcg@aber.ac.uk (Piercarlo Grandi) writes:
>On 25 Dec 92 21:49:16 GMT, johnm@cory.Berkeley.EDU (John D. Mitchell) said:
[...]
>johnm> What's to stop me from optimizing the horizontal and vertical
>johnm> lines and then using an anti-aliasing line drawing routine for
>johnm> everything else?
>
>Nothing -- I just wonder why nobody does it for outline fonts too.
>Antialiasing is just as effective for outline fonts as for scaled
>bitmaps.

Well, at some level the line/curve/etc. drawing routine must choose between
some set of pixels to light for a given ideal point and so you get some
degree of 'anti-aliasing' no matter what.  I guess it's a question of
to what degree does the algorithm 'consciously' attempts to smooth things.

>Incidentally, if I remember well, in most/many windowing standards,
>fonts can only be bitmaps (two colors). I think that's unfortunately
>true of X11 too.

You might want to take a look at the documentation for GeoWorks' GEOS
platform.

[...]
>No, it is not arbitrary; if you do it arbitrarily then the bitmaps will
>look "bad", because our vision is very sensitive to regularity of shape,
>and other aspects of a character.  Thus for example hints that ensure
>that two stems are the same width.

But then how can you handle this with bitmap scaling filters?  It would
seem to me that you will end up encoding the same information that is
encoded by the hints in a program.

[...]
>Not better looking, on looks I would think it would be equivalent or
>nearly so; but better in speed and non proprietariness.

Non-proprietariness I'll buy.  Speed is another issue entirely.  In any
kind of regular use, you're not building out characters at tons of
different sizes, styles, etc.  So, you build out a given character and then
cache it and fulfill any other uses of the character from the cache if
possible.  Even in very 'ornate' documents,  there really aren't all that
many font changes.  Of course, there are 'silly' documents that change
fonts/styles/etc. for each character but that's certainly not a case that's
worth 'optimizing' for.

Also, I don't see how applying some number of algorithmic scaling filters
would be any faster.  I believe (totally my own imagination :-) that only
filters that worked on very local information would be fast.  But since
to get the kind of quality that you want (well, I assume that we want at
least comparable quality) you would have to have some of the filters work
with/on non-local bits (i.e., it would have to look at other areas of the
original and/or scaled bitmap that are not immediately adjacent to the bit
that is currently being worked on.  [Hope that makes sense.]

>The argument is that manual hints are applied following an unconscious
>filtering algorithm over the bitmap, one that maintains the regularity
>of a character shape so that it looks nice. Now maybe a suitable
>filtering algorithm can be found that has largely the same properties as
>the unconscious one. There are moderately effective automatic hinting
>algorithms, but I hope that a filtering one can cope better, that is
>with greater generality, and reach nearly the quality of manual hinting
>of outlines (which in many cases amounts to hand tuning of the output
>bitmaps).

I'm not sure that I'm understanding what you mean by "an unconscious
filtering algorithm".  My understanding of the typeface design business is
that the designer generates 'perfect' character designs for some very large
em square.  The designers then specifies the hints and their relative
importance to the overall character (such that the more superfluous are
left out sooner as the generated font size is reduced.  How is that
'unconscious'?  I'll grant that my understanding is incomplete and
generalized.

And as you say, any improvements made in the automatic hinting department
for use by the 'filterer's can certainly be used by those creating the
hints for the 'outline'rs so I don't see any particular edge either way.

>I think it would be more general because I guess it could be patterned
>after the rather universal properties of human vision; instead some
>hinting systems are patterned after the features of latin glyphs, and do
>not adapt well to other styles of writing.

The same argument as above.  Any typeface designer worth anything must take
into account the biases and pecularities of human vision.

[...]
>While the outlining+hinting solution really is about considering a glyph
>a geometric figure, that must be drawn on paper with different
>griddings.

Hmm... I'll have to ponder this a bit.

[...]

Thanks,
	John
	johnm@cory.Berkeley.EDU

Standard disclaimers apply.