Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Asian language (Thai) not displaying correctly

New Here ,
Feb 28, 2010 Feb 28, 2010

Hi,

I am using a the downloaded TextFlow Hello World example to display text (Flash CS4). Thai language characters show up as rectangles while Chinese (Simplified and Traditional) and Spanish show up correctly. Weird thing is that I also use a standard ComboBox component in my UI as language selector; and the word "ภาษาไทย" (Thai) showed up correctly in it. (So I am guessing that's because the ComboBox is using TextField instead of TLF).

I tried to set CharacterFormat.locale but it doesn't seem to have any effect.

Thanks.

TOPICS
Text layout framework
23.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 01, 2010 Mar 01, 2010

The boxes are what you get when the font does not have the correct glyphs for the characters. Do you know if the font you are using has those characters in it? Can you tell me what font it is? Is it an embedded font, or a device font? On Mac or Windows?

Thanks,

- robin

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 03, 2010 Mar 03, 2010

Hi Robin,

Thanks for getting back. My answers are below inline.

>> Do you know if the font you are using has those characters in it?

Yes I think so because the TextField can display them without boxes.

>> Can  you tell me what font it is?

I have no idea as I don't know Thai. But After I read a couple of threads here at the forum, I used "Arial Unicode MS" for the CharacterFormat and they did all show up.

>> Is it an embedded font, or a device font?  On Mac or Windows?

The Arial Unicode MS is a device font under Windows XP. I am trying to embed it for CFF but I am running into a wall now.( I will start a new post about it)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 05, 2010 Mar 05, 2010

Hi Robin,

As I have a better clue what was going on:

Flash Player can figure out how to display 3 EA languages (Chinese Simplified, Chinese Traditional and Thai) in the TextField and V2 components. TFL can display Chinese but not Thai. Context: I have Chinese fonts installed, not Thai; I have Arial Unicode MS installed on my PC but I didn't let the characterformat know that I wanted that font. They are all device fonts in this case as I was setting the characterformat as the followings:

characterFormat.fontFamily = "Arial";

characterFormat.fontLookup =   flash.text.engine.FontLookup.DEVICE;

Once I did this:

characterFormat.fontFamily = "Arial Unicode MS, Arial";

All 3 languages showed up correctly.

Sorry I should'v done more homework before I posted anything.:)

Many thanks.


Geng

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 05, 2010 Mar 05, 2010

So the remaining problem is that font fallback is not working in Windows XP. This looks to be the case on my machines - Windows Vista and 7 will display Thai characters if you do not specify a font, but XP will not.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 15, 2010 Mar 15, 2010

BTW, what font does use TLF in Flash Player 10 for font fallback feature for Thai language under Windows XP?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mar 15, 2010 Mar 15, 2010

Angsana New

Eric.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 23, 2010 Mar 23, 2010

   And what font is used to display Thai language characters for the text with font weight equal to "bold"?

   The availability of sole Angsana New font at the Windows OS is not enough to display bold Thai language characters.

   This can be easily tested with s:Panel component, because default Flex 4 PanelSkin file is using bold text to display text in Panel title.

<s:Panel title="หน้าที่ทั้งหมด  Testing display of Thai symbols">         <s:VGroup>                          <s:Label text="หน้าที่ทั้งหมด"/>             <s:RichText height="75" width="200">                 <s:text>                    หน้าที่ทั้งหมด                 </s:text>             </s:RichText>                             </s:VGroup>     </s:Panel>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mar 23, 2010 Mar 23, 2010

The purpose of font fallback is not to ease font selection, but rather to avoid .notdef glyphs (boxes, question marks) and to obtain a text that is legible. Currently font fallback does not take into account the style bits (bold, italic). Angsana New, Regular is used (on Windows) in all cases.

Eric.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 12, 2010 Apr 12, 2010

Why do not use "Tahoma" font as font fallback in FTE for Thai language for Windows XP?

"Tahoma" font comes with Windows XP English installation, while Angsana New font becomes available on English Windows XP only after enabling "East Asian" language support.

And text rendered with "Angsana New" looks pretty bad, compared to the text displayed by the help of  "Arial" font.

Test application that display Thai characters:

<?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"                xmlns:mx="library://ns.adobe.com/flex/mx">     <s:layout>         <s:VerticalLayout paddingLeft="10"/>     </s:layout>         <fx:Declarations>                <fx:String id="str">สิทธิ์เรียกร้องค่าเสียหาย The quick brown fox jumped over the lazy dog.</fx:String>     </fx:Declarations>            <mx:Label id="lbl"               text="{str}"                                          fontFamily="Tahoma"               fontSize="16" />            <s:Label id="lbl2"               text="{str}"                                          fontFamily="Tahoma"               fontSize="16" />     <mx:Label id="lbl3"               text="{str}"                                          fontFamily="Ansgana New"               fontSize="16" />     <s:Label id="lbl4"               text="{str}"                                          fontFamily="Angsana New"               fontSize="16" /> </s:Application>

Screenshot of the running app: http://twitpic.com/1f3kb1/full

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Apr 15, 2010 Apr 15, 2010

See the answer at http://forums.adobe.com/message/2739135#2739135

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 05, 2010 Nov 05, 2010
LATEST

   The big problem with using Angsana New for the font fallback feature is that Thai font symbols are rendered with too small font size compared to neigbouring Latin font characters in FTE (Spark Label).

    Example below, fontSize is set to 12.

   Testing code:

<?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"                xmlns:mx="library://ns.adobe.com/flex/mx">     <s:layout>         <s:VerticalLayout paddingLeft="10" paddingTop="100"/>     </s:layout>                     <mx:Label id="lbl"               fontFamily="Arial"               text="MX Label: สิทธิ์เรียกร้องค่าเสียหาย"               fontSize="12" />            <s:Label id="lbl2"                                                       fontFamily="Arial"               text="Spark Label: สิทธิ์เรียกร้องค่าเสียหาย"               fontSize="12" />    </s:Application>

Screenshot of resulting app:

Thai_characters.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mar 08, 2010 Mar 08, 2010

On Windows XP, the installation of some of the fonts is optional.

Control Panel -> Regional and language options, languages tab, "Install files for complex script and right-to-left languages (including Thai)" checkbox.

We do not use Arial Unicode MS in our fallbacks because this font is *not* provided with Windows; AFIAK, it is only provided with Office.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines