开发者

Flash CS5 screwed up all my textfields - how can I correct this?

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


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


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.


This tutorial and explanation is the best I have found about how to embed fonts (the new way) is Flash CS5. It really is different from CS4 and previous versions.

Having trouble with embedded fonts and HTML text in Flash CS5?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