8 Replies Latest reply: Aug 26, 2011 11:48 AM by idratherbegolfing RSS

    Punjabi text not rendering correctly in TLFTextField instance?

    Robert Reinhardt CommunityMVP

      I'm experiencing rendering issues with a SWF file using a runtime generated instance of the TLFTextField class (Flash CS5 or CS5.5), specifically with Punjabi and only on Mac OS browsers. The text displays as control characters (or outlined rectangles), and not in Punjabi. However, if I make an authortime instance of TLFTextField in a FLA, copy and paste Punjabi text into the field on the stage, and publish it with an embedded font like Arial Unicode MS, Punjabi displays just fine. If I try to use the same embedded font on a runtime instance, I still get the weird characters. Even weirder, if I leave the authortime instance on the stage, and then create a runtime instance of TLFTextField, the text shows just fine in both fields! What's happening with the authortime instance that I can not get to happen with the runtime instance?

       

      Many thanks in advance for any suggestions.

       

      -Robert

        • 1. Re: Punjabi text not rendering correctly in TLFTextField instance?
          Gang Cai Adobe Employee

          Hi Robert:

           

          I would suggest you to post this issue to the Flash Pro/Authoring or flash runtime forum. This forum is for the open source project of TLF(Text Layout Framework). The TLFTextField is based on TLF but it's actually a Flash Pro/Authoring component...

           

          Seems your issue is not related to TLF as TLF is only for the layout business. The font embedded and rendering things are flash player runtime business. It also may be related to how the Flash Pro/Authoring implemented it. So, please find the right forum to post your question.

           

          Thanks

          • 2. Re: Punjabi text not rendering correctly in TLFTextField instance?
            Robert Reinhardt CommunityMVP

            Gang, respectfully, I've written over a dozen books on Flash (I wrote the original Flash Bible from Flash 4 through Flash CS4). I have a feeling this issue is related to FTE, but I have to start the outermost layers I'm using, which is primarily TLF. YouTube's video player with captions using TLF (so I'm told) and it too cannot render Punjabi. Most users do not use FTE directly, but rather try to follow Adobe's recommendations and use TLF. I figured if anyone else had experienced this issue with Punjabi text, it would be dealt with here. I'll definitely make more posts in other areas on the forum.

             

            So, I presume you don't have any recommendations on what the issue could be? Anyone else?

            • 3. Re: Punjabi text not rendering correctly in TLFTextField instance?
              AlanStearns

              Robert,

               

              Gang's point is that TLFTextField is a Flash Authoring component, which the people on the Flash Authoring forum would be better set up to help you with. The font embedding is also Flash Authoring's code. There could be something going wrong in the component or the font embedding code, or there could be an FTE limitation. In the past for script and embedding issues, we've not usually found problems in TLF we could address.

               

              If you'd like to debug the problem further, you could remove the Flash Authoring component and embedding UI from the mix, and try to display Punjabi text using a TextContainerManager in straight ActionScript using a device font. If that does not work, then the problem is likely in FTE. If it does work, I'd try running the same code with an embedded font and see if the problem lies there.

               

              Thanks,

               

              Alan

              • 4. Re: Punjabi text not rendering correctly in TLFTextField instance?
                Robert Reinhardt CommunityMVP

                Perhaps I should just make a post that says, "Has anyone used TLF to render Punjabai text"? Would that be suitable for a post in this forum? Alan, I know how I can continue to debug the issue further using either native FTE methods as well as TLF containers directly instead of the shell that I'm using to create them. So far, I've found that this is a Mac specific issue (Windows is fine), and that my only workaround is to specify a TextLayoutFormat instance using a fontFamily value of "Gurmukhi MT". This font seems to only be available on the Mac OS X install disc in the Optional Installs folder (I had it installed by default, but my Canadian government clients did not). If I specify the following properties for a TextLayoutFormat instance, it will display:

                 

                textFormat.fontFamily = "Gurmukhi MT";

                textFormat.fontWeight = FontWeight.NORMAL;

                textFormat.fontLookup = FontLookup.DEVICE;

                textFormat.renderingMode = RenderingMode.CFF;

                 

                I was hoping I could get it to work in an embedded fashion, but my research also indicates the Mac OS has a different lookup table for Punjabi glyphs than Windows OS.

                 

                I only have so much time left in this project to find a solution, and I might just go with this approach for now. Hopefully, other users who need to render Punjabi / Devanagari characters can utilize some of what I've said here as a solution.

                 

                -Robert

                • 5. Re: Punjabi text not rendering correctly in TLFTextField instance?
                  AlanStearns Community Member

                  Robert,

                   

                  I've asked someone who knows the embedding code to take a look at this thread.

                   

                  Thanks,

                   

                  Alan

                  • 6. Re: Punjabi text not rendering correctly in TLFTextField instance?
                    idratherbegolfing Community Member

                    Robert,

                    Would it be possible for you to share your FLA with me? There are so many possible ways for things to go wrong once you start instantiating TLFTextField from your own AS that I can't easily debug this over the forum. But, if you could share it w/me, I'd be more than happy to take a look.

                     

                    Rusty

                    • 7. Re: Punjabi text not rendering correctly in TLFTextField instance?
                      Robert Reinhardt CommunityMVP

                      Thanks for the offer, Rusty! Can you direct message on the forum with your email address and I'll email to you?

                      • 8. Re: Punjabi text not rendering correctly in TLFTextField instance?
                        idratherbegolfing Community Member

                        I sent you a private message w/my address.