Top Banner
Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia [email protected] Leonid Mestetskiy Moscow State University Moscow, Russia [email protected] Andrey Semenov Tver State University Tver, Russia [email protected]
38

Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia [email protected].

Dec 18, 2015

Download

Documents

Lee Burke
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Handwritten Fonts Modeling Based on Fat Lines of Variable Width

Stanislav KlimenkoMoscow Physicotechnical Institute

Moscow, [email protected]

Leonid MestetskiyMoscow State University

Moscow, [email protected]

Andrey SemenovTver State University

Tver, [email protected]

Page 2: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Fonts DescribingThe 16-th International Conference in Central Europe on

Computer Graphics, Visualization andComputer Vision'2008

Outline description is union of Bezier curves 2

Page 3: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Fonts DescribingDisadvantages of outline description:1. Implementation of “alive” handwriting is difficulty

2. Doesn’t allow implementing variations of stroke width of pen

3. The problem of preservation of contour smoothness

?

3

Page 4: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Handwritten Fonts

4

Page 5: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

1. Representation of a font as a trace of pen «with a variable width»

2. Obtaining of a font in the form of curves with a width on the scanned image

Our approach

5

Page 6: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

],[

})())(())((:),{( 2222

bat

trtvytuxRyxCt

- Fat curve with axis P(t)=(u(t),v(t)) and thickness r(t)

Fat Curve

tCaC

bC

is family of circles of variable radius with centers on smooth curve

6

Page 7: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Elementary Fat B-Spline Curve

33

232

231

30

)(

1333)(

463)(

)1()(

ttB

ttttB

tttB

ttB

3

0

*)(61

)(i

ii HtBtC

},,{ iriyixi HHHH

7

Page 8: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Composite Fat B-Spline Curve

8

Page 9: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

The hand-written alphabet (Russian)

Personal hand-written font

Our task

9

Page 10: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Step 1• The person writes separate letters by ink pen on a

paper, for example, the alphabet

The method description

Step 2• The image is digitized by the scanner 10

Page 11: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

The method description

Binary image Polygonal figure

Step 3• Construction of piecewise-linear boundary as a

polygon of minimal perimeter

11

Page 12: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

The method description

Polygonal figure Continuous skeleton

Step 4• Construction of continuous skeleton as a set of

medial axes of polygonal figure

12

Page 13: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

The method descriptionStep 5• Construction of a base skeleton

Continuous skeleton Base skeleton 13

Page 14: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

The method descriptionStep 6• Decomposition branches of base skeleton

Base skeleton Base skeleton with circles 14

Page 15: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

The method descriptionStep 7• Approximation of base skeleton by a circular figure

Circular figureBase skeleton with circles 15

Page 16: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Fat Curve Outline Smoothing• Recalculation radius value for each control circle:

riirriir HkHkHkH 13211'

16

Page 17: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Fat Curve Axis Smoothing• Recalculation center coordinates for each control circle:

.

,

13211'

13211'

yiiyyiiy

xiixxiix

HkHkHkH

HkHkHkH

17

Page 18: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Fat Curve Sewing

18

Page 19: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Kerning task

What is better ?

19

Page 20: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Alignment of letter spacing • Kerning - is a visual alignment of letter spacing in process

of text on raster devices .

How is near ?

20

Page 21: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Method of Automatic Kerning1. Rasterization of kerning pair of characters on a common base line of raster

21

Page 22: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Method of Automatic Kerning2. Scanning by a horizontal line "from top to bottom" with step of 1 pixel

22

Page 23: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Method of Automatic Kerning3. At each position of a scanning line

23

Page 24: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

4. Defining position of a scanning line at which distance between the points is minimum

Method of Automatic Kerning

Minimal distance

24

Page 25: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

5. Defining minimal kerning distance

Method of Automatic Kerning

Minimal kerning distance

Is negative kerning25

Page 26: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

5. Defining minimal kerning distance

Method of Automatic Kerning

Minimal kerning distance

Is positive kerning26

Page 27: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Some examples

KERNING[я][б] = 15

KERNING[в][а] = -72

Method of Automatic Kerning

Minimal kerning distance is 20

27

Page 28: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Kerning table

а б в г .. .. э ю я

а 19 15 8 12 .. -3 11 19

б -13 -17 -5 -8 .. .. -7 -29 -21

в -72 1 -62 -67 .. .. -66 -88 -80

г 19 15 8 10 .. .. -9 10 19

.. .. .. .. .. .. .. .. .. ..

.. .. .. .. .. .. .. .. .. ..

э 4 0 19 19 .. .. 10 -13 -5

ю 16 12 6 3 .. .. 19 2 12

я 19 15 11 17 .. .. 9 19 19

Method of Automatic Kerning

28

Page 29: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Method of Automatic Kerning

KERNING[в][ю] = -88 What does it mean ?

Length of this segment is 88

It means how many pixels to the left it is necessary to move the right character

29

Page 30: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Some examples

Method of Automatic Kerning

It’s A.S. Pushkin

No kerning30

Page 31: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Some examples

Method of Automatic Kerning

It’s A.S. Pushkin

Kerning is 20 pixels31

Page 32: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Some examples

Method of Automatic Kerning

It’s A.S. Pushkin

Kerning is 40 pixels32

Page 33: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Thickness Pen Modeling

33

Page 34: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

3D Modeling

34

• Modeling of 3D effect by layer painting

Page 35: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

“Alive” Handwriting Modeling

iirir HH i - is noise

• Adding of small noise into values of radiuses

35

Page 36: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

• Adding of small noise into values of radiuses

“Alive” Handwriting Modeling

36

Page 37: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

• Converting fat curve representation to outline description

Export to famous description

37

Fat curves description PostScript description

Page 38: Handwritten Fonts Modeling Based on Fat Lines of Variable Width Stanislav Klimenko Moscow Physicotechnical Institute Moscow, Russia klimenko@sim.ol.ru.

Summary

• The method of fat curves is efficient tool for modeling of hand-written characters;

• There is possibility of letterspacings controlling (zoom in/out letterspacing);

• There is easy way to modeling “alive” handwriting;

• Our approach can be used as embedded module (plug-in) in font editors.

38