1 Reply Latest reply on Oct 12, 2015 6:30 AM by Marc Autret

    How to call up the glyph characters code?

    K159 Level 1

      Hi,

       

      I have a new font that characters added to the empty area.

       

      I can see a new character in the glyph. But if I can't see the call to the code.

       

      Naturally, I had to run the script after changing the font.

       

      Please tell me wrong codes.

       

       

           Unicode ID = EF38

       

       

       

      <- Not output.

       

       

       

       

      ======================== This is sample code. =======================

       

      #targetengine session;

      main();

      function main(){
          var w = new Window ("palette", "test");
          var btnSize = [0,0,50,65]; // Size of the buttons
          var row, i, j, buttons = {};
         
          var p1 = w.add("panel");

          var ed = p1.add ('edittext {active: true, preferredSize: [200, 30]}');
          var charArr = [[0xEF38, "9"],[0x53ef,"ga"]];
         
          var p2 = w.add ("panel");
          row = p2.add ("group");
         
          for( i=0 ; i<charArr.length ; i++ ) 
          {
              buttons[i] = row.add("button", btnSize, String.fromCharCode(charArr[i][0]));
              buttons[i].graphics.font = ScriptUI.newFont ("Helvetica","" , 40);
              buttons[i].helpTip = ("0"+charArr[i][0].toString(16)).toUpperCase();
          }
       
        w.onShow = function(){
        }
             
          w.show();
      }

      ============================================================

       

       

       

      Thanks.