All Bundles
Font
TrueType font rendering
Operations
New
Load file for use as a font, this can load TTF and FON files.
New(file:String, ptsize:Int)
Parameters
Name | Type | Description |
---|
file | String | file name to load font from. |
ptsize | Int | Point size (based on 72DPI) to load font as |
Load file for use as a font, this can load TTF and FON files.
New(file:String, ptsize:Int, index:Int)
Parameters
Name | Type | Description |
---|
file | String | file name to load font from. |
ptsize | Int | Point size (based on 72DPI) to load font as |
index | Int | choose a font face from a file containing multiple font faces. The first face is always index 0. |
Init
Initialize the TrueType font APIs
function : Init() ~ Int
IsNull
Determines if the underlying SDL C-struct is NULL
method : public : IsNull() ~ Bool
Return
Type | Description |
---|
Bool | true if NULL, false otherwise |
Quit
Shutdown and cleanup the TrueType font APIs
function : Quit() ~ Nil
RenderTextBlended
Render the LATIN1 encoded text blended
method : public : RenderTextBlended(text:String, fg:Color) ~ Surface
Parameters
Name | Type | Description |
---|
text | String | the LATIN1 null terminated string to render. |
fg | Color | the color to render the text in. This becomes colormap index 1. |
Return
Type | Description |
---|
Surface | Surface instance, caller responsible for freeing |
RenderTextShaded
Render the LATIN1 encoded text shaded
method : public : RenderTextShaded(text:String, fg:Color, bg:Color) ~ Surface
Parameters
Name | Type | Description |
---|
text | String | the LATIN1 null terminated string to render. |
fg | Color | the color to render the text in. This becomes colormap index 1. |
bg | Color | the color to render the background box in. This becomes colormap index 0. |
Return
Type | Description |
---|
Surface | Surface instance, caller responsible for freeing |
RenderTextSolid
Render the LATIN1 encoded text blended
method : public : RenderTextSolid(text:String, fg:Color) ~ Surface
Parameters
Name | Type | Description |
---|
text | String | the LATIN1 null terminated string to render. |
fg | Color | the color to render the text in. This becomes colormap index 1. |
Return
Type | Description |
---|
Surface | Surface instance, caller responsible for freeing |
RenderUTF8Blended
Render the UTF8 encoded text blended
method : public : RenderUTF8Blended(text:String, fg:Color) ~ Surface
Parameters
Name | Type | Description |
---|
text | String | the LATIN1 null terminated string to render. |
fg | Color | the color to render the text in. This becomes colormap index 1. |
Return
Type | Description |
---|
Surface | Surface instance, caller responsible for freeing |
RenderUTF8Shaded
Render the UTF8 encoded text shaded
method : public : RenderUTF8Shaded(text:String, fg:Color, bg:Color) ~ Surface
Parameters
Name | Type | Description |
---|
text | String | the LATIN1 null terminated string to render. |
fg | Color | the color to render the text in. This becomes colormap index 1. |
bg | Color | the color to render the background box in. This becomes colormap index 0. |
Return
Type | Description |
---|
Surface | Surface instance, caller responsible for freeing |
RenderUTF8Solid
Render the UTF8 encoded text blended
method : public : RenderUTF8Solid(text:String, fg:Color) ~ Surface
Parameters
Name | Type | Description |
---|
text | String | the LATIN1 null terminated string to render. |
fg | Color | the color to render the text in. This becomes colormap index 1. |
Return
Type | Description |
---|
Surface | Surface instance, caller responsible for freeing |