1

我正在创建一个 flex 移动项目,其中包含一个包含阿拉伯语数据的列表。列表上的数据没有出现,有没有办法在列表上显示阿拉伯文本??我试图改变字体,但我也没有工作......

<?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>
4

1 回答 1

0

我已经解决了这个问题,通过在 List/spinnerList 中添加 itemRenderer,它可以在 Galaxy Tab II 上正确呈现阿拉伯文本(仅 Tohama 字体)

<s:itemRenderer>
    <fx:Component>
        <s:ItemRenderer >
            <s:Label text="{label}" right="10" paddingTop="5" paddingBottom="5" fontSize="24" />
        </s:ItemRenderer>
    </fx:Component>
</s:itemRenderer>
于 2012-10-13T08:54:06.543 回答