Italic and Bold fonts don't work if loaded dynamically
Hi,
Until now, I was using embedded fonts, and sucessfully used the <b> and <i> html tags. Indeed, while embedding the fonts, I was able to set the font style, while still using the same font name. Like this:
[Embed(source="../EmbeddedAssets/BKANT.ttf", fontName="Book Antiqua", mimeType="application/x-font-truetype", embedAsCFF="false")]
public var Font1:Class;
[Embed(source="../EmbeddedAssets/ANTQUAB.ttf", fontName="Book Antiqua", fontWeight = "bold", mimeType="application/x-font-truetype", embedAsCFF="false")]
public var Font2:Class;
[Embed(source="../EmbeddedAssets/ANTQUABI.ttf", fontName="Book Antiqua", fontStyle = "italic", mimeType="application/x-font-truetype", embedAsCFF="false")]
public var Font3:Class;
But now I need to load those fonts dynamically instead. The fonts are embedded in a SWF file. I can get their class and register them successfully, but when I enumerate them, I get:
Book Antiqua
Book Antiqua Bold
Book Antiqua Italic
As you can see, when loaded dynamically, each font has its own unique name, so the regular <b> or <i> html tags don't work any longer. I could specify the exact font face in the html code, like "<font face='Book Antiqua Bold'>" (and it works), but I'd rather use the standard <i> or <b> tags for versatilty. Is there a way to fix this and be able to use those tags with a dynamically loaded font?
Thank you!
