Korean text not displayed in spark Label

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Korean text not displayed in spark Label

FlexForever
I just submitted a bug:
https://issues.apache.org/jira/browse/FLEX-33973

This is quite a big issue for my Apps as one of my main market is Korea. As I mentioned in the bug description, I only found a workaround for Nexus 4.3/4.4 devices but not for Samsung devices.

I cannot embed the Korean Font because it would blow up the size above the Android 50MB limit.

So any pointers on how to solve this issue would be appreciated.

Thanks!!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Korean text not displayed in spark Label

Alex Harui
Can Native apps display Korean on those devices?  If so, what font do they
use?

On 12/2/13 10:06 PM, "FlexForever" <[hidden email]> wrote:

>I just submitted a bug:
>https://issues.apache.org/jira/browse/FLEX-33973
>
>This is quite a big issue for my Apps as one of my main market is Korea.
>As
>I mentioned in the bug description, I only found a workaround for Nexus
>4.3/4.4 devices but not for Samsung devices.
>
>I cannot embed the Korean Font because it would blow up the size above the
>Android 50MB limit.
>
>So any pointers on how to solve this issue would be appreciated.
>
>Thanks!!
>
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Korean-text-not-displayed-i
>n-spark-Label-tp4053.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Korean text not displayed in spark Label

FlexForever
Yes, native apps can use these fonts. I am not sure what exact font names. Seems that Nexus devices use NanumGothic but for Samsung, this fontFamily doesnt work.

I have only problems with Korean. All other languages like Japanes, Chinese etc. work.

The strange thing is that if you put Korean text in a Button it works, but the same text in a Label does not.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Korean text not displayed in spark Label

Alex Harui
Are you using Spark or MX Buttons and Labels?

On 12/3/13 1:13 AM, "FlexForever" <[hidden email]> wrote:

>Yes, native apps can use these fonts. I am not sure what exact font names.
>Seems that Nexus devices use NanumGothic but for Samsung, this fontFamily
>doesnt work.
>
>I have only problems with Korean. All other languages like Japanes,
>Chinese
>etc. work.
>
>The strange thing is that if you put Korean text in a Button it works, but
>the same text in a Label does not.
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Korean-text-not-displayed-i
>n-spark-Label-tp4053p4055.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Korean text not displayed in spark Label

FlexForever
I am on mobile so I use Spark Label. The error is easy to reproduce:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" backgroundColor="white" xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="160"> 
<s:Label text="고속도로" /> 
</s:Application> 

On Android 4.3 and 4.4 Korean font is not displayed. You only see squares. All other languages I tested work (e.g. Chinese etc.). Korean font is installed on the device by Android default but somehow not picked up by Air.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Korean text not displayed in spark Label

Alex Harui
Without any other CSS specified like fontFamily, I think the application
will choose Arial (or maybe Verdana).

-Alex

On 12/8/13 2:48 AM, "FlexForever" <[hidden email]> wrote:

>I am on mobile so I use Spark Label. The error is easy to reproduce:
>
><?xml version="1.0" encoding="utf-8"?>
><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>backgroundColor="white" xmlns:s="library://ns.adobe.com/flex/spark"
>applicationDPI="160">
><s:Label text="고속도로" />
></s:Application>
>
>On Android 4.3 and 4.4 Korean font is not displayed. You only see squares.
>All other languages I tested work (e.g. Chinese etc.). Korean font is
>installed on the device by Android default but somehow not picked up by
>Air.
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Korean-text-not-displayed-i
>n-spark-Label-tp4053p4118.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Korean text not displayed in spark Label

FlexForever
I am having the problem on Android. As far as I know Arial is not a standard font on Android.

As I mentioned before, I do have the problems only with Korean and other fonts are working fine (even exotic ones like Thai and Hindi).

It also worked well prior to Android 4.3. As far as I know Google changed the Korean font in 4.3., so for me it looks like a wrong underlying font mapping to the new Android Korean system font in Flex / Air for the spark label.

Unfortunately I am a beginner coder so I do not really know how to dig into this issue.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Korean text not displayed in spark Label

Miguel Ferreira
did you check if the font have the code to present korean?
Normally to present korean or chinese you have to be sure that you have in the font that.
Make tests because maybe if there is another component they can pick up one font that have this character codes

