Actionscript 3 印地语字体在某些客户端计算机中无法正常使用
我们开发了AdobeAIR应用程序,可以选择印地语和英语。对于翻译,我们使用MicrosoftOfficeHindi软件包,并使用屏幕键盘以印地语书写。我们在应用程序中使用了Arial字体 在一些客户端计算机中,当语言改为印地语时,我们会看到方框代替单词。客户端计算机具有可用的Arial字体 我们已经准备好在我们的应用程序中嵌入正确的TTF文件,但是我们不确定成功的机器正在使用哪个字体文件,因为我们没有安装任何特殊的字体。请帮忙 ==更新=== 发现有一个选项可以嵌入编译系统应用程序的字体。为此,我使用了以下代码,但它不起作用:Actionscript 3 印地语字体在某些客户端计算机中无法正常使用,actionscript-3,apache-flex,fonts,flex4.5,Actionscript 3,Apache Flex,Fonts,Flex4.5,我们开发了AdobeAIR应用程序,可以选择印地语和英语。对于翻译,我们使用MicrosoftOfficeHindi软件包,并使用屏幕键盘以印地语书写。我们在应用程序中使用了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
及
我相信systemFont名称是“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
}
@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
}