让Minimal开源UI组件支持中文

Hot:

Minimal是一款轻量级的UI组件,最新版本0.99

在线预览:http://www.minimalcomps.com/

项目地址:http://code.google.com/p/minimalcomps/

 

大家都说不支持中文,貌似他采用的是嵌入英文字体,

而embedFonts = true;所以输入中文无法显示。

 

按照下面方式修改即可:

Component.as
去掉
[Embed(source="/assets/pf_ronda_seven.ttf", fontName="PF Ronda Seven", mimeType="application/x-font")]
private var Ronda:Class;

Text.as/InputText.as/Label.as
去掉
_tf.embedFonts = true;
更改
_tf.defaultTextFormat = new TextFormat(“PF Ronda Seven”, 8, Style.LABEL_TEXT);

_tf.defaultTextFormat = new TextFormat(“Arial”, 12, Style.LABEL_TEXT);

 

没事用它弄了个扫雷玩玩(右键标记雷点)。



One Response to “让Minimal开源UI组件支持中文”

  1. panhezeng Says:
    March 26th, 2010 at 12:05

    大哥,你的网站http://www.deepin3000.com在chrome下面打开,竟然提示Warning: Visiting this site may harm your computer!应该是被挂马了。你检查一下。

    [Reply]


Copyright © 2009-2012 Ase7en.com All Rights Reserved
粤ICP备09071940号