> Date: Tue, 10 Dec 2013 05:45:27 -0800
> From: [hidden email]
> To: [hidden email]
> Subject: Re: Korean text not displayed in spark Label
>
> I am having the problem on Android. As far as I know Arial is not a standard
> font on Android.
>
> As I mentioned before, I do have the problems only with Korean and other
> fonts are working fine (even exotic ones like Thai and Hindi).
>
> It also worked well prior to Android 4.3. As far as I know Google changed
> the Korean font in 4.3., so for me it looks like a wrong underlying font
> mapping to the new Android Korean system font in Flex / Air for the spark
> label.
>
> Unfortunately I am a beginner coder so I do not really know how to dig into
> this issue.
>
>
>
> --
> View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Korean-text-not-displayed-in-spark-Label-tp4053p4146.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
     
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Korean text not displayed in spark Label

FlexForever
Most components (e.g. Spark Buttons, text area, Lists etc.) display Korean correctly!

So far I have ONLY problems with Spark Label and Spark ToggleSwitch. All other components seem to display Korean correctly.

Also please note that the error occurs only when installed on the device.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Korean text not displayed in spark Label

Alex Harui
Let's see if we can solve Label first.  I just realized that Label is
probably still using the FTE text engine but Buttons and List are not.
There might be an issue with the way AIR chooses fonts for FTE.

Try setting fontFamily on the Label to the name of the korean font.

-Alex

On 12/10/13 6:07 AM, "FlexForever" <[hidden email]> wrote:

>Most components (e.g. Spark Buttons, text area, Lists etc.) display Korean
>correctly!
>
>So far I have ONLY problems with Spark Label and Spark ToggleSwitch. All
>other components seem to display Korean correctly.
>
>Also please note that the error occurs only when installed on the device.
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Korean-text-not-displayed-i
>n-spark-Label-tp4053p4148.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Korean text not displayed in spark Label

FlexForever
I could partially fix the issue with fontFamily="NamunGothic" on Android 4.3 for Nexus devices but it seems not to work on Samsung devices. So it not really helps me.
I agree that Label should use the same text engine as Buttons etc.
Thank you for fixing this.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Korean text not displayed in spark Label

Alex Harui
Are you sure NamunGothic is installed on the Samsung devices?  Try using
flash.text.Font.enumerateFonts(true) to see what fonts are available.

Another thing to try would be to use
spark.components.supportClasses.StyleableTextField instead of Label.

-Alex

On 12/10/13 8:17 PM, "FlexForever" <[hidden email]> wrote:

>I could partially fix the issue with fontFamily="NamunGothic" on Android
>4.3
>for Nexus devices but it seems not to work on Samsung devices. So it not
>really helps me.
>I agree that Label should use the same text engine as Buttons etc.
>Thank you for fixing this.
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Korean-text-not-displayed-i
>n-spark-Label-tp4053p4161.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Korean text not displayed in spark Label

FlexForever
I did some comprehensive testing on various Android Versions regarding Asian/Arabic Fonts.
It seems that less and less fonts are displayed correctly towards the newer Android Versions. I made tests for spark label, textarea and button. You can see the results here:



I marked with green and red, correct and wrong display of the text. The problem with Arabic is the text direction.

Below is the code used. Compiled with Flex 4.11 and Air 3.9. I played around with a few other SDK versions but basically with same result.

I think this needs urgent attention, especially as more and more updates for Android 4.3 and 4.4 will come out soon.

I will post the same at the Adobe Air forums.


