views:

1863

answers:

2

Hi -

I have an Actionscript project that I was building using Flash CS4. I embedded a font using the follow:

[Embed(source="/bin/assets/fonts/MyriadPro-Regular.otf", fontWeight="normal", fontFamily="Myriad Pro")]

Then throughout my application in my TextFields I would set embedFonts to true antialiastype to advanced and set the thickness property of the text field. And setting the font-family from a stylesheet. This was all working exactly as I expected it would with no issues whatsoever and months of development.

I just upgraded to CS5 and published and none of my text is rendered at all. I was able to resolve this by removing the embedFonts = true from the textfields, but this leaves me with no control over the thickness at all.

I searched everywhere, does anyone know what the proper way to do this in CS5 is now? I've tried embedding my font directly within the CS5 IDE but still no thickness control.

Thanks in advance for any help - I've got tons of textfields throughout my app that are all ganked right now. Thanks Adobe.

b

+2  A: 

I figured out how to do this so it works with CS5. For anyone interested here is what I did to get the fonts to render as they did before the upgrade.

Instead of embedding from the actionscript itself I used the text>embed fonts dialogue within the CS5 IDE. Selected and embedded the characters I wanted, then chose to export this for actionscript and gave it the name 'MyriadPro' camel-cased.

Next within my actionscript classes I used Font.registerFont(MyriadPro) to register the font there.

Within the css stylesheet the font-family reference is the camel case name, but with a space between. - So in this instance it's font-family:"Myriad Pro"

I'm now able to embedFonts and use thickness and all other settings as expected.

I hope this helps others who might run into this -

b

WillyCornbread
i am new and currently having the problem of the dynamic textfields having inaccurate values. do you have a tutorial on how about doing it? Please help. Thanks!
JCX
A: 

There's a problem with this. You cannot include certain special characters into the "Also include these characters" box. (ie: the Unicode ranges U+2018-U+2027). When you paste into that field, Flash does not increment the estimated glyphs.

Tegeril
Ignore this. It doesn't increment the count, but it does embed the characters.
Tegeril