6 Replies Latest reply on Jul 21, 2014 12:38 AM by PhilDel

    Dynamic textfield issue with some specific device fonts

    PhilDel

      Hi there !

      I'm facing a severe issue here, and any test I try to do, leads to no solution...

      In Flash CC2014, I have some dynamic textfield, with "Arial Unicode MS" font assigned, and "use device fonts" for antialiasing settings.

      Those textfield are fed by a xml.

      Everything works fine in Flash CS6, BUT when I publish a swf with CC2014, the textfields don't show the "Arial Unicode MS" but something looking more like a "Times" font. Nothing like "Arial" anyway... When I load the fla in CS6, no problem. Even if I resave the fla with CS6, as soon as it is loaded in CS2014, the published swf shows the same "Times" font.

       

      I know that some of you have already faced this problem, but I haven't seen any solution yet.

       

      Is it a CC2014 bug ? Is there a workaround ? (except publishing the flas from CS6 )

       

      Thanks in advance for your kind help...

        • 1. Re: Dynamic textfield issue with some specific device fonts
          Ned Murphy Adobe Community Professional & MVP

          Have you tried embedding the font?

          • 2. Re: Dynamic textfield issue with some specific device fonts
            PhilDel Level 1

            embedding fonts work, for sure, but I cannot use it for this project, as it is meant to be integrated into a specific platform, and my customer puts the files through rigorous technical tests, which require the fonts NOT to be embedded :/

            • 3. Re: Dynamic textfield issue with some specific device fonts
              Ned Murphy Adobe Community Professional & MVP

              If publishing from CS6 works what objection do you have to using it?  There's lots of stuff that CC can't do that CS6 can and it is better to have CS6 when it provides the functionality needed.

              • 4. Re: Dynamic textfield issue with some specific device fonts
                PhilDel Level 1

                Problem is : I have many FLAs (directories which may contain more than 30 FLAs), which are automatically sent through a jsfl script, which empties the textfields to externalise their content to xml files. Then it saves the new FLAs (with empty textfields and as3 code to dynamically load xml texts) under a new name, and publishes the corresponding swfs.

                 

                So my dilemna is :

                 

                - either I execute the jsfl through Flash CS6, it takes hours to finish its work on my 30+ files, and the published swf works on first time,

                 

                - or I execute the jsfl through Flash CC2014, which only takes minutes to do its works, but then I have to launch Flash CS6 and put the 30+ files through another script, just to publish all the swf. Not very optimized process, huh Not very realistic in a production environment, for the less...

                 

                still looking for a solution :I

                • 5. Re: Re: Dynamic textfield issue with some specific device fonts
                  Nipun Asthana Adobe Employee

                  Hi,

                   

                  There appears to be a difference in the font-family name specified via Properties panel and the font that actually gets applied on the text field in Swf (for specific fonts only). This difference is causing the font to fallback to a default one instead of using the specified one. We'll log this as a bug and investigate internally.

                   

                  In the meantime, you may add this function in your fla files to manually specify the correct font-family name via Actionscript.

                   

                  import flash.text.TextFormat;

                  import flash.text.TextField;

                   

                  fixFont(txtLabel, "ABCD 1234 !@#$") //txtLabel is the text instance name on stage

                   

                  function fixFont(myTextInstance:TextField, myText:String) {

                    myTextInstance.text = myText;

                   

                    var tf:TextFormat = myTextInstance.getTextFormat();

                    tf.font="Arial Unicode MS";

                    myTextInstance.setTextFormat(tf);

                  }


                  Hope this works for you.

                  -Nipun

                  • 6. Re: Dynamic textfield issue with some specific device fonts
                    PhilDel Level 1

                    Thanks for your kind help,

                     

                    your workaround works, I just didn't use the "myText" variable because it seems useless in my case.

                     

                    Hope the bug will be corrected soon,

                    Good luck !