Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
14Activity
0 of .
Results for:
No results containing your search query
P. 1
Random Fonts for the Simulation of Handwriting

Random Fonts for the Simulation of Handwriting

Ratings:

4.93

(1)
|Views: 10,651|Likes:
Published by act

More info:

Published by: act on Jul 21, 2007
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/20/2012

pdf

text

original

 
ELECTRONIC PUBLISHING, VOL. 8(4), 281–294(DECEMBER 1995)
Random fonts for the simulation of handwriting
LUC DEVROYE AND MICHAEL McDOUGALL
Schoolof Computer Science McGill University Montreal, CanadaH3A 2A7 
SUMMARYWepresentseveralmethodsforcreatingarandomprintedhandwritingfontbaseduponasmallsample from a person’s own hand. The first method uses random interpolation and possiblyrandom extrapolation. The second method is based upon the random selection of points fromthe minimal spanning tree formed by the sample. In a third method, we look at the controlledrandomperturbationof B´eziercontrol points.
KEY WORDS random font; PostScript; ezier curves; font design
1 INTRODUCTION
Random fonts allow users to come closer to simulating true handwriting. Both PostScripttype3fontsand
metafont 
allowonetocreateveritablerandomfonts,inwhicheachinstanceofa character is rendereddifferentlyonthe screen orprinter.There islittleneedforrandomfonts in ordinary texts, but we believe that there are enormous possibilities such as inprivate mail, personalized advertisements, automatic form letter generators, mathematicstexts in which one wants to emulate blackboard mathematics, captions in Tintinand comicstripsingeneral, restaurant menus, the generationoftest samples forhandwritingcharacterrecognitionsystems, and all applications requiringa human touch.In most modern computer fonts, characters are described directly or indirectly byoutlines, which in turn are B-splines or B´ezier curves or derivatives of such curves (seeKarow[1,2],Hersch[3]orAndr ´e[4]ingeneral,orAdobe’sType1book[5]forPostScript). Forexample, an ordinaryB´ezier curve used in thePostScript command
curveto
,is definedby four two-dimensional control points,
0
1
2
3
, and the curve is the collection of points
with
=
1
3
0
3
1
2
1
3
2
1
2
3
3
0
 
 
1(see, e.g., Su and Liu [6] or Farin [7]). A character outlineconsists of a sequence of B ´eziercurves smoothly joined together at the ends. One cannot just take the collection of controlpoints and add small random perturbations in the hope of obtaining a random character.Very quickly, the characters’ appearance becomes unacceptable and does not reflect whathappenswhenhumansproducehandwrittencharacters. Figure1showsexamplesinUtopia-Regular and Tekton of what happens to fontswhen control pointsare moved. The outcomedepends heavily on the number of B´ezier sections in an outline, and is in most casesunusable. Especially the irregular stroke width becomes a problem.
CCC 0894–3982/95/040281–14$17.50
Received 22 August 1994
1995 by John Wiley & Sons, Ltd.
Revised 16 January1995
 
