(AGK version: 108.13)
Submitted: 2013-06-23 05:50:02
//NOTE: For this example to work you will need to copy 'custom.png' and 'custom subimages.txt'
//to the media folder at the location where you are running this example.
//Both files can be found in [our AGK Install Directory]/Projects/Basic/Examples/Text/CustomText/media/

Setvirtualresolution(640,480)
ResetTimer()

//Check for required custom font files in media folder
fileok=GetFileExists("custom.png")
fileok=fileok+GetFileExists("custom subimages.txt")
If fileok<>2
    Repeat
        Print ("Both 'custom.png' and 'custom subimages.txt'")
        Print ("need to be in your media folder")
        Sync()
    Until Timer()>5
EndIF

If fileok=2
    //Override The Default Font
    fontimage = LoadImage ("custom.png")
    SetTextDefaultFontImage (fontimage)

    CreateText(1,"Example Default Font")
    SetTextSize(1,25)
    SetTextPosition(1,10,50)
    Sync()

    Repeat
    Until Timer()>15
EndIf
End
Help make AGK better by submitting an example for this command!
(All examples are subject to approval)
Login to post an example of your own.