From the course: InDesign Secrets

308 Easily insert glyphs with free script - InDesign Tutorial

From the course: InDesign Secrets

308 Easily insert glyphs with free script

- [Instructor] You probably already know that you can insert any character from inside a font by opening the Glyphs panel. To do that, you go to the Type menu and choose Glyphs. Now, you find the character that you want inside the Glyphs panel and simply double-click on it. But this panel can get really tiresome if you have to use it a lot. For example, what if you need to type the euro symbol 50 times a day? Or some special bullet character? Sure, once you insert it once, InDesign does put it up here in the Recently Used list. So, that helps a little bit, but even easier would be a way to type the character with your hands on the keyboard, even if the Glyphs panel is closed. And it turns out you can do that by downloading one of a couple of free scripts. To find those scripts, go to this URL, indesignsecrets.com/free, then just scroll down this list until you see the scripts Unicode Injector and Insert GID character. Now, we've already talked about downloading and installing scripts in an earlier InDesign Secrets movie, so I'm not going to show that now, but in this case I downloaded Insert GID character, and you can see it inside InDesign's Scripts panel. So I'll switch back to InDesign, I'll go to the Window menu, choose Utilities, and then choose Scripts. Now, inside the Scripts panel I'll open the User folder and you'll see, this is the script I downloaded. It has sort of a strange name, 1254 floralheart and so on. Let's move these panels around so I can see them both at the same time. Now I want to insert a character inside this text frame, so I'm going to click where I want it to be inserted, and next I'm going to go up to the control panel and choose the character mode, so I can see what font I'm currently getting. You'll see that it's currently set to Minion Pro, and that's important because see here inside the Scripts panel, part of the name of this says Minion Pro. This script is setup to insert a particular character from inside the Minion Pro font. Okay, I'll double-click the script and that runs it, and you'll see all it does is insert a character. This floral heart character. So that's great, but why did I get that particular character? Well this is the character with the glyph ID number, or GID number, of 1254 inside Minion Pro. And I know that because, here let me go ahead and select this character and inside the Glyphs panel you'll see it also becomes selected, and if I hover my cursor on top of it, you'll see a tool tip and inside the tool tip it says GID number 1254. You see, every character in a font has a GID number. Like this one over here is number 1270. So, what if I want that character instead of this floral heart? Well here's the magic thing about this script. You don't have to edit the script or anything technical like that. You just have to edit the name of the script. To do that I'm going to come back to the Scripts panel, and I'll right-click on this script, and I get this little context menu. And here I'll choose Reveal in Finder. On Windows it would say Reveal in Explorer. So there it is. There's the script I downloaded and installed inside the Scripts Panel folder. So I'm going to duplicate this script by copying it. I'll just do a Command + C on the Mac or Control + C on Windows, and then Command + V or Control + V, and that duplicates the script inside this folder. Now, I'm going to right-click on this script and choose Rename. And the first thing I'll do is remove this word, copy, at the end. I don't need that. Next, and this is the important part, I'm going to change the number at the beginning from 1254 to 1270. That was the GID number of the other character I liked, right? Next, I'll change the name of this character here from floral heart to something different. It actually doesn't matter what you type here. The only part that matters is that number at the beginning of the name. That's the GID number. All the other stuff is just to remind you what character you're going to get, and what font you should be set to. All right, let's try it. I'll switch back to InDesign and I'll see my new script right here in the Scripts panel. Next, I'll click out here in the text frame and I'll press Return to go to the next line. And now to insert that special character, all I need to do is double-click on my new script. Now remember, this GID script only works with a specific font. In this case, the current position of the text cursor has to be set to Minion Pro when you run this script, or else you're going to get some unexpected glyph. Now that other script I mentioned, the Unicode Injector, that one works with special characters that show up in more than one font, because it's based on the Unicode number instead of the GID number. It can even insert more than one character at a time, so that's pretty cool. Okay, let me show you one more example. Let's say I'm working on a document and the font is something else, like I'll delete all of this and I'm going to change the font to Adobe Garamond. I'm going to choose adobe Garamond Pro Regular, and let's say this is a math textbook, so I'm going to be typing a lot of equations, like six times nine. But I don't want this dorky X character. That's the letter X, I want a real multiplication symbol. So I'm going to get a script to type the character for me, and then I'm going to show you how to set a keyboard shortcut for that script so I can run it even faster. Now first I need to find the character I want, so I'm going to choose that X, come over to the Glyphs panel, and change the Show popup menu from Entire Font to just Math Symbols. Here we go, there's the X I want, the real multiplication sign. So I'm going to hover my cursor over it and I can see that this character has GID number 168. Now remember, this is the GID for this character in this particular font. So now let's make a script to work with that character. I'll switch back out here to Mac Finder or Windows Explorer, and once again I'll duplicate the script. Now I need to rename it. I'm going to remove the word copy. I'm going to change the font to something else. In this case it's Garamond Pro. And now I'm going to change the number to the number I was looking for. GID number 168. Let's go ahead and change the name of this to multiply. Now let's go ahead and test it. So I'll switch back to InDesign and you can see my new script is there. All I need to do to test it is remove that X and then come over here and double-click on the script. There we go, there's the correct character for this font. Now obviously you wouldn't want to have to double-click the script each time you want the character, right? No, we need to assign a keyboard shortcut to this character. So to do that, I'll go to the Edit menu and choose Keyboard Shortcuts, way down here at the bottom. Next, I want to make sure that I'm using my own custom set here. I'm going to choose David's Set. If you don't have your own set made already, you can create one by clicking the New Set button over here. Then, from the Product Area popup menu, choose Scripts. You need to find the script that you created, and it's probably going to be down at the bottom of the list inside the User area. There it is. User 168_multiply. Now I'll come down here and choose a shortcut for this. I'm going to choose Control + Option + X, but you can choose any keyboard shortcut you want. I suggest setting the Context menu to Text. That way the shortcut is only triggered when the text cursor is active in a story. Finally, I'll click Assign, and then OK. Now whenever you press that shortcut, the glyph will be inserted. Let's try it. On the next line here, I'll type eight, then a space, and then I'll press my keyboard shortcut and you can see it inserted that character, and then I'll press nine. So there you go. Now obviously, you wouldn't go through all this trouble if you just had to insert this character a few times. But if you need these kinds of special characters dozens or hundreds of times a day, well wow, this script is a huge lifesaver.

Contents