Copy link to clipboard
Copied
I read the excellent article in Nov 08 issue of InDesign Magazine on using FindChangeByList. I am publishing stories on the card game Bridge which uses symbols for Hearts, Spades, Diamonds, and Clubs. I would like to use a script that replaces easily-typed characters for the suit symbols and makes the Hearts and Diamonds red. I have managed to write a script that replaces the symbols, but cannot find a way to make some of them red. Or better yet, applies a Character Style. Below is my script. Can anyone help me change the Hearts and Diamonds to red?
glyph | {glyphID:4,appliedFont:"Times",fontStyle:"Regular"} | {glyphID:386,appliedFont:"Apple Symbols",fontStyle:"Regular"} | {includeFootnotes:false, includeMasterPages:false, includeHiddenLayers:false} | Find all exclamation marks and replace with clubs. |
glyph | {glyphID:7,appliedFont:"Times",fontStyle:"Regular"} | {glyphID:383,appliedFont:"Apple Symbols",fontStyle:"Regular"} | {includeFootnotes:false, includeMasterPages:false, includeHiddenLayers:false} | Find all exclamation marks and replace with clubs. |
glyph | {glyphID:6,appliedFont:"Times",fontStyle:"Regular"} | {glyphID:388,appliedFont:"Apple Symbols",fontStyle:"Regular",appliedCharacterStyle:"Red Suits"} | {includeFootnotes:false, includeMasterPages:false, includeHiddenLayers:false} | Find all pound signs and replace with hearts. |
glyph | {glyphID:35,appliedFont:"Times",fontStyle:"Regular"} | {glyphID:389,appliedFont:"Apple Symbols",fontStyle:"Regular",appliedCharacterStyle:"Red Suits"} | {includeFootnotes:false, includeMasterPages:false, includeHiddenLayers:false} | Find all at marks and replace with diamonds. |
Copy link to clipboard
Copied
Thank you very much. I was looking for this solution for a long time.
Copy link to clipboard
Copied
I had the same problem with a bridge column we run in the newspaper. I had to run the Hearts and Diamonds with a black outline and a white filler. I skipped the glyph and went with text to find the unicode for Hearts and Diamonds in the article. I did this because I originally had to change the stand-in characters (™, ©, ®, ß) for the suites and change them to the unicodes for Hearts, Diamonds, Clubs and Spades. Then I searched for the unicodes for the Hearts and Diamonds and changed the "strokeColor" and "fillColor" to the right color. You could change the "fillColor" to whatever your red color is called.
text | {findWhat:"\u2665"} | {strokeColor:"Black", fillColor:"Paper", strokeWeight:"0.25"} | {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} |
text | {findWhat:"\u2666"} | {strokeColor:"Black", fillColor:"Paper", strokeWeight:"0.25"} | {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} |
Hope this helps.
Copy link to clipboard
Copied
Using glyphID is really hard. Unicode will be easier. I will try your way on Monday.
Copy link to clipboard
Copied
This might help -
\u2660 = black spade
\u2663 = black club
\u2665 = black heart
\u2666 = black diamond