通过mxmlc构建时不显示嵌入字体

时间:2012-05-01 11:30:47

标签: actionscript-3 flex fonts flash-builder flex4.5

我有一个flex 3项目,我正在尝试将其升级到flex 4.6 sdk。我的应用程序中有许多嵌入字体。通过Eclipse / Flash构建器构建时,这些显示正常。当我使用mxmlc构建时,不使用嵌入字体。我以相同的方式为两者构建字体所以我假设有一些我缺少的编译器选项,或者我有导致问题的那些。我已经尝试了我能想到的每个编译器选项,现在我已经走到了尽头......

<target name="compile" depends="getswcs, compilemodules">

    <echo message="mxmlc=${mxmlc}"/>
    <echo message="flex.lib.dir=${flex.lib.dir}"/>
    <echo message="flex.extlib.dir=${flex.extlib.dir}"/>
    <echo message="flex.locale=${flex.locale}"/>
    <echo message="flex.locale.dir=${flex.locale.dir}"/>

    <exec executable="${mxmlc}" dir="${basedir}" failonerror="true">
        <arg line="'src/${main}'" />
        <arg line="-o 'bin/${component.lowercase.name}.swf'" />
        <arg line="-l+='${flex.lib.dir}'" />
        <arg line="-sp src" />
        <arg line="-accessible" />
        <arg line="-strict" />
        <arg line="-el '${flex.extlib.dir}'" />
        <arg line="-compatibility-version=3.0.0" />
        <arg line="-target-player '11.1'" />  
        <arg line="-include-libraries+=lib" />
        <arg line="-locale ${flex.locale}" />
        <arg line="-l+='${flex.locale.dir}'" />
    </exec>

</target>

compileModules构建我的字体,例如:

<exec executable="${mxmlc}" dir="${basedir}" failonerror="true">
            <arg line="fonts/OCRAEXT.as" />
            <arg line="-static-link-runtime-shared-libraries" />
            <arg line="-o bin/lib/OCRAEXT.swf" />
        </exec>`

as file:

public class OCRAEXT extends Sprite
    {
        [Embed(source='OCRAEXT.TTF', fontName='_OCRAEXT', embedAsCFF='false',
            unicodeRange='U+0030-U+0039,U+002E,U+002F,U+20AC')]
        public static var font:Class;       
    } 

我认为这里没有问题,因为在Eclipse中构建应用程序之前,已经通过我的compileModules构建了字体,字体显示正确。

0 个答案:

没有答案