Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Finding and Changing Glyphs

You’ve got a document that uses a lot of special characters, perhaps because you’re working with a foreign language. When you try to change the text to a different font, you find that it suddenly turns into garbage! You’ve run into a font encoding nightmare.

Here’s an example of a snippet of text in Sanskrit as it’s supposed to appear:

Correct Encoding

However, when I switch to a different font, all the special characters switch to something else:

Incorrect Encoding

The problem is that the original font is not using Unicode encoding. Unicode is a computing industry standard allowing computers to consistently represent and manipulate text expressed in most of the world’s writing systems. Older fonts were designed before Unicode. They placed special characters in non-standard “slots” in the encoding. You can tell this in InDesign’s Glyphs panel, because when you pause over a special character, the tooltip description (based on Unicode) won’t match what you’re seeing.

Non-matching Unicode

You need to switch to a more modern font which uses Unicode, but to do so, you’ll need to switch the positions of the special characters to the correct Unicode “slot.” After you do so, you’ll be able to switch the fonts in your document to another font which contains the same glyphs, without having the text turn to mush.

Fortunately, InDesign has a powerful feature for finding and changing glyphs which can solve this problem. A glyph is a particular shape within a font?such as a letter, symbol, or alternative letterform like a ligature, small cap, or swash?used to represent a character code onscreen or on paper. You’re probably already familiar with the Glyphs panel, which gives you a quick and convenient way of entering those special characters. But what you may not know is that you can also find and change them. You do this in InDesign’s Find/Change dialog, revamped in InDesign CS3. Start by choosing Edit > Find/Change.

While much has been written about finding and changing text, GREP, or objects, surprisingly few people have noticed that there’s a fourth tab in the Find/Change dialog box: Glyph. This lets you find any glyph from any font, and replace it with any other glyph from any other font. As with any search, you need to use the Search menu to change the range of the search, and you need to click icons to determine whether items like locked layers or master pages, for example, are included in the search.

Glyphs Tab of Find-Change Dialog

There are three methods for picking the glyph you want to find. The first one is the easiest: Simply highlight the first glyph you want to replace, and choose Load Selected Glyph in Find from the context menu.

Load Glyph from Contextual Menu

The second method is to click on the button beside the Glyph box, and then double-click a glyph on the panel. This panel works just like the Glyphs panel.

Select from Glyphs

The third method, decidedly more techie, is to choose Unicode or GID/CID, and enter the code for the glyph.

You would use a similar set of methods for picking the replacement glyph. Then click Find, and use the Find Next, Change, Change All, and Change/Find controls to replace the glyph.

You should be sure to use the Save Query button at the top of the dialog. Name this search (I give it a name that represents the appearance of the glyph I’m find/changing), and the query will be saved so you can use the search again. Repeat this process for each glyph you need to find/change.

Save the Query

Related Articles
Comments

