File: al_load_ttf_font.3

package info (click to toggle)
allegro5 2%3A5.0.10-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 14,856 kB
  • ctags: 15,948
  • sloc: ansic: 87,540; cpp: 9,693; objc: 3,491; python: 2,057; sh: 829; makefile: 93; perl: 37; pascal: 24
file content (47 lines) | stat: -rw-r--r-- 1,368 bytes parent folder | download
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
.TH al_load_ttf_font 3 "" "Allegro reference manual"
.SH NAME
.PP
al_load_ttf_font \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro_ttf.h>

ALLEGRO_FONT\ *al_load_ttf_font(char\ const\ *filename,\ int\ size,\ int\ flags)
\f[]
.fi
.SH DESCRIPTION
.PP
Loads a TrueType font from a file using the FreeType library.
Quoting from the FreeType FAQ this means support for many different font
formats:
.PP
\f[I]TrueType, OpenType, Type1, CID, CFF, Windows FON/FNT, X11 PCF, and
others\f[]
.PP
The \f[I]size\f[] parameter determines the size the font will be
rendered at, specified in pixels.
The standard font size is measured in \f[I]units per EM\f[], if you
instead want to specify the size as the total height of glyphs in
pixels, pass it as a negative value.
.RS
.PP
\f[I]Note:\f[] If you want to display text at multiple sizes, load the
font multiple times with different size parameters.
.RE
.PP
The following flags are supported:
.IP \[bu] 2
ALLEGRO_TTF_NO_KERNING \- Do not use any kerning even if the font file
supports it.
.IP \[bu] 2
ALLEGRO_TTF_MONOCHROME \- Load as a monochrome font (which means no
anti\-aliasing of the font is done).
.IP \[bu] 2
ALLEGRO_TTF_NO_AUTOHINT \- Disable the Auto Hinter which is enabled by
default in newer versions of FreeType.
Since: 5.0.6, 5.1.2
.SH SEE ALSO
.PP
al_init_ttf_addon(3), al_load_ttf_font_f(3)