EXAMPLE-BASED AUTOMATIC FONT GENERATION by Rapee Suveeranont A Master Thesis

EXAMPLE-BASED AUTOMATIC FONT GENERATION
ユーザの与えた例に基づく自動的なフォントの生成手法
by
Rapee Suveeranont
ラピー スビーラノン
A Master Thesis
修士論文
Submitted to
the Graduate School of the University of Tokyo
on February 2, 2010
in Partial Fulfillment of the Requirements
for the Degree of Master of Information Science and Technology
in Computer Science
Thesis Supervisor: Takeo Igarashi 五十嵐 健夫
Associate Professor of Computer Science
ABSTRACT
It is difficult and time-consuming to design and maintain consistent style in all characters in font creation process. We therefore present a method to automatically generate
a new font from a user defined example. From each character outline, we derive its skeleton to be used as topological structure. We then represent arbitrary font by weighted
blend of outlines and skeletons from template fonts. Because ordinary linear blending
destroys font features such as serifs, we convert outline to Laplacian coordinates which
preserve the original shape. The system takes the desired outline of a single character as
an input and computes blending weights from database to reproduce the given outline.
The system then applies the weights to all characters to synthesize a new font. This
paper describes the algorithm details and evaluates its quality with some examples.
論文要旨
フォント制作の過程では、全部の文字のスタイルを一致してデザインや保持するのが困
難である。そこで、本論文では、与えられた例をもとに新しいフォントを自動的に生成す
る手法について提案する。本手法では、それぞれの文字の輪郭線から位相尾構造としてス
ケルトンを引き出し、テンプレートとして保持している基本フォントの輪郭線とスケルト
ンの重みつき混ぜ合わせによって任意のフォントを表現する。通常の線形混ぜ合わせでは、
フォントの特徴が壊れてしまうため、元の形状を保持するようにラプラシアン座標に輪郭
線を変換して合成を行う。新しいフォントをデザインする際には、ユーザが描いたひとつ
の文字の輪郭線を入力として受け取り、それを再現するような重み係数をデータベースか
ら計算し、それを他の文字に適用することで、新しいフォントを作成する。本論文では、
詳しいアルゴリズムの説明した上で、実際にいくつかの新しいフォントを作成して評価を
行う。
Acknowledgements
I have owned so much to Igarashi sensei for all of his thoughtful and insightful
ideas that have guided me from the very beginning of my research path. His work
has been always inspiring to me. Research activities, foreign visitors and all past,
present and future people in the user interface laboratory, I would like to thank
you all for comments and discussions on my work, and for making contributions to
make this lab as it is today.
I am very grateful for those whom I met during my short but very important
three years in Japan. Many of you have given me one of the best memories in my
life. Talking and knowing each one of you is real bliss that made myself growing
faster than ever by meeting so many different people from variety walk of life. I
would not have been here today without Japanese government scholarship that
helped opening my eye to see what is going on in the world scale and equipping
me with enthusiasm for what is to come. This definitely changed my life forever.
This work would not be done without memories of my father and mother. I
appreciate every moment that I know there are my brother and sister besides me
while I was trying, and to all my family who have always supported me in every
ways, I love you. My big big thanks to who has been deer to me all the time for
your sincere encourages and your colorful smiles that paints my world so bright
and shine. This work is not all about academic results, but also my sentimental
memories of Tokyo.
Contents
1 Introduction
1
1.1
Backgrounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1.2
Font Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
1.2.1
Bitmap
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
1.2.2
Scalable Outline . . . . . . . . . . . . . . . . . . . . . . . . .
3
1.2.3
Stroke-based . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
Our Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
1.3
2 Related Work
2.1
6
Character Representation . . . . . . . . . . . . . . . . . . . . . . .
6
2.1.1
Feature-based . . . . . . . . . . . . . . . . . . . . . . . . . .
6
2.1.2
Stroke-based . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
2.2
Font Design Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
2.3
Shape-preserving Transformation . . . . . . . . . . . . . . . . . . .
9
2.4
Example-based Generation . . . . . . . . . . . . . . . . . . . . . . .
9
3 Morphable Font Model
3.1
3.2
11
Glyph Representation . . . . . . . . . . . . . . . . . . . . . . . . . .
11
3.1.1
Skin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
3.1.2
Skeleton . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
3.1.3
Correspondence . . . . . . . . . . . . . . . . . . . . . . . . .
13
Morphable Model . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
i
4 User Interface
16
4.1
Designing Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
4.2
Drawing Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
4.3
Editing Skeleton . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
4.4
Editing Correspondence . . . . . . . . . . . . . . . . . . . . . . . .
18
5 Implementation
5.1
20
Algorithm Overview . . . . . . . . . . . . . . . . . . . . . . . . . .
20
5.1.1
Example Outline Conversion to Skin-Skeleton Representation 20
5.1.2
Font Generation From Template Database . . . . . . . . . .
21
5.2
Skeleton Extraction . . . . . . . . . . . . . . . . . . . . . . . . . . .
22
5.3
Skin-Skeleton Correspondence . . . . . . . . . . . . . . . . . . . . .
25
5.4
Feature-Preserving Technique . . . . . . . . . . . . . . . . . . . . .
27
5.5
Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
5.6
Style Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32
5.7
Font Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
6 Results
35
6.1
Automatic Font Generation . . . . . . . . . . . . . . . . . . . . . .
35
6.2
Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39
6.3
User Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
7 Conclusion
45
7.1
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
45
7.2
Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
46
References
48
ii
List of Figures
1.1
Font design tools . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
1.2
Basic font types . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
3.1
Glyph components. (a) Skin and skeleton are rendered as black
outline and pink edges and blue vertices, respectively. (b) Their
correspondence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
3.2
Incompatiblity in some characters. . . . . . . . . . . . . . . . . . . .
13
3.3
Typographic features in various characters. . . . . . . . . . . . . . .
14
4.1
Our system’s user interface . . . . . . . . . . . . . . . . . . . . . . .
17
4.2
Drawing operation: create a new loop, or edit existing one. . . . . .
18
4.3
Skin editing operation: move skeleton inside outline. . . . . . . . . .
19
4.4
Correspondence assignment operation: pick the skeleton’s vertex or
edge color, and paint correspondence on outline skin. . . . . . . . .
19
5.1
Our workflow to generate font from example . . . . . . . . . . . . .
21
5.2
Models of skeleton used for alphabet A to Z. . . . . . . . . . . . . .
22
5.3
Skeleton extraction step-by-step . . . . . . . . . . . . . . . . . . . .
24
5.4
Correspondence step-by-step . . . . . . . . . . . . . . . . . . . . . .
26
5.5
Effects of different transformations. . . . . . . . . . . . . . . . . . .
28
5.6
Laplacian coordinate . . . . . . . . . . . . . . . . . . . . . . . . . .
29
5.7
Show fixed and end vertices on skin correspondence. When skeleton
moved, features are preserved. . . . . . . . . . . . . . . . . . . . . .
iii
30
5.8
Samples of original and deformed outlines using feature-preserving
technique. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.9
Glyph’s metrics. from top to bottom: ascender line, base line, and
descender line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1
31
32
Generated fonts (right) from the example outlines and correspondences (top). The three template fonts that contribute to blending
most are listed in the bottom left box. . . . . . . . . . . . . . . . .
36
6.2
More results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
37
6.3
Failed results. Our drawback is that too different fonts cannot be
estimated correctly by our database. . . . . . . . . . . . . . . . . .
6.4
40
Experiment on consistency between multiple examples of the same
style. Given the input example (leftmost column), the output characters are generated (right columns). . . . . . . . . . . . . . . . . .
41
6.5
Fonts generated from user’s examples . . . . . . . . . . . . . . . . .
43
6.6
Template fonts in our database . . . . . . . . . . . . . . . . . . . .
44
iv
List of Tables
6.1
Time used during automatic font generation for each experiment. .
38
6.2
Results from experiment on user test. . . . . . . . . . . . . . . . . .
42
v
Chapter 1
Introduction
1.1
Backgrounds
Digital font is one of the standard facilities provided in every computer nowadays
since its wide range of usage from rendering text on screen, word processing, making
presentation, or creating any artistic work. It also plays an important role to many
profession, such as typographers, graphics designers, art and multimedia directors
or desktop publishing companies. Thanks to modern operating systems, which
mostly equipped with tons of fonts, users can find the suitable font matching their
tasks easier than ever. A font, or more precisely, a typeface, has long history in
a field called typography, and even has the dedicated profession to create it called
“type designer” or “font designer”.
Font design evolved from the development of printing. Early form of printing
began since ancient times. There are evidences of master type punches made from
hard metal to imprint copies of symbols or pattern to produce artifacts such as
coins. In Asia, block printing technique made from wood and metal was developed
in China around the end of Eastern Han Dynasty, and in Egypt during the 9th
and 10th centuries. The revolutionizing moveable type printing machine was independently invented by German goldsmith Johannes Gutenberg in 1439. It was the
first practical device that is capable of reproducing mass printings and gave birth
to high-quality typeface.
1
(a) Metal type in typesetting
(b) Digital font editor application
Figure 1.1: Font design tools
During the time of physical printing machine, a piece of cast metal type represents one glyph. These metal types were arranged to form a paper page in
typesetting process. A font is a traditional term for a complete character set of
single size and particular style or typeface. Typesetting of metal type was a common way in printing until a digitization of traditional font in 1970s that paved the
way for printing to become personal due to the affordability of personal computer.
Accordingly, font design was converted to digital process from the beginning to
final step. Today, any people can give font design a try easily enough by just
starting from commercially or freely available font editor applications.
Digital design process begins with sketches of key characters on a piece of
papers. These key characters hold characteristic design of the font, which we called
the font features. Font designer revises the sketches many time, and in the end,
draw the clean final outlines in order to scan them into computer. The bitmap
images were imported to font editor application such as that in Figure 1.1 and
converted to vector outlines. Font designer’s work has not done yet. He or she
2
needs to correct the vector outlines to obtain the high-quality font. This is quite
time-consuming and needs a lot of knowledge in using font editor effectively.
1.2
Font Types
(a) Bitmap font
(b) Outline font
(c) Stroke-based font
Figure 1.2: Basic font types
1.2.1
Bitmap
It is the earliest form of technology to display text on computer screen. Because
of its simplicity and easiness. While not efficient in both storage size and reuse at
different scales, it remains in use for artistic and specific purposes today.
1.2.2
Scalable Outline
Having more tremendous and flexible desirable properties such as high quality at
any point size, scalable outline has been widely accepted as standard fonts for more
than two decades and is the main format in most font design companies. It stores
glyph information by lines and spline curves. There are many technologies such as
Postscript, Truetype and OpenType fonts. Auxiliary information such as hinting
also included sometimes included.
3
1.2.3
Stroke-based
Stroke-based format is natural and economical in representing calligraphic script
characters. Therefore, it is extensively studied by researchers who are interested
in Chinese or Japanese calligraphy. Its compact and optimal structure makes it
suitable for ideographic characters from East Asian countries. However, its lack of
stylistic definition has rendered it less popular than scalable outline font. Strokebased font is currently in use in only limited fields. There are many commercial
stroke-based font engines—such as FontWorks’ Gaiji Master NEO, Monotype’s
iType, and FontFusion.
1.3
Our Contributions
Traditional approach in digital font design process requires professional skills, artistic sense, hands-on experiences, and expertise in typography, of which people other
than font design professionals are rarely capable. First of all, font designer sketches
a small number of key characters that hold unique style of the desire font. Then,
other characters can then be created hereditarily as derivatives of them. After
many style revision cycles and final detail decision, solid outlines of all characters
are drawn as blueprint on papers, digitized by a scanner, and converted into 2D
vector outlines. Control points of curves and straight lines are manually edited.
Finally, when the whole set of characters is completed, ready-to-distribute font are
generated using format of designer’s choice.
Our goal is to create a system that alleviates font design process by automating
character creation. The fundamental idea is to extend the example-based approach
to scalable outline font using single character outline as a target to generate a
complete character set. Contributions in our research includes a two-step simple
algorithm to generate font and a style importance preservation technique using
Laplacian editing. Based on skin and skeleton representation of character, we
extended it to a more flexible representation that is suitable for generation from a
4
large number of template fonts. To be concrete, our new character representation is
parameterized by blending weights of templates’ skin and skeleton. For this reason,
the example character style can be approximated from single input by finding the
optimal blending weight parameters that produce the most similar shape. On
a basis that only a few key characters hold most of important features, all other
characters can be inferred and generated from the approximated example character.
With only one example character as an input, this benefits not only amateurs but
also professional font or graphic designers from capability to rapidly and effortlessly
create new fonts and hence of easier exploration on a possibility of novel designs.
We also demonstrate our results of our method.
5
Chapter 2
Related Work
In this chapter, we cover some past work in various topics to which our research
is related. We begin from major techniques in representing a character shape,
specifically, feature-based and stroke-based. Then we make a brief overview of
current font design tools and applications, shape-preserving transformation, and
example-based generation.
2.1
2.1.1
Character Representation
Feature-based
There are many proposals of alternative representation of font rather than scalable
outline. Shamir and Roppoport [27] propose feature-based approach, which views
font as high-level features such as serifs, bars, arcs and joints, rather than low-level
objects such as points and splines. These high-level objects are recurring shapes
in different glyphs and thus, it is advantageous to be able to design only a handful
of local features with some geometric constraints but affect the global shapes.
This approach is solidified by component-based approach [13], which constructs
a font by using building block of parameterizable template shapes. The problem
is that designer need to make rules of relations on how to build a glyph from
subcomponents. How to extract the features of font is another research topics
that many tried to tackle [26, 28, 33]. Using inherent geometric properties of
6
control points is a standard method. Whether it is to exploit the extremum points,
continuity of outlines and its derivatives [26], classification of points and subgraphs
[28], or to score candidate points with some rules [33], this method produces reliable
results since the control points are semantically laid by professionals who designed
the fonts.
2.1.2
Stroke-based
Stroke-based representation for typographic character has been extensively studied owing to its intuitiveness to characterize calligraphic alphabets like Chinese
and Japanese. Fundamentally, it consists of structural and contour profile components. It gives complete topological information; however, lacking in complex
outline presentation is its big loophole. Many researchers attempted to enhance
to capture applications such as stylized stroke font [18], skeletal stroke [11, 12], or
brush footprints [25]. Jakubiak et al. [18] add promising stroke ends to the model
but it is doubtful whether it is enhancement or burden, since insufficient samples
are elaborated. Interestingly, skeletal stroke [11, 12] is a good starting point in the
elaborated stroke-based that extends usage to 2D graphics and animation; it also
inspires our work in exploiting anchoring in stroke deformation.
Advantages of stroke-based representation bring about the question of how can
we make a hybrid use of outline and stroke font. Conversion from stroke-based to
outline is trivial, in contrast to the other way round that requires extraction of axis
from the outline. Standard algorithms in image processing are thinning and medial
axis transform. Recent techniques such as mesh contraction [2] is very effective,
yet easy to implement. Another technique based on chordal axis for sketch-based
modeling is presented in [15] and improved in [20]. Based on this approach, we can
achieve robust skeletonization. On the other hand, embedding skeleton model to
the given 3D model [4] can be use with typography, but proved to be of less robust
than previous approach.
Finally, a uniform composite model for typography, which establishes general
7
topology for entire glyph set of specific language, usable in any fonts, has also been
developed [17, 10, 7]. To keep correspondence problem simple, we decide to use a
simple model that comprises only of a few nodes and edges as discussed in [7] over
smoother continuous skeleton because of its simplicity when comparing different
fonts.
2.2
Font Design Tool
Because of difficulties in making all characters by hand, there are many researches
and commercial products that assist, guide or automate some parts of font design pipeline. Commercial services to create handwriting font are not uncommon
[6, 21]. They simply scan user’s handwritings from the template sheet and convert
them to outline font. Programmable design tool like METAFONT [19] gives highly
controllable parameters over glyph shapes, points, lines and splines. Designer can
alter the glyph shapes using local or global parameters and achieve a rich diversity of design variations. This approach sacrifices the visual feedback and direct
manipulation for high flexibility and accuracy by means of programming, which
apparently is a problem for artists. There are feature-based interactive systems
such as [14] that, on one hand, based the design on geometric constraints to express spatial relationship between features. In spite of usefulness of feature-based
approach in design, complexity and time-consuming to make rules renders it not
much of use. Despite its difficulty at first, graphical spline-based user interface
remains the most popular choice in most font editors, since it offers high precision
and degree of control to digital typographer. Consequently, we choose to reduce
steps in design process—that is, a number of glyphs need to be designed—rather
than complications in user interface.
8
2.3
Shape-preserving Transformation
Applications in 2D computer graphics usually involve object transformation or
deformation. Object’s original appearances are changed, and most of the time,
deteriorated by linear operations, which is undesirable. Number of researches has
been conducted to overcome this issue [1, 16, 28, 29, 24, 3, 11]. Many of them try
to preserve a certain aspect of 2D shape, such as area [1] and original shape [16].
Ariel and Rappoport [28] preserve important designs of glyphs as part of their work
to reduce font storage size by storing only one copy of each recurring feature parts.
By analyzing and matching the intrinsic shapes, they choose to enlarge or reduce
only less important parts of each feature. Sorkine et al. [29], on the other hand,
use the Laplacian of a mesh to achieve rotation and scale invariant surface editing.
Nealen et al. [24] extended the idea and presented more general procedure using
Laplacian and positional constraints. This inspires us to develop the Laplacian
method on 2D outline that preserves the detail features of font styles—such as
serifs, corners and junctions—that is suitable for text fonts.
2.4
Example-based Generation
Example-based approach is one of the most popular techniques in the past decade
[5, 8, 9, 22, 23]. Such efforts are, for example, 3D face [5], reflectance model
[22], texture [23], and 3D model [9] generation from example. Blanz and Vetter’s
distinguishing technique [5] in creating 3D human face from 2D image is particularly noteworthy. The main idea is to parameterize 2D face as a blending result
from template 3D faces in database, then search for the generated face that resembles input face most. The inspiring series of work from Xu et al.[31, 30, 32]
develop algorithms to automatically generate Chinese calligraphy, which focus on
stylistic [32], accurate [30], and aesthetic [31] aspects, respectively. They introduce a constraint-based spatial reasoning method based on a few parameterized
calligraphic samples. Their methods only work well for calligraphic scripts, whose
9
general shapes are that from brush strokes, and cannot capture a complex designs
of those fonts used in printing and displaying. On the other hand, our system aims
to address this limitation and focus on general alphabet such that of the Roman
letters.
10
Chapter 3
Morphable Font Model
In this chapter, we present our font model that define essential glyph representation
used in automatic generation. In the first section we introduce our glyph which
consists of skin, skeleton, and correspondence information. In the second section,
we explain benefits from morphable model and how can the model be blended from
template font database.
3.1
Glyph Representation
We use a hybrid representation that makes use of stroke-based, feature-based and
outline font, which offers advantages from each format. Principally, one character
glyph can be defined by two components, that is, detail profile skin and structural
skeleton. Both components let us change the fine decorative style and topological
overall figure separately. For example, a ‘K’ glyph with original skin and skeleton is
given, one can move, resize, or rotate its skeleton freely. Effectively, the skin should
change according to skeleton, yet maintains its characteristic style. To avoid strange
artifacts and unfaithfulness to original form, we present a transformation algorithm
to preserve features from deterioration. Furthermore, in order to blend the template
fonts, there arose the need to make correspondence of skin and skeleton. Misaligned
or incomplete correspondence matching leads to a poor quality, and sometimes,
unrecognizable, glyph. We use simple feature-based strategy to distinguish and
11
determine features automatically.
(a)
(b)
Figure 3.1: Glyph components. (a) Skin and skeleton are rendered as black outline
and pink edges and blue vertices, respectively. (b) Their correspondence.
3.1.1
Skin
Contrary to traditional outline font, we prefer the term skin to the outline, to make
it clear about relationship between skeletons. The skin is a set of closed loops of
2D profiles that describes the glyph shape of particular style. It can be thought
of as closed planar polygons. We sacrifices a certain level of details for simplicity
by discretizing the continuous vector outline. This simple data structure let us
manage character information effectively.
3.1.2
Skeleton
Our simple skeleton can be described by the embedding of graph in the given shape
that appropriately abstracts its topological structure. Most work of stroke-based
font use splines that fit natural skeletons of the glyph shape―that is, medial path
along the direction of imaginative stroke. Although it retains smooth details, complexity in computing increases accordingly. Instead, we choose to use a graph of
nodes and edges embedding in the shape instead. This way, it reduces complex-
12
ity in comparing skeletons during optimization step, but still remains faithful to
reasonable interpolation.
Due to many reasons such as their origins and writing styles, some characters
have more than one possible topological structure. Since it is unreasonable to blend
between different structure fonts, as demonstrated in Figure 3.2; therefore, in the
scope of our work, we prohibit such cases. Our topological structure of simple
skeleton model is elaborated in Figure 5.2.
(a)
(b)
(c)
Figure 3.2: Incompatiblity in some characters.
3.1.3
Correspondence
As the prerequisite for blending, we require compatible skin correspondence for
all template glyphs. Inappropriate correspondence results in bad blended outlines.
Most of the time, the simple linear correspondence failed. Note here that there is no
trivial universal skin correspondence-matching algorithm; customized algorithms
need to be developed differently from application to application.
Characteristic decorations of typeface styles are different, and consequently,
make them very diverse in possible figures. In principle, however, these different
13
decorations can be viewed and grouped down to a few reusable components, or
features. Figure 3.3 shows prominent features in typology and type design.
Figure 3.3: Typographic features in various characters.
Feature-based [27] and component-based [13] design inspired us to take this approach into account for developing our method. In our initial observations in many
fonts, we found out that character features always enclose some skeleton nodes.
As a result, skeleton nodes can be inferred as important and stylistic components
to the font, or features, while skeleton edges, which are straight lines and curves,
can be thought of as low profile components, or non-features. Hence, we match
skin to either skeleton nodes or edges in accordance with its topological structure.
Referring to Figure 3.1, this is the is the sample of the ideal correspondence we
want from skin and skeleton. Please note that the features surround skeleton nodes
and non-features surround skeleton edges. On account of previously defined model
skeleton, we can get complete correspondence for any fonts that are compatible
with the skeleton model straightforwardly. This technique leads to a significant
improvement in blending quality due to more accuracy in semantic skin matching.
In the next chapter we will show that this correspondence will be used to preserve
original shape of features when the glyph is deformed.
14
3.2
Morphable Model
We need to create a more convenient representation in order to be capable of
blending between template fonts. We call this representation the Morphable Font.
The morphable font is generated by interpolating the corresponding skins from
each template font, we therefore describe it as a set of contributing weights from
each font. Let F = {f1 , f2 , . . . , fn }, where F is the set of template fonts fi from
database. We define the arbitrary blending style S and blending structure T by
the blending functions:
S = BlendStyleF (ΩS ) =
F
∑
ωSi · Skinfi
(3.1)
ωT i · Skeletonfi
(3.2)
i
T = BlendStructureF (ΩT ) =
F
∑
i
ΩS = {ωS1 , ωS2 , . . . ωSn }, is a set of contributing weights ωi for arbitrary style
S. Similarly, ΩT is defined in the same manner. Currently, we use simple linear
blending. For each correspondence, we take M = 15 samplings at any skin interval
and compute the new location of skin from BlendStyle(Ω). For skeleton, this
operation is performed only on its vertices. As a result, the ΩS and ΩK act as a
style parameter for any morphable font that can be blended in the template font
database. Details on how to find the matching style to the example input will be
covered in Chapter 5.
15
Chapter 4
User Interface
Our system presents a clean and straightforward user interface with only necessary
operations, as shown in Figure 4.1. User is given a blank canvas to draw an outline
of one character with drawing tools. For convenience and better visualization, user
can switch between outline font view and filled font view at any time. After drawing an outline, the user has an option to tell our system to generate skeleton and
its correspondence to skin automatically from the given outline. The generated
skeleton should follow the supposed figure that user imagined nicely. In the worst
case, the user can edit the skeleton by hand. At the same time, the estimated correspondence between skin and skeleton is visualized by regions and is distinguished
by colors according to its associated skeleton parts—that is, vertex or edge. When
everything is ready, the complete character set of the font will be generated using
all the information specified by user and those in the database.
4.1
Designing Font
The user expresses the desired style by drawing outline of single character. The
outline, which is treated as the example, must be a set of closed loop lines in order
to be processed in the next steps. Our system forces closed loop if any openings
are found.
16
Figure 4.1: Our system’s user interface
4.2
Drawing Outline
Beginners should find them very easy and intuitive to use at the first time. In
addition, professionals can draft the rough outline very quickly. Basically, the
user can draw free-form strokes using tablet pen. The undesirable stroke can be
modified easily just by drawing a new stroke, and our system will replace it at the
appropriate location.
17
Figure 4.2: Drawing operation: create a new loop, or edit existing one.
4.3
Editing Skeleton
In fact, our system provided automatic skeleton extraction on any given outlines.
Unfortunately, there are some cases that our implementation cannot identify skeleton correctly. In such cases, the user is encouraged to manually edit the skeleton
by using skeleton editing tools. The interaction is simple: just moving its vertices
and edges (Figure 4.3). The goal is to place the skeleton roughly at the centerlines of the glyph. In our system, we need only vertices which locate at glyph
features—that is, those at terminal, corner, junction, or extremum points. Thus,
the number of vertices and edges for Latin alphabet is usually less than ten, which
is the practical number for manual editing.
4.4
Editing Correspondence
Similar to skeleton, automatically generated correspondence may not describe the
nature of the glyph well. Our system graphically draws each element of skeleton
with different colors that respond to their attaching skin portion (Figure 4.4). The
user can reassign the correct correspondence simply by picking color using color
picker tool and painting the corresponding object using brush tool. It is important
18
Figure 4.3: Skin editing operation: move skeleton inside outline.
to the blending step that correspondence of skeleton vertex should cover the portion
of the outline where skeleton edges change major directions.
Figure 4.4: Correspondence assignment operation: pick the skeleton’s vertex or
edge color, and paint correspondence on outline skin.
19
Chapter 5
Implementation
In this chapter, we discuss the method used in order to generate font automatically
from user’s example using the template font database. We explain in detail how can
we extract skeleton and correspondence, the technique used to preserve character’s
features, matching algorithm, and lastly, font generation method.
5.1
5.1.1
Algorithm Overview
Example Outline Conversion to Skin-Skeleton Representation
In this step, we want to convert from example outline to our skin-skeleton representation. To be concrete, the input outline is converted to skin by sampling splines
at the specific resolution to create lists of edges. Next, the skeleton is extracted
by rigging from the chordal axis of triangulation of the skin. Further, the skin
will be grouped to cover character’s features based on the same meshes by growing
influential triangle from skeleton nodes. There are some cases that our system
fails to produce a correct skeleton or feature correspondence—in such cases, user
correction is required.
20
Figure 5.1: Our workflow to generate font from example
5.1.2
Font Generation From Template Database
Setting the converted hybrid representation of input example as a target, our system generate the font that complies with such style by finding the blended glyph
instance from template database, whose outline is the most similar to the example. The database comprises of many template fonts that have all been converted
to skin-skeleton representation, and consequently, are blendable because all correspondence has been established. In a manner of speaking, the template database
creates the font space of morphable font. We can parameterize arbitrary font style
by a set of contributing weights ΩS and ΩT . Using optimization technique, the
optimal parameters can be evaluated. Based on the assumption that such style
is consistent in all characters, we can therefore apply the style parameters to the
other characters as well.
21
5.2
Skeleton Extraction
We have predefined skeleton model that consists of specific set of vertices and
edges, as listed in Figure 5.2. Our goal is to rig the skeleton model to fit natural
skeleton of the given outline by using method based on chordal axis transform of a
mesh as introduced in [15, 20]. Although we examined some techniques to extract
the supposed skeleton from the outline, such as mesh contraction [2], and skeleton
rigging [4], we found out that the simple method like chordal axis performs very
well on a variety of shapes and generates robust results.
Figure 5.2: Models of skeleton used for alphabet A to Z.
We give a brief explanation about chordal axis creation. First, Constrained
Delaunay Triangulation is computed on the given skin, which is a closed planar
22
polygon, to produce a polygonal mesh. We define the term internal edge as the
edges not on the outline, and internal triangle as the triangles whose faces are all
internal edges. Then, for each triangle which has two internal edges, create a new
chordal edge (red edges in Figure 5.3(a) connecting the midpoints of internal edges.
For each internal triangle, we define its connectivity and use the following criteria
to determine the new chordal edges:
1. T-junction If there exists a pair of midpoint A and B on its faces that form
an approximately linear line compared to their chordal edges, then create a
new chordal node D by projecting another midpoint C on line segment AB
and connects three of them to D.
2. Center junction If there is no such pair, add an extra node in the center of
triangle, and create three chordal edges from midpoints of each edge.
The problem to rig skeleton on the chordal axis can be viewed as finding the
embedding of skeleton model on the graph. At the beginning, the vertices from
skeleton model are categorized into three types—terminal, chord, and junction
noes, whose degree is one, two, and three or more, respectively. Similarly, the
vertices of chordal axis are categorized using the same definition. Let ai ∈ Vskeleton
be skeleton node and bi ∈ Vchordal be chordal axis node. Our idea is to find the
terminal and junction nodes first, and then we can derive chord nodes adequately.
We want to find the embedding solution E = {ei }∀ai is terminal or Junction that
map ai to bei . Since the problem size is small, that is to say, the number of
candidates from skeleton model and chordal axis is less than 5 in general, it is
possible for us to exhaustively search for the answer. We find the embedding E
that scores the least penalty from the following function:
P (E) = DS (E) + DG (E)
(5.1)
DS is the penalty for total distance between all pairs of ai and bei in Euclidean
space, and DG is the penalty for distance on the graph of chordal axis. Let N (u)
23
(a) Chordial axis
(b) Smoothen and remove small
(c) Embed skeleton
branches
Figure 5.3: Skeleton extraction step-by-step
be the set of neighbor vertices of skeleton vertex u. For all adjacent nodes aj of ai ,
we define it as:
DG (E) =
∑
distance(bei )
(5.2)
ei ∈E
distance(bei ) =


minaj ∈N (ai ) shortest distance(be , be ) if topology is consistent
i
j
j

∞
else
(5.3)
The distant function gives the shortest path distance between the embedded
node bei to its neighbors on the chordal axis. To prevent conflict in topology, the
distance returns infinity if the topology is not consistent. Such case occurs when
there are any non-neighbor embedded nodes whose distance is shorter than its
neighbors on the same shortest path.
24
After terminal and junction nodes are extracted, chord nodes can be calculated
directly from the chordal axis graph by following the shortest path one of its two
adjacent nodes to the other. The chord node is embedded at the same distance
ratio as that of the skeleton model.
5.3
Skin-Skeleton Correspondence
We determine correspondence between skin and skeleton based on previously generated polygonal mesh. The goal is to assign a certain portion of skin outline to
either skeleton vertex or edge. In our experiments, the simple strategy such as
assignment of skin to the closest skeleton vertex fails in most cases. The reason is
that the underlying heuristic is inappropriate for structural-oriented font outline.
The strategy based on natural structure of a font is more promising. The idea
to use control points of existing fonts is presented by Zongker et al. [33] in their
work to learn font hinting. The underlying reason is plausible in practice, because
artists design those control points manually so they usually are the features that
we want; therefore, they include very helpful information to determine which portion of outline it is. However, we need other methods that do not rely solely on
spline-based outline font because our monotonous edge-based outline input lacks
semantic meaning. Our approach here can handle both types of font because it
depends on the shape itself.
Our motivation is the work of Au et al. [2] that extracts skeleton by mesh contraction. During the process, they obtain correspondence of mesh by determining
its influence on attracted mesh vertices. Inspired by their concept, we find correspondence using the assisting of the polygonal mesh triangulated from skin and its
previously embedded skeleton. The mesh has a desirable property that it expands
at full stroke’s breadth. Consequently, each triangle is surrounded by skin on all
sides whether it locates near junction, corner or terminal. On the other hand, the
skeleton vertices should be attached to the structurally important portion of the
skin, such as those that cover mesh triangles—therefore, it is reasonable to make
25
skin-skeleton correspondence by the aid of mesh triangles.
(a) Nearest internal triangles
(b) Colorize skeleton elements
(c) Fill correspondence skin
Figure 5.4: Correspondence step-by-step
For each skeleton vertices, we find the nearest mesh triangle within some threshold range T . If no triangle locates within distance T , we find the nearest internal
edge instead. We call such triangle the influence triangle of skeleton vertex V
(Figure 5.4(a)), and start establishing its corresponding skin at all three vertices
on the influence triangle (Shown in colors in Figure 5.4(b).) In case of an edge, we
call influence edge, and use its two vertices as corresponding points. With assumption that all skeleton vertices’ influence triangles are correctly identified, we derive
the remaining correspondence by floodfilling the unmarked skin between each pair
of corresponding points sequentially. The middle of each segment corresponds to
the skeleton edge that connects the two skeleton vertices. We need to consider to
what extent the influence from each corresponding point should expands. As we
want the high-frequency outline has sharp transition during deformation, so we
make the sharper the skin, the weaker its influence. Let lu,v be the length between
the corresponding vertex u and v to be filled, u−1 and u+1 are two adjacent skin
vertices, and u0 is midpoint between them, we define the influential length from u
to v to be:
Lu,v = 0.2 C(u) · lu,v
26
(5.4)
(
C(u) = min 1.0, 2 ∗
|uu0 | )
|u−1 u+1 |
(5.5)
The result is shown in Figure 5.4(c).
5.4
Feature-Preserving Technique
We propose the feature-preserving deformation technique for character glyph by
fixing only a portion of feature skin and smoothly repair the broken paths by
Laplacian editing. In our work, character glyph is deformed when its skeleton
changes. Our goal is to avoid any effects that result in odd shape, low quality, or
unfaithful to the original style because the deformed skins will be used as sources
to blend a new font. If their figures are altered too much, they cannot be used as
reliable templates, or, in the worst case, will corrupt the output. As described in
previous chapter, the skin correspondence is separated into two types: feature and
non-feature. We want to keep feature parts to be as much as possible similar to
the original shape, especially its stylized decorations, curviness, and alignment to
certain axis. Note here that linear transformation performed on all parts of skin
alter the features, as shown in Figure 5.5(b).
There are three inputs: the source glyph’s skin and skeleton, and the target
skeleton. The output is the feature-preserved deformed skin. First of all, our
approach starts by simple transformation following theses rules:
1. For feature skin, translate it by the displacement from original to target
skeleton vertex
2. For non-feature skin, transform it by affine transformation that allows only
directional scaling from original to target skeleton edge
The result at this stage is obviously broken and visually fails to follow the
continuous original skin (Figure 5.5(c)). We repair it by stitching these artifacts and
recover its original style by performing Laplacian-based editing operation on the
skin. The Laplacian coordinate is relative coordinate and is defined by difference
27
(a) Original glyph
(b) Linear deformation
(c) Fix features’ skin
(d) Preserve features
Figure 5.5: Effects of different transformations.
between that vertex and the middle of its adjacent vertices. Let V = {vi } be the
set of original vertices and V 0 = {vi0 } be the set of recovery vertices, N (u) be the
set of neighbor vertices of skeleton vertex u, we can define Laplacian coordinates
of vertex vi using uniform weights (Figure 5.6.) as following:


∑
1
L(vi ) = 
vj  − vi
|N (vi )|
(5.6)
j∈N (vi )
In matrix form, we call L the Laplacian operator of the mesh, and in 2D outline
case, |N (vi )| is always two. Thus, we define:


if vj ∈ N (vi )

 0.5
Lij =
−1
if j = i



0
else
28
(5.7)
Figure 5.6: Laplacian coordinate
And,




L
WL L


V0 = 
WP V
WP
(5.8)
Solving equation 5.8 is equal to fitting the given mesh vertices to the specified
constraints. There are two main constraints here: first, WL LV 0 = L, the laplacian
constraints, and second, WP V 0 = WP V , the positional constraints. WL and WP are
weighting diagonal matrix for the Laplacian and positional constraints, respectively.
The original features can be preserved by configuring WL , L, and L, which directly
control the resulting Laplacian coordinates, to be as close as possible to the original
Laplacian coordinates, while WP and the original vertices’ positions V are forcing
the overall new vertices’ positions to their own vicinity. It can be solved directly
in a linear least-square sense.
It is noteworthy here that these weights must be well-balanced, because large
WL smooths out the original shape, while small value makes the shape looking solid;
on the other hand, the larger WP becomes, the closer it stays to original shape. We
want WP to be constant, so we let WP = I. The idea is to set the Laplacian weights
locally. Rather than some fixed value for all vertices, we set them depending on its
29
importance to glyph features, which is defined by the following functions:


wM AX
if i = j, vi correspond to skin edge


)wM AX
[ ] (
WL = wij =
1 − Impt(i) if i = j, vi correspond to skin vertex

wM IN



0.0
else
(5.9)
( )max
is a linear function that returns value between min and max where
where x min
Figure 5.7: Show fixed and end vertices on skin correspondence. When skeleton
moved, features are preserved.
x ∈ [0, 1]. We set wM IN to 1 and wM AX to 10. Each segment of skin vertices has two
end vertices and two fixed vertices (Figure 5.7). Area between two fixed vertices
will be fixed to be invariant to linear transformation, while the area from fixed
vertices to the end vertices will be deformed smoothly preserving original features
The Impt(i) calculates importance of skin vertex vi , which ranges from 0 at the
end vertex, and increase by logistic function, P (t) = (1 + exp(−12 ∗ (t − 0.5)))−1 ,
to 1 at the fixed vertex and beyond. The two fixed vertices are the first occurrence
of vertex from each end whose accumulative Laplacian coordinate’s size, |L(v)—,
is larger than threshold T . As a result, the recovery outline looks smooth and
preserve features well (Figure 5.8.)
30
Figure 5.8: Samples of original and deformed outlines using feature-preserving
technique.
5.5
Database
We prepare font templates by converting from scalable outline fonts to our representation. Following the presented methods, one may find that in some cases,
generated skeleton or skin-skeleton correspondence is not satisfactory. In our experiences, there are a few characters that failed to produce acceptable results. In
31
such cases, we manually specify skeleton and/or correspondence. When interpolating font in the database, memory can be saved by loading only required character
from each font on at a time. We currently store the predefined template fonts in
separate files.
5.6
Style Matching
This step takes skin-skeleton representation of the example outline as an input,
and searches for the most similar blended style from the template database. Before we can perform matching step, we need to ensure that the blending process is
performed on the same font dimension. It must be pointed out that different fonts
Figure 5.9: Glyph’s metrics. from top to bottom: ascender line, base line, and
descender line
have different dimensions; therefore we need to transform them to the common
coordinates. In typography, the main dimensions that constrain general design are
width, line height and cap height. Line height and cap height are related attributes
in font design—that is, they are measured from the descender line to ascender line,
32
and base line to ascender line, respectively (Figure 5.9). Both vertical measurements are consistent in one font; on the other hand, width differs from character
to character. Since scaling to unit square leads to anisotropic scaling and destroy
their original dimensions, it should be avoided. We observed that widths are very
varying even in the same font while descender heights (base line to descender line)
are dependent on font styles. In the end, we use font’s cap height as a common
coordinate because of consistency in almost every glyph. Hence, when matching,
template fonts must be isotropic scaled by the factor relative to standard cap height
and translated horizontally to origin point beforehand. We only apply the transformation to skeletons but not skins, since their skins spontaneously transformed
by skeletons.
Next, our system uses simple optimization technique to estimate the input
glyph’s structure and style, respectively. In other words, we want to find the blending weights for structure ΩT first, and then for style ΩS . Because it is impossible to
find the globally optimal choice of weights since the search space is exponentially
large, optimization technique is good enough to find the optimal solution. We use
gradient descent algorithm to find the solution that yields the minimum value from
the objective function I(Ω) for structure, and J(Ω) for style, which is,
J(Ω) = α · D(Ω) + β · A(Ω)
(5.10)
α, β are constant, D(Ω) is the total distance, A(Ω) is the total different angle
between corresponding points on skin of the blended fonts and target font, respectively. I(Ω) is defined similarly for skeleton. The algorithm is simple: we start
from the set of random weight parameters Ω1 . . . ΩM based on the heuristics that
only some fonts contribute significantly to the optimal solution. Therefore, we
first compute M template fonts that generate the M least difference value J. Each
startup parameter occupies different portions of blending space. We add them to
the candidate queue. Picking the best scoring candidate parameter ΩM IN from the
queue, we expand it to N ∗ 2 new candidate parameters, where N is a number of
template fonts. Each new parameter is altered by increasing or decreasing a certain
33
weight by small value ρ:
ωi0 = ωi ± ρ
(5.11)
Queue ←
− arg maxωi0 (ωi0 − ωi )
(5.12)
We add only the ones that its increasing value in the objective function J exceeds
threshold—that is, those that seem to take the fastest path to the answer. The
algorithm repeat these steps until time is out or the queue becomes empty. When
the algorithm terminates, the acquired local optimal weights represents the style
of the input glyph.
5.7
Font Generation
This last step is very straightforward: applying the local optimal weights ΩT and
ΩS to the rest of the characters in the font set in order to generate the blended
glyphs. From our assumption that the style parameter is consistent within one
font, we can say that applying these weights to all glyphs means they have the
same style.
34
Chapter 6
Results
Our system is implemented in JAVA and all experiments are run on a 2GHz Intel
Core Duo with 1.5GB 667MHz of RAM Macbook Pro computer. Before the experiments, we set up the template font database beforehand. We built up the database
that contains 32 template fonts, which is selected to represent various styles, such
as serif, san-serif, comic, modern, or graffiti, in order to capture a larger set of
possible font designs.
6.1
Automatic Font Generation
We test our system by giving some sample characters and observe the outputs.
Each time, we try different font styles. Because it takes only single character as
an input, we decided to use the characters that have more structural paths, such
as ‘A’, ‘M’, ‘F’ and ’K’, so that it is provided with more information during the
matching process. All of the input glyph designs were done in our system, and each
took less than two minutes to finish. We show the generated fonts in Figure 6.1
and 6.2.
Our system produced fonts that learned the styles from single input. All the
generated glyphs look visually believable to be the same style. The design of
every characters abstract the original glyph well. First, the overall dimensions—
width, height, vertical slant—are consistent through out the fonts. This suggests
35
(a)
(b)
Figure 6.1: Generated fonts (right) from the example outlines and correspondences
(top). The three template fonts that contribute to blending most are listed in the
36
bottom left box.
(a)
(b)
Figure 6.2: More results.
37
Table 6.1: Time used during automatic font generation for each experiment.
Results
Experiment character Matching time (s)
Generating time (s)
Skeleton
Style
A
0.98
5.63
63.48
M
1.42
9.52
69.93
F
1.03
6.20
64.27
K
1.20
6.98
69.09
that the skeleton estimation is reliable in most scenarios. In fact, it is one of the
first priorities in font design that each glyph must be easily identified and clearly
recognizable at first glance, so the variety in glyph’s structure is not too diverse,
even our database of less than 50 templates can handle it in most cases. Second,
the blended outlines are continuous and features at terminals or junctions are not
transformed by anisotropic scaling. The effect is very interesting because it makes
styles free from structures; therefore, the blending style can be applied to the target
skeleton.
On the other hand, they obviously do not follow the examples precisely. It is
promising that the result tends to mimic the decorative path at the terminals and
junctions. However, the generated outlines, despite their similarity to the example,
do not fittingly approximate the feature skin. In Figure 6.2, the font generated
from example ‘K’ has noticeable swelling at the middle of glyphs. In this case, the
third contributing font has desirable bold figure, but contaminated with unwanted
decorations. This show one of the drawbacks of our algorithm that use the constant
blending weights everywhere in every characters.
Table 6.1 shows statistic on how much time each step takes. Skeleton matching
is fast, while the style matching speed is acceptable. Style matching is performed
on the skin of example character, and depend on sampling rate. ‘M’ takes longest
time because it has the longest outline. On the other side, the generation time
38
takes longer than we expected. The reason is that for each alphabet, our system
needs to solve the Laplacian mesh in order to transform all template fonts to the
target structure. The high-performance sparse linear solver can be used to speed
it up.
Linear blending obviously exposed its problem in creating novel design by sharing information from many sources. It works well for a few sources, but when the
number gets bigger, contributions from most of the templates are rendered less
significant because their result is averaged out by too many styles. One solution
is to use only a few significantly important styles. The others may be to find
different blending techniques that accumulatively add up contributions without
deteriorative effects.
It is noteworthy that the designs possibility is limited by the small number of
templates. As can be seen from Figure 6.3, our system cannot approximate the
example very well when the potentially similar style to the input (in this case, the
extra bold and curvy corner) is not presented in the database.
6.2
Consistency
We conducted a test to check the consistency of our method. We prepared a
professional font that does not included in our template database. Then, we input
one character to our system at a time, and recorded the generated glyphs. If the
generated glyphs from each input character have the same outlines, we can imply
that our system generates high-consistency and reliable results.
We show the samples we experimented in Figure 6.4. The input characters
are all from the same font, so they are consistency. In general, all test cases
created comparable styles. Nevertheless, the main difference is their skeletons. For
instance, the generated alphabet B’s in four cases have different ratios between
upper and lower arcs. Only the direct generation maintains the target ratios very
tightly. The others have arbitrary sizes. Another example is the variety of slant
angles in M’s. This shows the limitation of single character as an input that the
39
Figure 6.3: Failed results. Our drawback is that too different fonts cannot be
estimated correctly by our database.
40
Figure 6.4: Experiment on consistency between multiple examples of the same style.
Given the input example (leftmost column), the output characters are generated
(right columns).
desirable characters other than the example are ambiguous and ultimately require
more user intervention.
6.3
User Test
We conducted 3 informal experiments, with one user involved at a time. All of the
users are interested in font design but have little or no practical experiences. Our
experiment begins by our brief demonstration of how to use our system. Then, the
user is given three minutes to get hands-on practice of our system. Finally, we ask
41
Table 6.2: Results from experiment on user test.
User
Time to finish drawing (s)
Evaluation
1
2
3
Average
A
210
121
105
145.3
3
B
285
240
213
246.0
3
C
130
78
81
96.3
3
Total average
162.5
3
the user to design three characters with different styles on our system and generate
font from it. There is no time limit and the user can correct or generate font many
times as he wants until the user is satisfied with the result. After the test, users
are asked to evaluate our system on 1-5 score. We present the results in Figure 6.5
and Table 6.2.
We found out that the average time to finish drawing is less than three minutes,
even the longest experiment took less than five minutes, which suggested that it
is very fast compare to traditional process. One user said that this system is very
simple and straightforward, since it requires only one outline. But he found it
rather annoying that he needed to wait for a long time before he could see the
result. The other user also got used to our system very quickly, and drew many
characters. It is noticeable that before one push the button to generate font, he
takes time to make sure that the drawn outline is perfect, since he wants to avoid
the long waiting time. Another observation is that after the users generated one
font, they seemed to try editing on other characters without given any instruction
or notice to. This suggested that in order to make the interactive font generation
system, the system should let user revise his design, as many times, and as many
characters, as he wants.
42
Figure 6.5: Fonts generated from user’s examples
43
Figure 6.6: Template fonts in our database
44
Chapter 7
Conclusion
In tradition font design approach, it is very laborious and requires much skills and
experiences to create all character glyphs. Beginners are discouraged to complete
the task, while professionals are spending too much time on keeping consistent design and draw outline by hand. In our thesis, we present the system that addresses
these problems by taking an automatic generation approach with very simple user
interface. User is only required to draw a single character outline. Setting it as a
target style, our system searches the template font database for the style that best
estimates the target, and generates the complete character set of font. We propose
a hybrid font representation, feature preserving deformation, and style matching
techniques. From our experiments, the resulting font looks nicely similar to the
desired figure. Our system makes font design easier and friendlier to everyone,
while professional designer can rapidly design prototypes and develop new fonts in
no time. With plausible results from our work, we hope that this research encourages more people to get interested in font design and create many beautiful and
interesting fonts.
7.1
Limitations
Our current system is suitable for creating body text fonts. In order to generate
fancy or heading fonts with higher reliability, there are some issues that need to
45
be solved. For example, topology difference is one of the head-aching problems.
From the fact that many fancy fonts have small variations in their topology, for
example, ‘Q’ with connected or floating tail, it should be more flexible and allows
the correspondence matching even when such differences presented. Such cases can
be solved based on stroke representation, not outline. On the other hand, small ‘g’
and ‘g’ are two different writing styles. It is still debatable whether to make them
corresponds to each other or not.
One of the other drawbacks of our method also exists in other example-based
systems too. That is, it is lacking of creativity to create a complete novel design by
only referring to, but not copying, template fonts. In our work, the size of feasible
font space is limited by the simple linear blending strategy; hence the number of
realizable generated fonts is bounded to a certain degree. Even though our system
can generate visually many styles, it is still impossible to exactly produce every
desirable style from user ’s ideas. In order to get close to such goal, more complicating learning algorithms or artificial intelligent systems should be developed
specifically.
7.2
Future Work
In addition to single example, we want to extend our system to be applicable
for multiple example inputs. We observed that during the unofficial user test, as
explained in the previous chapter, that we should consider such approach, since
the concept is natural for font designer to revise his draft outlines many times,
alternatively from one character to another. During sketching prototypes, the
ultimate design is influenced by not one but many characters. We want to redesign
our matching algorithm to reflect this observation by considering all example glyphs
as the constraint goals. Such system would let user sketch more example glyphs
repetitively, and each time guide to the closer solution.
Out current implementation of target style optimization step can be further
improved in term of speed and memory. Using better data structure or faster al46
gorithm may help enhancing the overall performance, but current method relies
too much on the starting parameters and the pruning and expanding conditions,
which may restrict the search path to only a small fraction of feasible area of solution space. On the contrary, optimization technique that practically moves toward
global optimization such as stimulated annealing or genetic algorithms should be
put to the test. In brief, we want to develop smarter techniques to reduce generating time and improve generated feature quality.
Unfortunately, we have not conducted any experiments or received any comments from professional designers yet. In the future, we would like to hear their
feedbacks when using our system and how are their attitudes toward our future
research direction. Finally, we want to extend the database to include larger numbers and more variety of template fonts because the bigger the database is, the
larger the set of generable fonts becomes. As a result, our system can create font
more accurately and reliably.
47
References
[1] Marc Alexa, Daniel Cohen-Or, and David Levin. As-rigid-as-possible shape
interpolation. In SIGGRAPH ’00: Proceedings of the 27th annual conference
on Computer graphics and interactive techniques, pages 157–164, New York,
NY, USA, 2000. ACM Press/Addison-Wesley Publishing Co.
[2] Oscar Kin-Chung Au, Chiew-Lan Tai, Hung-Kuo Chu, Daniel Cohen-Or, and
Tong-Yee Lee. Skeleton extraction by mesh contraction. In SIGGRAPH ’08:
ACM SIGGRAPH 2008 papers, pages 1–10, New York, NY, USA, 2008. ACM.
[3] Shai Avidan and Ariel Shamir. Seam carving for content-aware image resizing.
In SIGGRAPH ’07: ACM SIGGRAPH 2007 papers, page 10, New York, NY,
USA, 2007. ACM.
[4] Ilya Baran and Jovan Popović. Automatic rigging and animation of 3d characters. In SIGGRAPH ’07: ACM SIGGRAPH 2007 papers, page 72, New York,
NY, USA, 2007. ACM.
[5] Volker Blanz and Thomas Vetter. A morphable model for the synthesis of
3d faces. In SIGGRAPH ’99: Proceedings of the 26th annual conference on
Computer graphics and interactive techniques, pages 187–194, New York, NY,
USA, 1999. ACM Press/Addison-Wesley Publishing Co.
[6] High-Logic B.V. www.yourfonts.com, January 2010.
[7] Martin J. Dürst. Coordinate-independent font description using kanji as an
example. Electronic Publishing, 6(3):133–143, 1993.
48
[8] William T. Freeman, Joshua B. Tenenbaum, and Egon C. Pasztor. Learning
style translation for the lines of a drawing. ACM Trans. Graph., 22(1):33–46,
2003.
[9] Thomas Funkhouser, Michael Kazhdan, Philip Shilane, Patrick Min, William
Kiefer, Ayellet Tal, Szymon Rusinkiewicz, and David Dobkin. Modeling by
example. In SIGGRAPH ’04: ACM SIGGRAPH 2004 Papers, pages 652–663,
New York, NY, USA, 2004. ACM.
[10] Jacky Hertz, Changyuan Hu, Jakob Gonczarowski, and Roger D. Hersch. A
window-based method for automatic typographic parameter extraction. In EP
’98/RIDT ’98: Proceedings of the 7th International Conference on Electronic
Publishing, Held Jointly with the 4th International Conference on Raster Imaging and Digital Typography, pages 44–54, London, UK, 1998. Springer-Verlag.
[11] S. C. Hsu, I. H. H. Lee, and N. E. Wiseman. Skeletal strokes. In UIST ’93:
Proceedings of the 6th annual ACM symposium on User interface software and
technology, pages 197–206, New York, NY, USA, 1993. ACM.
[12] Siu Chi Hsu and Irene H. H. Lee. Drawing and animation using skeletal
strokes. In SIGGRAPH ’94: Proceedings of the 21st annual conference on
Computer graphics and interactive techniques, pages 109–118, New York, NY,
USA, 1994. ACM.
[13] Changyuan Hu and Roger D. Hersch. Parameterizable fonts based on shape
components. IEEE Comput. Graph. Appl., 21(3):70–85, 2001.
[14] F. Hussain and B. Zalik. Towards a feature-based interactive system for intelligent font design. In Information Visualization, 1999. Proceedings. 1999
IEEE International Conference on, pages 378–383, 1999.
[15] Takeo Igarashi, Satoshi Matsuoka, and Hidehiko Tanaka. Teddy: a sketching interface for 3d freeform design. In SIGGRAPH ’99: Proceedings of the
49
26th annual conference on Computer graphics and interactive techniques, pages
409–416, New York, NY, USA, 1999. ACM Press/Addison-Wesley Publishing
Co.
[16] Takeo Igarashi, Tomer Moscovich, and John F. Hughes. As-rigid-as-possible
shape manipulation. In SIGGRAPH ’05: ACM SIGGRAPH 2005 Papers,
pages 1134–1141, New York, NY, USA, 2005. ACM.
[17] Koichi Itoh, , Koichi Itoh And, Koichi Itoh, and Yoshio” Ohno. A curve fitting
algorithm for character fonts. ELECTRONIC PUBLISHING, 6(3):195–206,
September 1993.
[18] Elena J. Jakubiak, Ronald N. Perry, and Sarah F. Frisken. An improved
representation for stroke-based fonts. In SIGGRAPH ’06: ACM SIGGRAPH
2006 Sketches, page 137, New York, NY, USA, 2006. ACM.
[19] Donald E. Knuth. The Metafont book. Addison-Wesley Longman Publishing
Co., Inc., Boston, MA, USA, 1986.
[20] Florian Levet and Xavier Granier. Improved skeleton extraction and surface
generation for sketch-based modeling. In GI ’07: Proceedings of Graphics
Interface 2007, pages 27–33, New York, NY, USA, 2007. ACM.
[21] Human-Computer Interface Ltd. www.fontifier.com, January 2010.
[22] Wojciech Matusik, Hanspeter Pfister, Matt Brand, and Leonard McMillan. A
data-driven reflectance model. In SIGGRAPH ’03: ACM SIGGRAPH 2003
Papers, pages 759–769, New York, NY, USA, 2003. ACM.
[23] Wojciech Matusik, Matthias Zwicker, and Frédo Durand. Texture design using a simplicial complex of morphable textures. In SIGGRAPH ’05: ACM
SIGGRAPH 2005 Papers, pages 787–794, New York, NY, USA, 2005. ACM.
[24] Andrew Nealen, Takeo Igarashi, Olga Sorkine, and Marc Alexa. Laplacian
mesh optimization. In GRAPHITE ’06: Proceedings of the 4th international
50
conference on Computer graphics and interactive techniques in Australasia and
Southeast Asia, pages 381–389, New York, NY, USA, 2006. ACM.
[25] Yuta Okabe, Suguru Saito, and Masayuki Nakajima. Paintbrush rendering of
lines using hmms. In GRAPHITE ’05: Proceedings of the 3rd international
conference on Computer graphics and interactive techniques in Australasia and
South East Asia, pages 91–98, New York, NY, USA, 2005. ACM.
[26] Ariel Shamir and Ari Rappoport. Extraction of typographic elements from
outline representations of fonts. Computer Graphics Forum, 15:259–268, 1996.
[27] Ariel Shamir and Ari Rappoport. Feature-based design of fonts using constraints. In EP ’98/RIDT ’98: Proceedings of the 7th International Conference
on Electronic Publishing, Held Jointly with the 4th International Conference
on Raster Imaging and Digital Typography, pages 93–108, London, UK, 1998.
Springer-Verlag.
[28] Ariel Shamir and Ari Rappoport. Compacting oriental fonts by optimizing
parametric elements. The Visual Computer, 15(6):302–318, 1999.
[29] O. Sorkine, D. Cohen-Or, Y. Lipman, M. Alexa, C. Rössl, and H.-P. Seidel.
Laplacian surface editing. In Proceedings of the 2004 Eurographics/ACM SIGGRAPH symposium on Geometry processing, pages 175–184, New York, NY,
USA, 2004. ACM.
[30] Songhua Xu, Hao Jiang, Tao Jin, Francis C. M. Lau, and Yunhe Pan. Automatic facsimile of chinese calligraphic writings. Comput. Graph. Forum,
27(7):1879–1886, 2008.
[31] Songhua Xu, Hao Jiang, Francis C. M. Lau, and Yunhe Pan. An intelligent
system for chinese calligraphy. In AAAI’07: Proceedings of the 22nd national
conference on Artificial intelligence, pages 1578–1583. AAAI Press, 2007.
51
[32] Songhua Xu, Francis C. M. Lau, Kwok-Wai Cheung, and Yunhe Pan. Automatic generation of artistic chinese calligraphy. In IAAI’04: Proceedings of
the 16th conference on Innovative applications of artifical intelligence, pages
937–942. AAAI Press / The MIT Press, 2004.
[33] Douglas E. Zongker, Geraldine Wade, and David H. Salesin. Example-based
hinting of true type fonts. In SIGGRAPH ’00: Proceedings of the 27th annual
conference on Computer graphics and interactive techniques, pages 411–416,
New York, NY, USA, 2000. ACM Press/Addison-Wesley Publishing Co.
52