Font
TrueType font rendering
Operations
- New
- Init
- IsNull
- Quit
- RenderTextBlended
- RenderTextShaded
- RenderTextSolid
- RenderUTF8Blended
- RenderUTF8Shaded
- RenderUTF8Solid
IsNull
Determines if the underlying SDL C-struct is NULL
method : public : IsNull() ~ BoolReturn
| Type | Description |
|---|---|
| Bool | true if NULL, false otherwise |
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 |
New
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. |
RenderTextBlended
Render the LATIN1 encoded text blended
method : public : RenderTextBlended(text:String, fg:Color) ~ SurfaceParameters
| 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) ~ SurfaceParameters
| 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) ~ SurfaceParameters
| 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) ~ SurfaceParameters
| 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) ~ SurfaceParameters
| 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) ~ SurfaceParameters
| 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 |