Has anyone got a TTF font other than default working in an HTML5 app? My app is crashing as soon as I try to display any text in a loaded TTF.
Let me whip up some example code....
Ok... Please try this:
// Project: ttfTest
// Created: 2016-12-20
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "ttfTest" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
UseNewDefaultFonts( 1 ) // since version 2.0.20 we can use nicer default fonts
LoadFont(1,"K.ttf")
CreateText(1,"Merry Christmas!")
SetTextFont(1,1)
SetTextSize(1,180)
SetTextPosition(1,30,30)
do
Print( ScreenFPS() )
Sync()
loop
Media attached.
AARGH! Sorry for double post. The forums are SO bugged lately. Why does nobody try to fix the problems that get reported in the forum bug thread?