Hope everyone’s well, just a quick question. I’m loading external font swf’s, when using the textFormat class, the fonts come through perfectly and I am able to style them as I need. However I would like in time to move over to an external stylesheet, mainly because I would like to use both methods depending on the type of projects im doing at the time.
When I try to use the stylesheet and call the font that is needed nothing comes through, I have done a trace on the fontClass and get undefined for the fontName, fontStyle and fontType. I am only using a simple example at the moment as below
var _stylesheet : StyleSheet = new StyleSheet(); _stylesheet = CSSFile.getStyleSheet( "defaultCSS" ); var t : TextField = new TextField(); t.htmlText = "<h1>Test</h1>" t.embedFonts = true; t.styleSheet = _stylesheet; addChild( t )
I know the stylesheet is working because I can manipulate the colour and size when embed fonts is not on the textfield. But im unable to use the desired externally loaded font…
Anyone have any ideas why?