问题
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