282
LUC DEVROYE AND MICHAEL McDOUGALL
Figure 1.
One should really work with a constant pen with a deterministic (non-random) nib. In
metafont 
, Knuth [8] introduced the idea of a pen and a nib, and he described characterstrokes in an analytic fashion. The outlines are constructed after a pen has been selected,thus guaranteeing pleasing constant strokes. On page 185 of Knuth [8], it is shown howone may carefully add noise to the control pointsso as to produce random results. Knuth’sexample is reproduced in Figure 2 for the sake of illustration.The
punk
(metafont)fontusessimilarideastocreate randomcharacters [9].Toproducea fully functional random font in this way would be interesting, but it is a painstaking job,as every character must be designed individually.Metafont may be used to create randomcharacters but once they are created, they remain fixed: every occurrence of a symbolproduces the same output. Finally, Knuth’s example does not attempt to imitate one’shandwriting. Sherman [10] (p. 164) shows one how a primitive, random, type 3 fontmight be coded. His interest was mainly at the software level and not the design of afunctionalfont.InPostScript,it ispossibletodisablethefont cache byusing
setcharwidth
instead of 
setcachedevice
and to randomize the characters before rendering. This wasfirst pointed out by Andr´e and Borghi [11]. It was applied to the
punk
font by Andr´e andOstromoukhov[12], and used for ransom fontsby Packard [13]. For other applications,we refer to the Beowolf font of van Blokland and van Rossum [14,15], or Andr ´e’s Scrabblefont [16]. This approach is slow, as typical characters have more than 30 control points.Also, as shown above, raw independent random perturbations of the control points arenot recommended as they create uneven strokes. Furthermore, at the junctures of B´eziersegments, first and second order continuityare lost. Finally, as with Knuth’s example, onearbitrarilyextrapolatesbeyondagivencharacterwithoutregardtoanindividualspronenessto produce such extrapolations in their handwriting. For a survey of random (or dynamic)fonts, we refer to Andr´e [4] and Andr´e and Borghi [11].Multiple master fonts interpolate between several fixed extreme fonts in a smoothmanner. Haralambous [17] proposes certain parametrizations based upon
metafont 
. Infact, our solution for handwriting fonts takes its cue from these ideas, but differs in thateach characterinthefontmay haveadifferentnumberofprototypeexamples. Furthermore,we have the additionalrequirement that random combinationsmust look and behave alike.Handwriting fonts have been available for a long time. A small list of static (non-random) PostScript fonts with sample printouts is given in Table 1. These were createdfrom scratch through programs created by Luc Devroye and Sandro Mazzucato at McGillUniversityin 1995.
 
RANDOM FONTS FOR THE SIMULATION OF HANDWRITING
283
Figure 2.
There are several software houses that make customized PostScript fonts based uponone’s handwriting. A program that takes scanned input and produces a type 1 PostScriptfont without any human intervention has been developed at our School by Sandro Mazzu-cato [18]. Auto-tracing algorithms are described by Plass and Stone [19], Schneider [20], Gonczarowski [21] and Itoh and Ohno [22]. A sample of a non-random handwriting font called TropDePoils produced by Mazzucato’s program is shown in Figure 3.Some might find it helpful to have a general filter that would take a type 1 font as inputandconstruct anacceptable randomtype3PostScriptfontas output.Thiscouldbe doneforexample by using
ghostscrip
and playing with the PostScript operator
pathforall
, whichallows one to play back paths and obtain the control points. Unfortunately, such a filterwouldhavetoextrapolatebeyonda samplewithouthavingsufficient informationregardingthe person’s real handwriting.What we propose here is a methodologyfor making randomfonts. In a nutshell, we consider each sample character as a vector in Euclidean space.For a given character, we have thus a sample of 
vectors independently drawn from anunknown distribution— each person has a different distribution. The objective is to drawfurtherrandom samples (the characters to be rendered) from that unknowndistribution.Atthe end of the paper, a few technical details and some font samples are provided.
2 METHODOLOGY
Foreach character inthefont encodingvector, we need afew samples fromtheindividual’shand. In each character, certain key points are marked. For example, in the letter A, wehave 8 points as shown in Figure 4.Typically, we mark the extreme points where strokes end, and the points where the
Garmugia 3.49Minestra di farro 3.49Acquacotta Maremmana 4.39Zuppa di fagioli di Montalcino 3.99Penne alla Toscana 6.49Grandinina o orzo coi piselli 7.99Pasta alle olive 7.49Pezze della nonna 7.99Pappardelle ai pepperoni 7.99Maccheroni stirate alla Lucchese 8.49Risotto al basilico 10.49Buccellato di Lucca 6.49Torta co’bischeri 6.99Ciliege al vino rosso 7.99Crema zabaione al vinsanto 11.99Meringato fiorentino 8.99Crostata di uva 7.49Brutti ma buoni 2.99Necci 3.99Torta di maronni al cioccolato 8.99Bomboloni livornesi 7.49Zuccotto all’Alkermes 11.99
Figure 3.

Activity (14)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Marilyn Renkas liked this
Ivan Klis liked this
Jonathan Liem liked this
Jonathon54 liked this
Sven Van Asten liked this
mimosa1 liked this
mohammadthalif liked this
Urbán József liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->