I embedded font using Flash Professional CS5, but I still can't use it in my AS code. How should I embed the font to be able to use it in AS3 as well in Flash Professional CS5?
相关问题
- garbage collection best practices
- Should I wait for Flash Player 10.1 or go with Fla
- How to load flex swf from flash?
- FlashDevelop Haxe (Flash) debugger
- Detecting user's camera settings
相关文章
- embed 循环播放MP3文件(loop="2"变成无限循环)
- How to dynamically add wmode=transparent to Youtub
- Are there any benefits when using final in AS3?
- Trace on Chrome/Browser console
- as3 ByteArray to Hex (binary hex representation)
- getElementById not working in Google Chrome extens
- getElementById not working in Google Chrome extens
- Libraries for text animation in Flex / Actionscrip
Embed the font inside your fonts.fla file. http://www.adobe.com/devnet/flash/quickstart/embedding_fonts.html
Export fonts.fla to the SWC library. ( under export settings check the SWC box in Flash CS5 )
Then you should be able to see it:
I do something slightly more different. :D embedAsCFF should be false if you wish to use old TextFields or true of you use the new text engine.
Then you can use something like
You will need to make sure the
name
static constant is identical to thefontFamily
within the font. They are all given the same name so they all act as 1 font, the textfield will pick the correct style to use if the textfield is set to bold or italic or bold and italic or just plain old regular.I would then make a different class for different font "sets"