【问题标题】:Hindi Font not coming properly in some client computers某些客户端计算机中的印地语字体无法正常显示
【发布时间】:2016-01-18 23:03:11
【问题描述】:

我们开发了具有印地语和英语选项的 Adob​​e air 应用程序。对于翻译,我们使用 microsoft office Hindi Pack 并使用屏幕键盘以印地语书写。我们在应用程序中使用了 Arial 字体。

在某些客户端计算机中,当语言更改为印地语时,我们会看到方框代替文字。客户端计算机有可用的 Arial 字体。

我们已准备好在我们的应用程序中嵌入正确的 TTF 文件,但我们不确定成功的机器正在使用哪个字体文件,因为我们没有安装任何特殊字体。请帮忙。

== 更新===

发现有一个选项可以嵌入系统应用程序编译的字体。为此,我使用了以下代码,但它不起作用:

[Embed(systemFont="arial", fontName="myArial",
                    mimeType="application/x-font", advancedAntiAliasing="true")]
        protected var fontClass:Class;

然后在css文件中添加

global
{
     font-family: "myArial";
}

但我遇到了错误:

    Description Resource    Path    Location    Type
exception `during transcoding: Cannot embed local font 'arial' as CFF. The CSS @font-face 'local()' syntax is not supported. Please specify a path directly to a font file using the 'url()' syntax. For [Embed] syntax the 'systemFont' attribute is not supported. Please specify a path directly to a font file using the 'source'` attribute.   HondaLMS.mxml   /HondaLMS/src   line 81 Flex Problem

Description Resource    Path    Location    Type
unable to build font 'myArial'  HondaLMS.mxml   /HondaLMS/src   line 81 Flex Problem

【问题讨论】:

    标签: actionscript-3 apache-flex fonts flex4.5


    【解决方案1】:

    我相信系统字体名称是“Arial”,而不是“arial”(它们区分大小写)。

    如果不起作用,请尝试将其嵌入到 css 中:

    @font-face 
    {
       src: local("Arial");
       fontFamily: "myArial";
       unicodeRange: U+0020-00FF; // change the range for your desired english and hindi characters, numbers and punctuation, otherwise you would embed ALL characters including cyrillic, chinese, arabic and whatnot and it would become  huge
    }
    
    global
    {
       font-family: "myArial";
    }
    

    如果它不能与字体名称引用一起使用,只需将 Arial 字体复制到您的项目目录中并使用相对路径嵌入它:

    @font-face 
    {
       src: url("../assets/Arial.ttf");
       fontFamily: "myArial";
       unicodeRange: U+0020-00FF; // change the range for your desired english and hindi characters, numbers and punctuation, otherwise you would embed ALL characters including cyrillic, chinese, arabic and whatnot and it would become  huge
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-04-02
      • 2015-12-06
      • 1970-01-01
      • 2023-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多