7 Replies Latest reply on Nov 5, 2008 12:57 PM by (Mohammad_Sad)

    script for adding glyph using its id

      by writing a script for indesign cs3 in windows platform,I want to add a glyph using its Id (not its unicode id). how can I do this?

      thanks
        • 1. Re: script for adding glyph using its id
          Level 1
          You'll need to know the relationship of the glyph's Id to its unicode value. You insert text into an InDesign story by using string variables and they don't know about glyph Ids.

          Dave
          • 2. Re: script for adding glyph using its id
            Level 1
            thanks
            .. but the glyphs I want to insert have no Unicode values, actually I made a
            font file containing a lot of symbols and I want to add them automatically
            using  the script... is there any
            suggestions??
            • 3. Re: script for adding glyph using its id
              Level 1
              I didn't know it was possible to create a font that doesn't have unicode values for its glyphs.

              Dave
              • 4. Re: script for adding glyph using its id
                Level 1
                my
                font has unicode values for some glyphs but not for all because it has more than
                65000 glyph ....and as an example of non unicode glyphs: you may need another
                shape for one letter, you add glyph with the new shape in the font file then
                using the glyph plate in indesign you can insert it without having any unicod
                value.

                thanks
                for replaying
                • 5. Re: script for adding glyph using its id
                  Level 1
                  Interesting. I don't think it is possible in InDesign to refer to a glyph in a font by other than a unicode value, although perhaps there are ways you can associate more than one glyph with the same unicode value and then get the right one through some kind of internal mechanism in the font (like contextual alternates, or something).

                  You might want to post about this in the Typography forum. The people there will certainly have a better idea than me what is possible.

                  http://www.adobeforums.com/cgi-bin/webx?14@@.eea5b3a

                  Dave
                  • 6. Re: script for adding glyph using its id
                    Level 1
                    Hi Dave, Mohammad,

                    The best thing to do in this case is to make a story containing the characters you're interested in, then get the contents of each character to find out what InDesign thinks they are. Then use those strings when you need to enter each character. If you really need to use the glyph id, you can make an array that constitutes a "mapping table" for all of the glyph id/string value pairs you're interested in.

                    Thanks,

                    Ole
                    • 7. Re: script for adding glyph using its id
                      Level 1
                      <DIV><SPAN class=953405720-05112008><FONT face=Arial color=#0000ff size=2>thank <br />you all</FONT></SPAN></DIV><BR><br /><DIV class=OutlookMessageHeader lang=ar-sa dir=ltr align=left><br /><HR tabIndex=-1><br /><FONT face=Tahoma size=2><B>From:</B> Olav Kvern [mailto:member@adobeforums.com] <br /><BR><B>Sent:</B> Wednesday, November 05, 2008 12:43 AM<BR><B>To:</B> <br />adobe.scripting.indesign@adobeforums.com<BR><B>Subject:</B> Re: script for <br />adding glyph using its id<BR></FONT><BR></DIV><br /><DIV></DIV>A new message was posted by Olav Kvern in <BR><BR><B>InDesign <br />Scripting</B> --<BR>  script for adding glyph using its id<BR><BR>Hi <br />Dave, Mohammad, <BR><BR>The best thing to do in this case is to make a story <br />containing the characters you're interested in, then get the contents of each <br />character to find out what InDesign thinks they are. Then use those strings when <br />you need to enter each character. If you really need to use the glyph id, you <br />can make an array that constitutes a "mapping table" for all of the glyph <br />id/string value pairs you're interested in. <BR><BR>Thanks, <BR><BR>Ole <BR><BR><br /><HR align=left width=200><br />View/reply at <A href="http://www.adobeforums.com/webx?13@@.59b6ea98/5">script <br />for adding glyph using its id</A><BR>Replies by email are OK.<BR>Use the <A <br />href="http://www.adobeforums.com/webx?280@@.59b6ea98!folder=.eea52bc">unsubscribe</A> <br />form to cancel your email subscription.<BR><BR>