Question

i am creating a flex mobile project contains a list having a data in Arabic language. the data on list not appearing , is there is anyway to display the Arabic text on the list?? i tried to change the font but i didn't work also...

<?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>
Was it helpful?

Solution

I have turned arround this issue, through adding itemRenderer inside List/spinnerList, it renders the Arabic text (only Tohama font) properly on 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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top