Skip to main content
Participant
November 15, 2011
Question

Problems displaying Thai characters in Flex FTE components on Mac

  • November 15, 2011
  • 1 reply
  • 1063 views

I am running into issues displaying Thai characters in Flex components that make use of the Flash Text Engine (FTE), specifically on Mac OSX 10.6.8 Snow Leopard.

Here's a blurb of my compiler font managers in flex-config.xml:

    <flex-config>

        <target-player>10.2.0</target-player>

        <!-- Specifies the version of the compiled SWF -->

        <swf-version>11</swf-version>

        <compiler>

          <!-- Specifies the locales for internationalization. -->

          <locale>

              <locale-element>en_US</locale-element>

          </locale>

          <fonts>

              <!-- ... -->

              <!-- Compiler font manager classes, in policy resolution order-->

              <managers>

                  <manager-class>flash.fonts.JREFontManager</manager-class>

                  <manager-class>flash.fonts.BatikFontManager</manager-class>

                  <manager-class>flash.fonts.AFEFontManager</manager-class>

                  <manager-class>flash.fonts.CFFFontManager</manager-class>

              </managers>

                <!-- ... -->

            </fonts>

        </compiler>

    </flex-config>

...and another from flash-unicode-table.xml:

    <language-range>

        <lang>Thai</lang>

        <range>U+0E01-0E5B</range>

    </language-range>

My flex application originally had the following defined in its stylesheet:

    Application {

        fontSize: 12px;

        fontFamily: Arial;

        font-sharpness:0;

        font-anti-alias-type:advanced;

    }

Thai characters render correctly in mx components such as TextField so far.  However, FTE components such as TextLine show those crappy-looking boxes as a substitution.  My initial guess was that somehow one of the compiler font managers declared in flex-config.xml was not finding the right system font to fallback to for Thai characters.  So, I ensured the system font was installed by going to System Preferences > Language and Text > Edit List.  Then I changed fontFamily to Arial, Ayuthaya.  Still was seeing the boxes of evil.

Next I figured that perhaps the Arial font might be assigning a box for each unicode value corresponding to a Thai character.  So it was effectively overriding the Ayuthaya system font.  So I changed fontFamily once more to just Ayuthaya and this worked with one issue - Ayuthaya looks inherently different from Arial for non-thai characters.

Here's my question - is there a less invasive way to support Thai in FTE components such that the appearance of the text is closer to the Arial font?  I would rather not embed a font because I'm constrained on SWF size.

This topic has been closed for replies.

1 reply

Adobe Employee
November 16, 2011

If you don't set fontFamily, what it will be? For such a question, you need turn to Flash runtime guys for help. I think you can find them on http://forums.adobe.com/community/flashplayer?view=overview

p4nd4manAuthor
Participant
November 16, 2011

Posted in "Using Flash Player" forums here:

http://forums.adobe.com/thread/925912