1

Here is my issue : I have a dynamic html text field, to which i passed html text / textformat such as :

<P ALIGN="LEFT"><FONT FACE="Trebuchet MS" SIZE="14" COLOR="#000000" LETTERSPACING="0" KERNING="0">Some text<B>some bold text</B><I><U>and some italic underline</U></I></FONT></P>

My problem is, i can't use embedfonts because if i do, and use Trebuchet MS for instance, the bold tag will never render as in flash you have to select if the font your embed is bold or not. I'm trying to avoid to convert the whole htmltext/textformat thing to a CSS one..

Any ideas?

Eric
  • 9,870
  • 14
  • 66
  • 102
  • Maybe i should add that that piece of "html" text is generated from a text editor i coded in AS3 using the textformat class. But to use embed fonts i need to go CSS in flash. I'm just looking for the best way to convert this kind of html data to a CSS. – Eric Dec 02 '11 at 21:33

1 Answers1

0

You need to make sure all versions of the font (regular, bold, italic, whatever) have been compiled into the SWF.

An easy way to do this is to create some dynamic TextFields (one for each version of the font you want to embed) and place them on stage somewhere out of sight at the start of your movie (for example on the root timeline, frame 1, at x = -100). Make sure they appear in your movie before you display the rest of your text, and make sure you embed the relevant character ranges.

This forces Flash to compile all versions of the font, not just the version you happen to have in your actual TextField you want to display.

Jed Richards
  • 12,244
  • 3
  • 24
  • 35
  • I don't think you understand the issue but thanks for trying anyway. The issue is – Eric Dec 02 '11 at 16:47
  • I understand the issue perfectly. And my answer exactly fixes your precise problem :) You need to make sure all versions/weights of Trebuchet MS are embedded in your SWF. Once they are you can keep `FACE="Trebuchet MS"` as is in your HTML and then whenever you use a `` tag Flash will be smart enough to use the bold version of the font. I've used this exact approach countless times in every Flash project I've done for the past 10 years. Apologies for necromancy! – Jed Richards Sep 19 '12 at 09:27