替代嵌入在AS3字体 [英] Alternative to embedding a font in as3
问题描述
我有一个相当基本的问题,以确保我不缺少明显的东西!
I have quite a basic question to ensure I am not missing something obvious!
有谁知道一种替代嵌入字体的?我开发一个全球性的应用程序,这将改变字体亚洲语言。如果这些字体嵌入这将导致大规模的SWF文件,我想获得的字体,当它从Windows / fonts文件夹亚洲系统上。
Does anyone know of an alternative to embedding fonts? I am developing a global app which will change the font for Asian languages. If these fonts are embedded it will result in a massive SWF file, I would like to get the font, when it goes on the Asian system from the windows/fonts folder.
干杯
推荐答案
您可以通过embeding在外部SWF文件的字体做到这一点。
You can do this by embeding the font in external SWF files.
例如您有:
Arial_EN.swf
Arial_EN.swf
Arial_RU.swf
Arial_RU.swf
Arial_JP.swf
Arial_JP.swf
Arial_DE.swf
Arial_DE.swf
然后在您的配置文件,你定义哪些SWF加载。 当您将SWF
Then in your configuration file you a defining which swf to load. After you load SWF
<!-- english Arial -->
<o n="font">
<o n="path">swf/Arial_DE.swf</o>
<!-- Styles, under which names your fonts are exported while emebeded -->
<o n="style">bold</o>
<o n="style">bold_italic</o>
<o n="style">italic</o>
<o n="style">regular</o>
</o>
加载SWF:
var fontLoader:Loader = new Loader ();
//all the eventlistener and functions for it
fontLoader.load ( xml.font.path )`
在加载的SWF和你的风格名称只是注册的字体,如果你将使用的embedFonts =真实
选项
After you load the swf and you have the style names just register the font, if you will be using embedFonts=true
option
Font.registerFont ( fontLoader.getClass ( xml.font.style ) );
这篇关于替代嵌入在AS3字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!