SetItalics

int italicsAngle );

Sets the italics angle of the text.

The italics angle is in degrees. The commonly used italics angle is 12. You can set the angle to zero if you don't wish to print text with italics anymore.

The default italics angle is zero.

Note that changing the italics is rather slow as the font data in the graphics card has to be refreshed. If you need to render both italic and non-italic text with a TextRenderer, it's best to make a copy of the TextRenderer.

Examples

TextRenderer renderer( ... );

// Set the italics angle of the text to 12 (the commonly used angle) //
renderer.SetItalics12 );

// To not to render italics text anymore you can set the italics angle to 0 //
renderer.SetItalics0 );


Other functions of the class TextRenderer
Load
Load the font
Print
Prints the given text to the screen
SetColor
Sets the color of the font
GetColor
Returns the text color of the font
SetItalics
Sets the italics angle of the text
GetItalics
Returns the italics angle of the text
Width
Returns the width of the given text
Height
Returns the height of the given text
FirstLineWidth
Returns the width of the first text line of the given text
FirstLineHeight
Returns the height of the first text line of the given text
IsValid
Checks if the TextRenderer was loaded correctly

Advanced functions

GetFace
SendToGPU
UnloadFromGPU
UseAutoDelete


Questions about SetItalics? Click here.