File: freetype_doc.h

package info (click to toggle)
pygame 2.6.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 43,076 kB
  • sloc: ansic: 66,932; python: 48,797; javascript: 1,153; objc: 224; sh: 121; makefile: 59; cpp: 25
file content (266 lines) | stat: -rw-r--r-- 10,672 bytes parent folder | download | duplicates (2)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
/* Auto generated file: with makeref.py .  Docs go in docs/reST/ref/ . */
#define DOC_PYGAMEFREETYPE "Enhanced pygame module for loading and rendering computer fonts"
#define DOC_PYGAMEFREETYPEGETERROR "get_error() -> str\nget_error() -> None\nReturn the latest FreeType error"
#define DOC_PYGAMEFREETYPEGETVERSION "get_version(linked=True) -> (int, int, int)\nReturn the FreeType version"
#define DOC_PYGAMEFREETYPEINIT "init(cache_size=64, resolution=72) -> None\nInitialize the underlying FreeType library."
#define DOC_PYGAMEFREETYPEQUIT "quit() -> None\nShut down the underlying FreeType library."
#define DOC_PYGAMEFREETYPEGETINIT "get_init() -> bool\nReturns True if the FreeType module is currently initialized."
#define DOC_PYGAMEFREETYPEWASINIT "was_init() -> bool\nDEPRECATED: Use get_init() instead."
#define DOC_PYGAMEFREETYPEGETCACHESIZE "get_cache_size() -> long\nReturn the glyph case size"
#define DOC_PYGAMEFREETYPEGETDEFAULTRESOLUTION "get_default_resolution() -> long\nReturn the default pixel size in dots per inch"
#define DOC_PYGAMEFREETYPESETDEFAULTRESOLUTION "set_default_resolution([resolution])\nSet the default pixel size in dots per inch for the module"
#define DOC_PYGAMEFREETYPESYSFONT "SysFont(name, size, bold=False, italic=False) -> Font\ncreate a Font object from the system fonts"
#define DOC_PYGAMEFREETYPEGETDEFAULTFONT "get_default_font() -> string\nGet the filename of the default font"
#define DOC_PYGAMEFREETYPEFONT "Font(file, size=0, font_index=0, resolution=0, ucs4=False) -> Font\nFont(pathlib.Path) -> Font\nCreate a new Font instance from a supported font file."
#define DOC_FONTNAME "name -> string\nProper font name."
#define DOC_FONTPATH "path -> unicode\nFont file path"
#define DOC_FONTSIZE "size -> float\nsize -> (float, float)\nThe default point size used in rendering"
#define DOC_FONTGETRECT "get_rect(text, style=STYLE_DEFAULT, rotation=0, size=0) -> rect\nReturn the size and offset of rendered text"
#define DOC_FONTGETMETRICS "get_metrics(text, size=0) -> [(...), ...]\nReturn the glyph metrics for the given text"
#define DOC_FONTHEIGHT "height -> int\nThe unscaled height of the font in font units"
#define DOC_FONTASCENDER "ascender -> int\nThe unscaled ascent of the font in font units"
#define DOC_FONTDESCENDER "descender -> int\nThe unscaled descent of the font in font units"
#define DOC_FONTGETSIZEDASCENDER "get_sized_ascender(<size>=0) -> int\nThe scaled ascent of the font in pixels"
#define DOC_FONTGETSIZEDDESCENDER "get_sized_descender(<size>=0) -> int\nThe scaled descent of the font in pixels"
#define DOC_FONTGETSIZEDHEIGHT "get_sized_height(<size>=0) -> int\nThe scaled height of the font in pixels"
#define DOC_FONTGETSIZEDGLYPHHEIGHT "get_sized_glyph_height(<size>=0) -> int\nThe scaled bounding box height of the font in pixels"
#define DOC_FONTGETSIZES "get_sizes() -> [(int, int, int, float, float), ...]\nget_sizes() -> []\nreturn the available sizes of embedded bitmaps"
#define DOC_FONTRENDER "render(text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> (Surface, Rect)\nReturn rendered text as a surface"
#define DOC_FONTRENDERTO "render_to(surf, dest, text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> Rect\nRender text onto an existing surface"
#define DOC_FONTRENDERRAW "render_raw(text, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> (bytes, (int, int))\nReturn rendered text as a string of bytes"
#define DOC_FONTRENDERRAWTO "render_raw_to(array, text, dest=None, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> Rect\nRender text into an array of ints"
#define DOC_FONTSTYLE "style -> int\nThe font's style flags"
#define DOC_FONTUNDERLINE "underline -> bool\nThe state of the font's underline style flag"
#define DOC_FONTSTRONG "strong -> bool\nThe state of the font's strong style flag"
#define DOC_FONTOBLIQUE "oblique -> bool\nThe state of the font's oblique style flag"
#define DOC_FONTWIDE "wide -> bool\nThe state of the font's wide style flag"
#define DOC_FONTSTRENGTH "strength -> float\nThe strength associated with the strong or wide font styles"
#define DOC_FONTUNDERLINEADJUSTMENT "underline_adjustment -> float\nAdjustment factor for the underline position"
#define DOC_FONTFIXEDWIDTH "fixed_width -> bool\nGets whether the font is fixed-width"
#define DOC_FONTFIXEDSIZES "fixed_sizes -> int\nthe number of available bitmap sizes for the font"
#define DOC_FONTSCALABLE "scalable -> bool\nGets whether the font is scalable"
#define DOC_FONTUSEBITMAPSTRIKES "use_bitmap_strikes -> bool\nallow the use of embedded bitmaps in an outline font file"
#define DOC_FONTANTIALIASED "antialiased -> bool\nFont anti-aliasing mode"
#define DOC_FONTKERNING "kerning -> bool\nCharacter kerning mode"
#define DOC_FONTVERTICAL "vertical -> bool\nFont vertical mode"
#define DOC_FONTROTATION "rotation -> int\ntext rotation in degrees counterclockwise"
#define DOC_FONTFGCOLOR "fgcolor -> Color\ndefault foreground color"
#define DOC_FONTBGCOLOR "bgcolor -> Color\ndefault background color"
#define DOC_FONTORIGIN "origin -> bool\nFont render to text origin mode"
#define DOC_FONTPAD "pad -> bool\npadded boundary mode"
#define DOC_FONTUCS4 "ucs4 -> bool\nEnable UCS-4 mode"
#define DOC_FONTRESOLUTION "resolution -> int\nPixel resolution in dots per inch"


