Hi,
I am struggling to set the textformat of a textfield to the correct font. I am loading in a swf with a specific font type and different styles all in their own font class.
Using Font.enumerateFonts(false) I can itterate through the array of available fonts and find the wanted font:
But how can I assign this font to the TextFormat?Code:for(var i:Int= 0; i < embeddedFonts.length; i++){ var item:Font = embeddedFonts[i]; if(fc.sname == item.fontName && style == item.fontStyle){ font=item; } }
All examples I found use something like:
fmt.font = font.fontName;
But this does not apply the wanted style to the Textformat.
What is the correct way of doing this?
Thanks,
Raoul


Reply With Quote