Typoyaya
Typoyaya
Typography
Topics
Types of fonts
Font properties
Font metrics
Box and glue model for layout
Unicode
Page 1
References
References
Page 2
Types of Type
Page 3
Oldstyle (Renaissance)
Modern
Page 4
Slab Serif
Page 5
Sans Serif
Page 6
Other Languages
Calligraphy
龍
Font
Properties
Page 7
Typographical Size
Units
Points (pt)
Traditional: 72 pt = 0.996 in
Adobe: 72 pt = 1 in
Picas (pc)
12 pt = 1 pc
Em (ps x ps)
En (M/2)
Standard sizes and names
http://www.sizes.com/tools/type.htm
Font Sizes
Page 8
Styles
“a” changed
Weights
Page 9
Stretch
Myriad MM
Weight
Width
CS148 Lecture 9 Pat Hanrahan, Fall 2009
Page 10
Font Metrics
Different x-heights
Page 11
Leading
Kerning
Page 12
Ligatures
Combining Marks
Page 13
Glyph Variants
Glyph Metrics
Page 14
Box and Glue Model (Knuth)
Page 15
Unicode [unicode.org]
Encoding
Character map: encoding -> glyph
Glyphs
Glyph metrics
Page 16
Anatomy of a Glyph
Page 17
Rasterization
Anti-Aliased Rendering
Microsoft ClearType
Page 18
Representing Bitmaps
Glubyte rasters[24] = {!
0xc0, 0x00,!
0xc0, 0c00,!
0xc0, 0x00,!
0xc0, 0c00,!
0xc0, 0c00,!
0xff, 0x00,!
0xff, 0x00,!
0xc0, 0x00,!
0xc0, 0x00,!
0xc0, 0x00,! Note: Rows have 1 byte alignment
0xff, 0x00,!
0xff, 0x00! glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
};
CS148 Lecture 9 Pat Hanrahan, Fall 2009
Drawing Bitmaps
Syntax
!glBitmap( w, h, xoff, yoff, xinc, yinc, data );
Example:
!glRasterPos2i( 20, 20 );!
!glBitmap( 10, 12, 0.0, 0.0, 11.0, 0.0, rasters );
Page 19
Things to Remember
Typography
Types of type
Style, weight, stretch
Character encoding is different than glyph index
Font metrics
Layout, box and glue model
Glyph outlines are modeled using splines
Page 20