<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                           xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="160" xmlns:local="*">
        <s:VGroup width="100%" height="100%" paddingTop="20" paddingRight="20" paddingLeft="20">
                <s:Scroller height="100%" width="100%">
                        <s:VGroup width="100%" height="100%">
                                <s:Label width="100%" text="KOREAN" />
                                <s:TextArea  text="1 남자와 소년 남자와 소년" skinClass="spark.skins.mobile.TextAreaSkin" />
                                <s:Label text="2 남자와 소년 남자와 소년" />
                                <s:Button label="3 남자와 소년 남자와 소년" />
                               
                                <s:Label width="100%" text="JAPANESE" />
                                <s:TextArea  text="1 がアップデート後、文字が" skinClass="spark.skins.mobile.TextAreaSkin" />
                                <s:Label text="2 がアップデート後、文字が" />
                                <s:Button label="3 がアップデート後、文字が" />
                               
                                <s:Label width="100%" text="CHINESE" />
                                <s:TextArea  text="1 轉換為繁體字后會變成錯" skinClass="spark.skins.mobile.TextAreaSkin" />
                                <s:Label text="2 轉換為繁體字后會變成錯" />
                                <s:Button label="3 轉換為繁體字后會變成錯" />
                               
                                <s:Label width="100%" text="ARABIC" />
                                <s:TextArea  text="مرأة" skinClass="spark.skins.mobile.TextAreaSkin" />
                                <s:Label text="مرأة" />
                                <s:Button label="مرأة" />
                               
                        </s:VGroup>
                </s:Scroller>
        </s:VGroup>
</s:Application>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Korean text not displayed in spark Label

Alex Harui
I'm pretty sure by default, right-to-left text is not supported in mobile.
 The mobile themes use TextField for memory and performance reasons which
does not support right-to-left text.

Your test case is still not specifying a font.  The default font I believe
is Arial.  So what this test may just be showing is that the Arial font on
these devices doesn't support all characters.  I still think you should
find out what fonts are on these devices that do support Korean and
explicitly set that as the fontFamily.

There is a Font.hasGlyphs API you can use to see if the characters are
available or not for TextField-based controls.  Spark Label uses
flash.text.engine and there are APIs like
FontDescription.isDeviceFontCompatible.  You may have to temporarily embed
the font to get hasGlyphs to work.

-Alex

On 12/11/13 5:24 AM, "FlexForever" <[hidden email]> wrote:

>I did some comprehensive testing on various Android Versions regarding
>Asian/Arabic Fonts.
>It seems that less and less fonts are displayed correctly towards the
>newer
>Android Versions. I made tests for spark label, textarea and button. You
>can
>see the results here:
>
><img src="http://i.imgur.com/VvwR8RP.png" title="Android Font Test" />
><http://imgur.com/VvwR8RP>
>
>I marked with green and red, correct and wrong display of the text. The
>problem with Arabic is the text direction.
>
>Below is the code used. Compiled with Flex 4.11 and Air 3.9. I played
>around
>with a few other SDK versions but basically with same result.
>
>I think this needs urgent attention, especially as more and more updates
>for
>Android 4.3 and 4.4 will come out soon.
>
>I will post the same at the Adobe Air forums.
>
>
><?xml version="1.0" encoding="utf-8"?>
><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>   xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="160"
>xmlns:local="*">
> <s:VGroup width="100%" height="100%" paddingTop="20" paddingRight="20"
>paddingLeft="20">
> <s:Scroller height="100%" width="100%">
> <s:VGroup width="100%" height="100%">
> <s:Label width="100%" text="KOREAN" />
> <s:TextArea  text="1 남자와 소년 남자와 소년"
>skinClass="spark.skins.mobile.TextAreaSkin" />
> <s:Label text="2 남자와 소년 남자와 소년" />
> <s:Button label="3 남자와 소년 남자와 소년" />
>
> <s:Label width="100%" text="JAPANESE" />
> <s:TextArea  text="1 がアップデート後、文字が"
>skinClass="spark.skins.mobile.TextAreaSkin" />
> <s:Label text="2 がアップデート後、文字が" />
> <s:Button label="3 がアップデート後、文字が" />
>
> <s:Label width="100%" text="CHINESE" />
> <s:TextArea  text="1 轉換為繁體字后會變成錯"
>skinClass="spark.skins.mobile.TextAreaSkin" />
> <s:Label text="2 轉換為繁體字后會變成錯" />
> <s:Button label="3 轉換為繁體字后會變成錯" />
>
> <s:Label width="100%" text="ARABIC" />
> <s:TextArea  text="مرأة" skinClass="spark.skins.mobile.TextAreaSkin"
>/>
> <s:Label text="مرأة" />
> <s:Button label="مرأة" />
>
> </s:VGroup>
> </s:Scroller>
> </s:VGroup>
></s:Application>
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Korean-text-not-displayed-i
>n-spark-Label-tp4053p4169.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.

Loading...