Copy link to clipboard
Copied
Hi!
I have a text frame, and I want to make the following:
1. When I insert "0", the character will be replaced automatically with object one (like in the attached image)
2. When I insert "+", the character will be replaced automatically with object two (like in the attached image)
3. When I insert "-", the character will be replaced automatically with object three (like in the attached image)
How can I do this?
I have Windows 7 & Indesign CS5.5
Thanks!
1 Correct answer
Hi,
create your own font with the three symbols.
Then you fomat your 0, +, - accordingly.
Have a GREP Style in the applied paragraph style to automatically apply the right size and fill color together with the right font.
There is the IndyFont script by Jongware and Marc Autret that can do what you want.
The demo version is able to create one-glyph fonts:
Regards,
Uwe
Copy link to clipboard
Copied
We'll see what the scripting folks come up with. For me, as a non-scripter, I would handle this as a Find/Change*. Obviously not automatic, but you can save the query as run as needed.
- Select the first image and copy it
- Find what: 0
- Change to: Other > Clipboard Contents, Unformatted
* I don't remember when InDesign introduced this option. I think it was in 5.5 but it is possible it isn't.
Edit: Aman's article—which shows the same procedure—is dated 2008, so that means that Change to Clipboard Contents is in CS5.5. which was released in 2010.
Copy link to clipboard
Copied
Hi,
You can refer to this interesting article on InDesign Secrets page.
https://indesignsecrets.com/find-text-change-to-graphic.php
This might be helpful in some way.
-Aman
Copy link to clipboard
Copied
Hi guys, and thanks for your fast answers!
I've tried the 'Find & Change' (I've been visited already in that InDesign Secrets link),
but as I said I need it to done automatically.
Maybe you'll know some script for that? Thanks a lot!
Copy link to clipboard
Copied
Hi,
create your own font with the three symbols.
Then you fomat your 0, +, - accordingly.
Have a GREP Style in the applied paragraph style to automatically apply the right size and fill color together with the right font.
There is the IndyFont script by Jongware and Marc Autret that can do what you want.
The demo version is able to create one-glyph fonts:
Regards,
Uwe
Copy link to clipboard
Copied
Uwe, that is correct, but in the most cases when someone wants to replace a letter to an image, it is either multi color or it is a rasterized drawing, like from a candle, a hand or something else. I think the symbols in the questions are only simplified images to make us understand the question.
But I agree, I create also my own fonts to perform these tasks. I use either Fontographer or FontLab, both are dedicated font creation applications. And even, if I have multi color drawings it is made possible as you can create several overlapping glyphs where each of them has a different color and the result is a multicolor drawing in the text. The only disadvantage is, I cannot automate it in lists, but I can automate it with GREP or with nested styles.
Copy link to clipboard
Copied
Thanks guys!
I'll try the font-changing & the indyfont script. thanks!
Copy link to clipboard
Copied
Hi,
watch the available movies about IndyFont first. Then read the documentation before doing anything.
Even if you used a font editor or a font creation tool before. The time spent will pay off.
When creating a font to solve problems like these keep in mind, that the base shape of the glyph is always monochrome only.
All formatting is done through InDesign's text formatting capabilities. The new multi-color font technology is not supported with InDesign.
Regards,
Uwe
Copy link to clipboard
Copied
… I think the symbols in the questions are only simplified images to make us understand the question. …
Hi Willi,
even if they are images, I think—or at least I hope—they are not "simplified". They can be easily drawn as vector shapes and compound paths in InDesign. And because they are all monochrome they are ideal candidates for glyph creation with IndyFont.
Regards,
Uwe
Copy link to clipboard
Copied
Hi guys,
I found this script that do the job:
but I'm facing a new problem.
I need to swap the characters '+', '-' and '0', but the script stopping Indesign and not working.
With letters it works just fine, but I have it to be '+', '-' and '0'.
The script now looks like this:
++
text = "\\b-\\b"
imageName = "d.eps"
caseSensitive = 0
++
text = "\\b+\\b"
imageName = "u.eps"
++
text = "\\b0\\b"
imageName = "n.eps"
What can I do to solve the problem?
Thanks!
Haim
Copy link to clipboard
Copied
Hi Haim,
I think, you are better off doing your own font. 🙂
Even if you'd have to build three one-glyph fonts with the demo version of IndyFont.
Still, If you want to follow the route with that script contact the script's author, Kris of rorohiko.
You also can send him a private message through the Adobe forum:
Regards,
Uwe
Copy link to clipboard
Copied
Swimmer uses GREP expressions.
The '+' has special meaning to GREP, and it must be escaped to be treated as a normal character.
So you need to do:
...
text = "\\b\\+\\b"
...
Copy link to clipboard
Copied
Many thanks !
Copy link to clipboard
Copied
Here's another workaround, based on a combination of Autocorrect feature + Grep styles
1- create a paragraph style based on some exotic language you'll probably never use. (Lithuanian in my example)
2- Open the Autocorrect/Lithuanian.xml file.
To locate the correct autocorrect xml file, find your Scripts panel in InDesign. In the panel you’ll see a “User” folder. Right-click or Control-click on this folder, and choose Reveal in Finder/Reveal in Explorer. In the folder that appears, navigate up the folder tree 2 levels. You should see a folder named after your locale (mine is named “fr_FR”). In this folder you’ll see a folder named Autocorrect, and in this folder is the lihuanian XML file we need to edit.
3- Edit the XML as for autocorrection. Use Unicodes pattern as the example below:
<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
<autocorrect>
<language name="Lithuanian" />
<wordpairs>
<wordpair misspelled="0" corrected="" /> <!-- Zero change to circle (wingdings2) + square (wingdings2)-->
<wordpair misspelled="-" corrected="" /> <!-- Minus change to circle (wingdings2) + down triangle (wingdings3)-->
<wordpair misspelled="+" corrected="" /> <!-- Plus change to circle (wingdings2) + up arrow (wingdings3)-->
</wordpairs>
</autocorrect>
4- Restart indesign. Go preferences and enable Autocorrect > Lithuanian
5- Create character styles for your 6 symbols: grey circle, red circle, green circle, square (Wingdings 2), up and down triangles (wingdings 3). Adjust approach for square and triangles in order to place them on top of circle...
6- Edit your paragraph styles and set up GREP styles in order to apply relevant character styles to each symbol
7-Here you go, apply your para style and just type 0, + or - (followed by a space, return, or punctuation) and it should create your symbol automatically.
Please note I haven't tested it