How can I embed my custom font and it's bold variant (and it's faux italic variant, because there is not real italic version) and get the b and i tags working in a htmlText field?
I can use the htmlText field with system fonts (with b and i tags working) ... or I can use 1 of the embedded fonts for the whole text.
but I can't seem to get flash to understand the bold and italic variants are also embedded.
createTextField("dynamic_txt", 2, 40, 170, 350, 350);
dynamic_txt.embedFonts = true;
var emphatic:TextFormat = new TextFormat();
emphatic.size = 40;
emphatic.color = 0xFFFFFF;
emphatic.font = "EurostileT";
dynamic_txt.html = true;
dynamic_txt.htmlText = "regular\n<b>bold</b>\n<i>italic</i>\n<font color='#FF0000'>red</font>";
Am I missing something?
It seems I should NOT set the "export for actionscript" checkbox. That made the faux italic work
I ditched my bold font (had to uninstall the font completely) and added a faux bold version to the library, that got bold working.
Too bad the h1, h2, etc. tags are not supported, but that is by design apparently.
AND at design time I have to put a dynamic text field with each font on (or next to) the stage and embed the desired characters. putting them in a guide layer doesn't work.
This is kind of a drawback because I now need to include my class, and add the font to the library, and add 4 text fields to the stage. ah well.