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

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

问题描述

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

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:

-无效的 Unicode 范围005A"

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

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

unicodeRange: U+0020-007E;

错误是这样的:-无效的 Unicode 范围 '007E'

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

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

任何想法可能是错误的?我已经阅读了 Adob​​e 的文档,但不知道还能做什么.

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

推荐答案

这里有一个 CSS 文件作为示例 - 它非常适合我在 iOS/Android 纸牌游戏应用程序中使用(我需要纸牌套装和西里尔字符):

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天全站免登陆