23 Comments on “Finding and Changing Glyphs

  1. Steve,

    I found that the Save Query option for glyphs in CS3 didn’t work — i.e., retrieving the query usually leads to garbage.
    Remind me to check this Monday at the office for CS4.

  2. Retrieving a saved query seems to be working for me in InDesign CS4 in the document I worked with which caused me to writing this posting. I haven’t tested this extensively, however, so there may be bugs lurking. I suspect that the feature hasn’t been widely used or tested.

  3. I suspect that the feature hasn?t been widely used or tested.

    I suspect that you are correct. I recently found that setting findGlyph properties by a script breaks the whole find mechanism in InDesign CS3 and CS4… (I reported the bug, and they were able to reproduce it at their end.)

    It’s pretty surprising that it took until now to uncover such a gross bug!

  4. If there is an easy way to do an entire font’s worth of glyphs I’d love to know, ’cause once a year I have to make a programme/booklet containing cyrillic texts from multiple sources, using multiple fonts, and one of them is always in a Times-family font I can’t easily change. Re-entering (or should I say “guessing”? lol) cyrillic is hard enough even when there’s no font-change, and thus glyph shape change, involved.

  5. @Fred:

    The bug I’m referring to is there in both CS3 and CS4. I think you’re referring to findText… (FWIW, I haven’t had the troubles you experience there…)

  6. Typing manuscript in German, without changing keyboard. I need to change some letters into ligatures specific to old German. I would like to use find change finding the text letters and changing to glyphs for the ligatures. Can’t seem to do this in CS4 Indesign. Any ideas or workarounds would be appreciated. For the future will type such documents using German keyboard. This is only to change documents already in Word or InDesign in my computer. Any help would be appreciated. Thanks

  7. @Di: Glyphs are under the Type menu. If you don’t see them, try changing your Workspace to Advanced.

    @LPMcAdams: The regular Find/Change should let you do this.

    @Goran: I’m sorry, I don’t understand the question. What script are you using? You might consider posting this in the Forum’s scripts section.

  8. @David Blatner: I made my own scrpit based on Find/Change gliphs. In scripts that I made for Find/Change TEXT I can specify which language must be applied on the text, so the script can change specific text. I didn’t find that option in glyph changing guide (InDesignCS4_ScriptingGuide_JS.pdf).
    (for example: I want with JavaScript to automatically change Cyrillic letter ?, from one variation to another, but only in the text witch is on Russian, an not on Bulgarian language [both are Cyrillic, and both are mixed in the same IDD document])
    Thanks!

  9. I am trying to do a search for a standard fraction “1/2″ and change it to the fonts glyph for that fraction. sounds like it should be simple but I don’t see where that is possible. Am I missing something pretty basic?

  10. @mark: this ought to work. Open the Glyph panel and locate the ¬Ĺ glyph for your font. Double-click to insert anywhere in your document. Then cut it, and paste into the Replace With field of Search and Replace. Enter “1/2″ in the Search field, and do your searching. With something like this, I’d hesitate to use “Change All” (think of dates: 1/21/2010).

  11. Mark, I am missing the same thing you are I have tried the paste of glyph and using it that way but it just replaces it with the same “1/2″ instead of the nicely compacted fractional glyph… hmmm

  12. We publish journals for an international audience of mathematicians. Many names use glyphs that I can not find (i.e. lower case “a” with cedilla.)

    We have always just placed a small text box on top of the primary text box, putting the accent where it should be. But if the text changes, the accent is now incorrectly placed.
    Do you have a solution?
    Lois Sellers

  13. Lois: it would be (slightly) better to insert the accent right after the character itself and use kerning to coax it into place. That will make it move along with the rest of the text on editing; you just have to make sure you don’t accidentally override all formatting on that paragraph, because that’ll loosen it up again.

    A lowercase a with cedilla … surely you are not mixed up with the Polish a ogonek?

  14. Can you please tell how to specify the gylph id in javascript for finding corresponding symbols from indd.

    var docPars=app.activeDocument.pages[0].textFrames[0].parentStory.paragraphs;
    alert(“docPars.length=”+docPars.length+”prase=”+parseInt(“201D”))
    for(var parCnt=0;parCnt<docPars.length;parCnt++){

    app.findGlyphPreferences.appliedFont=NothingEnum.nothing;
    app.findGlyphPreferences.fontStyle=NothingEnum.nothing;
    app.findGlyphPreferences.glyphID=NothingEnum.nothing;
    app.findGlyphPreferences.appliedFont="ITC Slimbach Std";
    app.findGlyphPreferences.fontStyle="Book";
    app.findGlyphPreferences.glyphID=parseInt("201D");

    var glyElem=docPars[parCnt].findGlyph();
    // var glyElem=app.activeDocument.pages[0].textFrames[0].findGlyph();

    for(var glpCnt=0;glpCnt<glyElem.length;glpCnt++)
    {
    glyElem[glpCnt].select();
    alert("glyElem[glpCnt]=="+glyElem[glpCnt]);
    }
    }

    when i did parseInt the last char of the glyph id is removed

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>