10 load(filename
: STRING; size
: INTEGER) is
14 ptr
:= ext_ttf_openfont(filename
.to_external
, size
)
15 if ptr
.is_not_null
then
18 io
.put_string("Failed to load font: " + filename
+ "%N")
24 if ptr
.is_not_null
then
25 ptr
:= free_ttf_font(ptr
)
30 set_style(i
: INTEGER) is
32 ttf_setfontstyle(ptr
, i
)
35 to_external
: POINTER
is
40 ttf_setfontstyle(p
: POINTER
; i
: INTEGER) is
41 external "C" alias "TTF_SetFontStyle"
44 free_ttf_font(font
: POINTER
) : POINTER
is
51 ext_ttf_openfont(p
: POINTER
; size
: INTEGER) : POINTER
is