Invalid unicodeRange in CSS, Flex

一曲冷凌霜 提交于 2019-12-11 17:33:50

问题


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.


回答1:


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;
}


来源:https://stackoverflow.com/questions/25531103/invalid-unicoderange-in-css-flex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!