package game.ui.text; import openfl.text.TextFormat; import openfl.Assets; import assets.Fonts; class TextFormats{ public static var formats:TextFormats; public var cInputFmt:TextFormat; public var cOutputFmt:TextFormat; public function new(){ var font = Assets.getFont("fonts/Terminus.ttf"); cInputFmt = new TextFormat(Assets.getFont("fonts/Terminus.ttf").fontName, 24, 0xffffff); cOutputFmt = new TextFormat(Assets.getFont("fonts/Terminus.ttf").fontName, 24, 0xffffff); trace('font: ${font}'); trace('fontName: ${font.fontName}'); trace('fontStyle: ${font.fontStyle}'); trace('fontType: ${font.fontType}'); trace('fontGlyphs: ${font.getGlyphs()}'); trace(cInputFmt.font); trace(cOutputFmt.font); } public static function getFormats():TextFormats { if(formats == null){ formats = new TextFormats(); } return formats; } }