包括的要求有哪些方式可以用于创建FLAS与动态创建的文本,其输出与主权财富基金只字体字形? [英] What methods are there for creating FLAs with dynamically created text, that outputs swfs with only the font glyphs included that are required?
问题描述
当我创建一个FLA静态文本字段只包括那些在文本字段的字形。这是需要的行为,但我想创建XML的文本字段。
When I create an FLA with static text fields it only includes the glyphs that are in the text fields. This is the behaviour required, but I want to create those text fields from XML.
我希望能够创建动态文本字段的FLA,这样我可以使用配置(XML)文件填充它们,然后输出类似静态文本字段的FLA - 让我用尽可能少的字形尽可能
I want to be able to create an FLA with dynamic text fields so that I can populate them using a config ( XML ) file, and then the output is like an FLA with static text fields - so that I use as few glyphs as possible.
这可能吗?
我想我可以写一个.jsfl脚本读取XML文件,以做出一个模板FLA文件这项工作?
I suppose I could write a .jsfl script to read an XML file to make this work on a template FLA file?
任何其他的方法?
推荐答案
您可以使用中嵌入
语句中,你可以定义一个单code嵌入字体范围。
You could embed the font using the embed
statement in which you can define a unicode range.
例如:
[Embed(source="../someFont.ttf",
fontName = "myFont",
fontWeight="normal",
fontStyle="normal",
unicodeRange="U+0030-0039,U+002E",
embedAsCFF="false")]
private var myEmbeddedFont:Class;
(请注意,您可以通过它们用逗号分隔嵌入多个统一code范围/单个字符。)
(Note that you can embed multiple Unicode ranges / single characters by separating them with a comma.)
(源)
您也可以使用<一个href="http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f5f.html#WS02f7d8d4857b16776fadeef71269f135e73-8000"相对=nofollow> fontswf工具这是一个命令行实用程序生成带有嵌入字体的SWF。您可以定义字符范围在这里。
You could also use the fontswf utility which is a command-line utility which generates an swf with an embedded font. You can define character ranges here as well.
这篇关于包括的要求有哪些方式可以用于创建FLAS与动态创建的文本,其输出与主权财富基金只字体字形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!