Text2D_SetFontType - MalisPierre/ModularGame GitHub Wiki

void Text2D.SetFontType(Font NewFont)


Description:

SetFontType change the Font of the Text2D.


Parameters:

  • Font NewFont: The New Font to display the text in.

Returns:

  • Void

Code Example:

function ChangeTextFont()
        NewFont = Framework.GetAssetManager().GetFont("ContentName:BundleName:Fonts/FontName")
	MyText= Framework.UserInterface_2D.FindPanel("LoadMenu").FindText("MyText")
	MyText.SetFont(NewFont)
end