在CSS,Flex中,unicodeRange无效 [英] Invalid unicodeRange in CSS, Flex

查看:210
本文介绍了在CSS,Flex中,unicodeRange无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难通过减小字体的Unicode范围来限制应用程序的大小。



我已经尝试了几种不同的组合,无论我放在哪里,错误都是一样的:

Unicode范围'005A'无效



其中005A可以是任何东西,如果我这样做:

  unicodeRange:U + 0020-007E; 

错误是: - Unicode范围'007E' p>

我尝试了不同的字体,Arial,Helvetica,Century ...在每个人都有同样的错误,所有unicode范围都会在CSS文件中抛出错误。
$ b

任何想法可能是错误的?我已经阅读了Adobe的文档,不知道该怎么办。

解决方案

在iOS / Android卡牌游戏的应用程序(我需要卡西装和西里尔文字符)中适用于我:

  @namespace s 图书馆://ns.adobe.com/flex/spark; 
@namespace mxlibrary://ns.adobe.com/flex/mx;

@ font-face {
src:url(/ assets / fonts / arial.ttf);
fontFamily:embFont;
embedAsCFF:false; / *需要StyleableTextField * /
unicodeRange:
U + 0020-U + 0040,/ *标点符号,数字* /
U + 2660-U + 2666,/ * Card适合* /
U + 0041-U + 005A,/ *大写AZ * /
U + 0061-U + 007A,/ *小写az * /
U + 0410-U + 0451; / * Cyrillic * /
}

s | LabelItemRenderer {
fontFamily:embFont;
}


I'm having a hard time trying to limit the size of the app by reducing the unicode range of my fonts.

I've tried several different combinations, the error is the same no matter what range I put there:

-invalid Unicode range '005A'

Where 005A can be anything, if I do this:

unicodeRange: U+0020-007E;

The error is this: -invalid Unicode range '007E'

I've tried different fonts, Arial, Helvetica, Century... Same error in everyone, all the unicode ranges throw errors in the CSS file.

Any ideas what could be wrong? I've read the documentation from Adobe, not sure what else to do.

解决方案

Here is a CSS file as example - it works well for me in an iOS/Android card game app (where I need card suits and cyrillic characters):

@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";

@font-face { 
    src: url("/assets/fonts/arial.ttf"); 
    fontFamily: embFont;
    embedAsCFF: false; /* required for StyleableTextField */
    unicodeRange:
        U+0020-U+0040, /* Punctuation, Numbers */
        U+2660-U+2666, /* Card suits */
        U+0041-U+005A, /* Upper-Case A-Z */
        U+0061-U+007A, /* Lower-Case a-z */
        U+0410-U+0451; /* Cyrillic */   
}

s|LabelItemRenderer {
    fontFamily: embFont;
}

这篇关于在CSS,Flex中,unicodeRange无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