我在我的应用程序中使用Unicode
for(var i:int=0;i<16;i++) {
for(var j:int=0;j<16;j++) {
button = new Button();
button.x = j*35+10;
button.y = i*20+10;
button.height = 21;
button.width = 35;
button.setStyle("borderColor","red");
button.setStyle(" fontWeight","bold");
button.label= String.fromCharCode(0x2190+16*i+j);
button.addEventListener(MouseEvent.CLICK,greekalpha_clickHandler);
vgr.addElement(button);
}
}
但是当我运行这段代码时,一些符号可以正确识别,而其他符号则无法正确识别
高亮的单词可以正确识别,而其他单词则不能识别。我在这段代码中犯了什么错误?
发布于 2014-01-03 03:02:55
(我只是重新发布明显的答案,将这个问题从未回答列表中删除。评论中的原始回答者非常欢迎张贴。根据我自己的经验,我也知道给定的答案应该是有效的。)
为了确保Unicode符号正确显示,您需要嵌入Unicode字体,如Arial Unicode MS或Lucida Sans Unicode,并将文本对象设置为该字体(不会自动发生)。
然后,打开消除锯齿,通过advancedAntiAliasing = true;
或通过将Flash Professional中的消除锯齿属性设置为“消除锯齿以提高可读性”。
除此之外的任何问题,我想,都是特定于设备的。
https://stackoverflow.com/questions/14997790
复制相似问题