Hi!
I need to load a font by specifying its name. Normally, you would use something like this:
var font:h2d.Font = hxd.Res.fonts.fontname.toFont();
But I need to use a variable (i.e. load the font after compilation). I tried this:
var font:h2d.Font = hxd.Res.loader.load(“fonts/” + “fontname”).toFont();
but I get this error:
hxd.res.Any has no field toFont
Any ideas on how to achieve this?