2012-10-05 13 views
1

我正在创建一个flex移动项目,其中包含具有阿拉伯语言数据的列表。 列表上的数据没有出现,是否有无论如何显示列表上的阿拉伯文字?我试图改变字体,但我也没工作...在Adobe Flex移动项目中未显示列表中的Unicode字符

<?xml version="1.0" encoding="utf-8"?> 
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
      xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView"> 
     <fx:Declarations> 


     </fx:Declarations> 

     <fx:Script> 
      <![CDATA[ 

       import mx.effects.easing.*; 

      ]]> 
     </fx:Script> 
      <fx:Style> 
     @namespace s "library://ns.adobe.com/flex/spark"; 

     @font-face { 
      src: url("fonts/TAHOMA.TTF"); 
      fontFamily: myArial; 
      embedAsCFF: false; 
      fontWeight: normal; 
      advancedAntiAliasing: true; 
      unicodeRange: 
       U+00A0-U+00FF, 
       U+0020-U+003E, 
       U+0152-U+0178, 
       U+2002-U+20AC, 
       U+0192-U+0390, 
       U+0391-U+03D6, 
       U+2022-U+2044, 
       U+2118-U+2135, 
       U+2190-U+21D4, 
       U+2200-U+22C5, 
       U+2308-U+232A, 
       U+25CA-U+2666, 
       U+00A1-U+00FF, 
       U+2000-U+206F, 
       U+20A0-U+20CF, 
       U+2100-U+2183, 
       U+0020-U+007E, 
       U+00B2-U+00B9,/* SUPERSCRIPT*/ 
       U+2070-U+2089,/* SUBSCRIPT*/ 
       U+0600-U+06FF,/* Arabic */ 
       U+FB50-U+FDFF,/* Arabic */ 
       U+FE70-U+FEFF;/* Arabic */ 
     }  

     @font-face { 
      src: url("fonts/TAHOMA.TTF"); 
      fontFamily: myArial2; 
      fontWeight: normal; 
      embedAsCFF: true; 
      advancedAntiAliasing: true; 

      unicodeRange: 
       U+00A0-U+00FF, 
       U+0020-U+003E, 
       U+0152-U+0178, 
       U+2002-U+20AC, 
       U+0192-U+0390, 
       U+0391-U+03D6, 
       U+2022-U+2044, 
       U+2118-U+2135, 
       U+2190-U+21D4, 
       U+2200-U+22C5, 
       U+2308-U+232A, 
       U+25CA-U+2666, 
       U+00A1-U+00FF, 
       U+2000-U+206F, 
       U+20A0-U+20CF, 
       U+2100-U+2183, 
       U+0020-U+007E, 
       U+00B2-U+00B9,/* SUPERSCRIPT*/ 
       U+2070-U+2089,/* SUBSCRIPT*/ 
       U+0600-U+06FF,/* Arabic */ 
       U+FB50-U+FDFF,/* Arabic */ 
       U+FE70-U+FEFF;/* Arabic */ 
     } 



     .MyEmbeddedFont { 
      fontFamily: myArial2; 
      font-size: 30px; 
      color: #eeafaf; 
     } 


    </fx:Style> 






    <s:Button x="33" y="226" label="ماجد" skinClass="spark.skins.mobile.ButtonSkin" styleName="MyEmbeddedFont" /> 
    <s:Label x="67" y="347" text="على" styleName="MyEmbeddedFont"/> 
    <s:List id="test" x="146" y="79" width="324" height="305" fontWeight="normal" styleName="MyEmbeddedFont"> 

<s:dataProvider > 
      <s:ArrayCollection id="arrr"> 
       <fx:String>ماجد</fx:String> 
       <fx:String>على</fx:String> 
      </s:ArrayCollection>  
</s:dataProvider> 

    </s:List> 

</s:View> 
+0

你能否提供更多的代码来显示一些列表? – QuasarDonkey

+0

我修改了上面的代码以包含列表。 – kingisking77

回答

0

我已经把角落找寻这个问题,通过增加的itemRenderer列表/ spinnerList里面,它呈现了阿拉伯文字(只有菌Tohama字体)正确的Galaxy Tab II

<s:itemRenderer> 
    <fx:Component> 
     <s:ItemRenderer > 
      <s:Label text="{label}" right="10" paddingTop="5" paddingBottom="5" fontSize="24" /> 
     </s:ItemRenderer> 
    </fx:Component> 
</s:itemRenderer> 
+0

阿拉伯语文本很好的与itemrenderer很好地感谢,但列表分隔符不见了,有一个干净的方式来显示分隔符或构建一个自定义的。 – kingisking77