3 Replies Latest reply on Jan 15, 2009 4:03 PM by (Scott_Braucher)

    Font for inserting glyph [JS]

      I'm using a small Javascript to insert a Unicode glyph at the text insertion point:

      if (app.selection[0].constructor.name == "InsertionPoint"){
      with (app.selection[0].insertionPoints[0]){ // insertion point
      contents = String.fromCharCode(0x20A6);
      }
      }

      This script works, but because the glyph only exists in a few fonts, I need to add something to the script to specify the font used when inserting the glyph. I've tried to specify the insertion point appliedFont, but I can't figure out the syntax.

      Any help or suggestions for an alternative approach will be appreciated.