is now part of CreativePro.com!

Finding and Changing Glyphs

28

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

Steve Werner is a trainer, consultant, and co-author (with David Blatner and Christopher Smith) of InDesign for QuarkXPress Users and Moving to InDesign. He has worked in the graphic arts industry for more than 20 years and was the training manager for ten years at Rapid Lasergraphics. He has taught computer graphics classes since 1988.
  • Jongware says:

    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.

  • Steve Werner says:

    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.

  • Harbs says:

    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!

  • Roland says:

    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.

  • Fred Goldman says:

    Yes, I am still doing a lot of my scripting in CS3 because the findGlyph is broken :-(.

  • Harbs says:

    @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…)

  • Rhiannon says:

    Roland: I’d like to do this too, for Greek letters in Symbol font. Does anyone know if there is any way of getting InDesign to output the entire set of GlyphIDs for a particular font? Then I could (hopefully) just plug them all into FindChangeByList (apparently it wants GlyphIDs and not Unicode values) and sit back?

  • Di Cooper says:

    I CANNOT FIND THE GLYPHS IN ADOBE CS4. CAN YOU PSE ADVISE ME AS TO HOW TO FIND IT?
    THANKS
    DI COOPER

  • LPMcAdams says:

    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

  • Goran says:

    Can I specify language in Finding/Changing Glyphs automated JavaScript? Thanks!

  • @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.

  • Goran says:

    @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!

  • Goran says:

    Sorry, it not shown: i example I typed “Cyrillic letter ‘L’ “

  • @Goran: Ah, I see. Great. Yes, I talked about this a little bit in this post https://creativepro.com/search-for-foreign-language-characters-in-text.php

  • 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?

  • Jongware says:

    @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).

  • Mareike says:

    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

  • Mareike says:

    Ok I take that back today it worked copying the glyph… go figure… :)

  • 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

  • Jongware says:

    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?

  • You might also look at the Compose character script mentioned in this blog post: https://creativepro.com/how-to-insert-a-schwa-or-other-phonetic-character-in-indesign.php

  • Mubeen says:

    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

  • Aisli says:

    Hi, Thanks so much for this info… but is there any way to change the new glyph size? The font Im replacing is larger format than most, so the substituted glyphs are considerably smaller?
    Thanks for your time,
    Aisli

  • james says:

    I’m using raleway which has a cross over W. I would like to replace this cross over W for the alternative non-cross over glyph, but (and here’s the catch) only for particular words. In this case, the company’s name.
    So – I want to replace the letter ‘w’ in ‘TOWER’, but leave the rest of the document with the default glyph.

    • Jongware says:

      @james: Good news, and bad news. With a GREP style, it’s possible to specifically target just the “W” in your “TOWER” – that would be (?<=\bTO)W(?=ER\b). The bad news is, the alternate “W” in Raleway is only accessible with the OpenType feature “Stylistic Alternates” … and (I just checked the Online Help for that) that is still not available in InDesign. So you must use a Glyph Find and Change, and with that you cannot use the nifty GREP search.

  • Thank you. This solved my problem in SC6 (InDesign). I couldn’t figure out house to access a contextual alternative. It didn’t have the same options that I have in Photoshop.

  • Daniel Shekeran says:

    Hi I am using InDesign CC 2014 now. When I was using Indesign CS5 I had some issues with the Oriya Language font where some conjuncts (a consonant linked to another consonant). I had fixed these issues by finding the problematic conjuncts and replacing them with the appropriate glyph. But the sad part of this is that when text containing glyphs are copied and pasted into a word file, notepad or wordpad, the glyph character disappears and the word containing the glyph becomes a misspelled word. In CC 2014, the conjuncts work fine. Now what I need to do is find the glyphs that I had replaced in CS5 and change them to regular conjuncts. Please help me. This is very important as there are thousands of different glyphs to be found and replaced.

  • >