1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
Freetype User Guide
(work in progress)
Introduction
Choosing a font type
- Outline
- Polygonal
- Texture mapped
- Bitmapped
- Antialiased pixmapped
Creating a font
FTGLPixmapFont font;
font.Open( "Fonts:Arial");
font.FaceSize( 72);
font.render( "Hello World!");
More font commands
Specifying a character map encoding.
From the freetype docs...
By default, when a new face object is created, (freetype) lists all the charmaps contained in the font face and selects the one that supports Unicode character codes if it finds one. Otherwise, it tries to find support for Latin-1, then ASCII.
Sets the character map for the face.
Valid encodings as at Freetype 2.0.4
ft_encoding_none
ft_encoding_symbol
ft_encoding_unicode
ft_encoding_latin_2
ft_encoding_sjis
ft_encoding_gb2312
ft_encoding_big5
ft_encoding_wansung
ft_encoding_johab
ft_encoding_adobe_standard
ft_encoding_adobe_expert
ft_encoding_adobe_custom
ft_encoding_apple_roman
You can expilcitly set the char encoding...
font.CharMap( ft_encoding_apple_roman);
This will return an error if the encoding can't be found.
Problems
FAQ