/* Docs in a comment... slightly easier to read. */

/*

pygame.freetype
Enhanced pygame module for loading and rendering computer fonts

pygame.freetype.get_error
 get_error() -> str
 get_error() -> None
Return the latest FreeType error

pygame.freetype.get_version
 get_version(linked=True) -> (int, int, int)
Return the FreeType version

pygame.freetype.init
 init(cache_size=64, resolution=72) -> None
Initialize the underlying FreeType library.

pygame.freetype.quit
 quit() -> None
Shut down the underlying FreeType library.

pygame.freetype.get_init
 get_init() -> bool
Returns True if the FreeType module is currently initialized.

pygame.freetype.was_init
 was_init() -> bool
DEPRECATED: Use get_init() instead.

pygame.freetype.get_cache_size
 get_cache_size() -> long
Return the glyph case size

pygame.freetype.get_default_resolution
 get_default_resolution() -> long
Return the default pixel size in dots per inch

pygame.freetype.set_default_resolution
 set_default_resolution([resolution])
Set the default pixel size in dots per inch for the module

pygame.freetype.SysFont
 SysFont(name, size, bold=False, italic=False) -> Font
create a Font object from the system fonts

pygame.freetype.get_default_font
 get_default_font() -> string
Get the filename of the default font

pygame.freetype.Font
 Font(file, size=0, font_index=0, resolution=0, ucs4=False) -> Font
 Font(pathlib.Path) -> Font
Create a new Font instance from a supported font file.

pygame.freetype.Font.name
 name -> string
Proper font name.

pygame.freetype.Font.path
 path -> unicode
Font file path

pygame.freetype.Font.size
 size -> float
 size -> (float, float)
The default point size used in rendering

pygame.freetype.Font.get_rect
 get_rect(text, style=STYLE_DEFAULT, rotation=0, size=0) -> rect
Return the size and offset of rendered text

pygame.freetype.Font.get_metrics
 get_metrics(text, size=0) -> [(...), ...]
Return the glyph metrics for the given text

pygame.freetype.Font.height
 height -> int
The unscaled height of the font in font units

pygame.freetype.Font.ascender
 ascender -> int
The unscaled ascent of the font in font units

pygame.freetype.Font.descender
 descender -> int
The unscaled descent of the font in font units

pygame.freetype.Font.get_sized_ascender
 get_sized_ascender(<size>=0) -> int
The scaled ascent of the font in pixels

pygame.freetype.Font.get_sized_descender
 get_sized_descender(<size>=0) -> int
The scaled descent of the font in pixels

pygame.freetype.Font.get_sized_height
 get_sized_height(<size>=0) -> int
The scaled height of the font in pixels

pygame.freetype.Font.get_sized_glyph_height
 get_sized_glyph_height(<size>=0) -> int
The scaled bounding box height of the font in pixels

pygame.freetype.Font.get_sizes
 get_sizes() -> [(int, int, int, float, float), ...]
 get_sizes() -> []
return the available sizes of embedded bitmaps

pygame.freetype.Font.render
 render(text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> (Surface, Rect)
Return rendered text as a surface

pygame.freetype.Font.render_to
 render_to(surf, dest, text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> Rect
Render text onto an existing surface

pygame.freetype.Font.render_raw
 render_raw(text, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> (bytes, (int, int))
Return rendered text as a string of bytes

pygame.freetype.Font.render_raw_to
 render_raw_to(array, text, dest=None, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> Rect
Render text into an array of ints

pygame.freetype.Font.style
 style -> int
The font's style flags

pygame.freetype.Font.underline
 underline -> bool
The state of the font's underline style flag

pygame.freetype.Font.strong
 strong -> bool
The state of the font's strong style flag

pygame.freetype.Font.oblique
 oblique -> bool
The state of the font's oblique style flag

pygame.freetype.Font.wide
 wide -> bool
The state of the font's wide style flag

pygame.freetype.Font.strength
 strength -> float
The strength associated with the strong or wide font styles

pygame.freetype.Font.underline_adjustment
 underline_adjustment -> float
Adjustment factor for the underline position

pygame.freetype.Font.fixed_width
 fixed_width -> bool
Gets whether the font is fixed-width

pygame.freetype.Font.fixed_sizes
 fixed_sizes -> int
the number of available bitmap sizes for the font

pygame.freetype.Font.scalable
 scalable -> bool
Gets whether the font is scalable

pygame.freetype.Font.use_bitmap_strikes
 use_bitmap_strikes -> bool
allow the use of embedded bitmaps in an outline font file

pygame.freetype.Font.antialiased
 antialiased -> bool
Font anti-aliasing mode

pygame.freetype.Font.kerning
 kerning -> bool
Character kerning mode

pygame.freetype.Font.vertical
 vertical -> bool
Font vertical mode

pygame.freetype.Font.rotation
 rotation -> int
text rotation in degrees counterclockwise

pygame.freetype.Font.fgcolor
 fgcolor -> Color
default foreground color

pygame.freetype.Font.bgcolor
 bgcolor -> Color
default background color

pygame.freetype.Font.origin
 origin -> bool
Font render to text origin mode

pygame.freetype.Font.pad
 pad -> bool
padded boundary mode

pygame.freetype.Font.ucs4
 ucs4 -> bool
Enable UCS-4 mode

pygame.freetype.Font.resolution
 resolution -> int
Pixel resolution in dots per inch

*/