[comp.fonts] Need references for font substitution techniques

kap121@ztivax.UUCP (Thomas Oeser) (06/14/89)

We recently hit again the problem to render an image on a particular system
while the image refers to fonts available only in the producing environment of
this image.

In order not to port all font descriptions available on image producing systems
to the rendering systems we started to think about font substitution.

Looking at ISO 9541-1 "Information processing - Text and office systems - Font
information interchange" there is the concept of font reference containing both
a worldwide unique name for the font in question and a set of properties for
the font and its glyphs that allow (??) searching for a matching font if the
requested one is not available.

Currently we have implemented a hack that simply accumulates weights for
matching components and takes that font with the highest resulting value. But,
we think for real font substitution this is not satisfactory.

Now our questions:

	- Are there any atricles, books etc. about font substitution?
	- Are pieces of software about this topic in the public domain?
	- Any other help?

Thanks in advance,

Thomas Oeser


------------------------------------------------------------------------------
ARPA:		kap121@ztivax.siemens.com
UUCP:		kap121@ztivax.uucp (may work only in Europe...)
Postal mail:	Siemens AG, K Sys Ap 121, Otto-Hahn-Ring 6, P.O. Box 830951,
		D-8000 Munich 83, West Germany
Phone:		+ 49 (89) 636-47537
FAX:		+ 49 (89) 636-41477

Disclaimer:
The opinions expressed are my own, and should not be attributed to anyone else
living or dead.
------------------------------------------------------------------------------

gordon@idca.tds.PHILIPS.nl (Gordon Booman) (06/15/89)

In article <677@ztivax.UUCP> kap121@ztivax.UUCP (Thomas Oeser) writes:
>...
>Looking at ISO 9541-1 "Information processing - Text and office systems - Font
>information interchange" there is the concept of font reference containing both
>a worldwide unique name for the font in question and a set of properties for
>the font and its glyphs that allow (??) searching for a matching font if the
>requested one is not available.
>
>Currently we have implemented a hack that simply accumulates weights for
>matching components and takes that font with the highest resulting value. But,
>we think for real font substitution this is not satisfactory.
>...
Probably better than just scoring hits (if that's what you mean) is defining
a multi-dimensional space for fonts, and then just taking the closest one.
The space would have dimensions for pitch, height, boldness, etc.  Typefaces
are harder to define; ISO's approach (a hierarchy) puts some similar faces
very far apart.  Better to pick attributes of the face, and make those
dimensions.  The overall distance is the nth root of the sum of the squares
of the individual differences.  Allow the user to specify how important
various dimensions are and apply a factor to the difference in that
dimension when summing. (And pity the poor user that suddenly has to
learn all about font terminology just to print variable width.)

Character sets are a bigger problem than typefaces.  Everything's fine as
long as you've got all the characters, but once you start missing, you're
in for some tough choices.  Is one miss worse than two? Depends on the
character frequency, and a lot of other things.  And what about fallback
representations?  How good is the fallback?

The problem here is treating a character set as one thing; it's really
a collection of characters. You should probably match "fonts" on a
character by character basis. This solves the character set problem
(there aren't any).  It also allows, for example, a variable width
character to be used in a fixed pitch setting, if the width matches
well enough.

Grandiose enough for you yet?  This whole discussion ignores such real
issues as memory usage, performance, and cost of implementation.  And
it's faintly ridiculous if the printer in question is a dot-matrix
printer with a letter-quality print option.  Oh yeah, and who do you
expect to create all these font descriptions?

There's a proposal being made by ECMA/TC29 to specify how fonts match.
Essentially, they allow the user to specify which attributes are necesary
for a particular document fidelity.  No distance measure, just hit or miss.

Regards,
-- 
Gordon Booman  SSP/V3   Philips TDS Apeldoorn, The Netherlands   +31 55 432785
domain: gordon@idca.tds.philips.nl             uucp:  ...!mcvax!philapd!gordon

greid@adobe.com (Glenn Reid) (06/15/89)

Don't forget about character widths.  That is probably the most
important attribute of a font, from a substitution point of view,
other than perhaps the character set, as has been pointed out.

The argument that follows really only makes sense if you do not
have the option to reformat the document completely.  For example,
it applies to font substitution after the document has been created,
and may be a PostScript file or other "final format".  If you can
reformat the document, the best font substitution technique is a
big chart of typefaces for the user to look at.  A carefully
harmonized page with complementary typefaces will usually be
ruined visually if the substitution is not done carefully.  Very
often the entire design of a page might change in light of different
typefaces.   If the bold isn't bold enough, you might increase the
point size for emphasis, in addition.  Or whatever.

If you set justified text (or, to some extent, centered), it
will look absolutely horrible if the widths are wrong.  Furthermore,
if you position the Roman text and the Bold text in a given line
according to their X position (as you often would, for example,
on a PostScript printer), then you will have big gaps or overlapping
text if you substitute with the wrong widths.

Also, if there happen to be other elements on the page, rules,
graphics, or whatever, the relationship of the type to these
graphic elements will be different, and perhaps unacceptable.

The "style" of the typeface is almost incidental.

To get a feel for this, take a document with some mixed faces of,
say, Times Roman.  Get a good sample of bold and italic, and for
a worst-case scenario, set it full-justified.  Now substitute ANY
font for Times-Roman, like New Century Schoolbook, Palatino, or
whatever, and print it.  And throw it away.

I personally think that font substitution makes no sense from a
typographic standpoint.  You can substitute one vendor's version
Helvetica for another implementation, but if you substitute
Univers, it will likely only be acceptable in a minimum of
situations.

Glenn Reid
Adobe Systems
PostScript Developer Tools & Strategies