🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2178

Re: how to find the glyphs character using js in indesign cs2?

#2178
From: jongware
Date: Sat, 10 Jan 2009 16:58
14 lines
2460 bytes
You are mixing two concepts. There is a major difference between a glyph and a character.

A glyph is any singular graphic in a font.
A character is an instance of a character set (in InDesign, and in Mac OS X, it's the Unicode set; older programs use 'code pages' to translate codes into characters).

Why are they different? Well, a ligature ('ffi', for example) is not a single character, containing the characters 'f', 'f', and 'i'. It is a single glyph in most fonts, but (usually!) you cannot insert an 'ffi' directly. Programs that do allow insertion of glyphs (again, such as InDesign) are also smart enough to decompose it into single characters 'f', 'f', and 'i' again.

Why is this distinction important? In CS2, you can search for characters but not for glyphs (in CS3 and higher you can, but you cannot specify "+superscript").

All aside, you can insert a trademark character directly into InDesign by calling up the Glyphs :-) panel and double-click the glyph. (It works because the 'TM' is also a valid Unicode character.) Then just cut it, and paste into the 'Find' field of the Find Text box. Alternatively, since you can see the Unicode value in the Glyphs panel, you can enter the Unicode directly into the search field, surrounded by less-greater than: < 2122 > (without the spaces). This works for all Unicode characters.

Even better is that the character is also in the Find drop down menu -- "Registered Trademark Symbol". This inserts the shortcut "^r" in the Find box -- but it only works for a selected set of characters.

Since this is the Scripting forum, I'm guessing you want to use this in a script. Well, both "< 2212 >", and "^r" can be used in the search string to specify the character. Do the search and examine for each found item if it has a position Superscript or not.
Technical Details
Message-ID: <59b77a55.0@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing
References: <59b77a55.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,7b39441e33340ad5
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: jongware@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: how to find the glyphs character using js in indesign cs2?
Message-ID: <59b77a55.0@webcrossing.la2eafNXanI>
Date: Sat, 10 Jan 2009 08:58:17 -0800
References: <59b77a55.-1@webcrossing.la2eafNXanI>
Lines: 42
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit