Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
7

Data merge with symbol font? PLEASE HELP!

Community Beginner ,
Aug 22, 2023 Aug 22, 2023

I am researching how to best create a large amount of signs with help of InDesign Data Merge. I'd like to have and icon (like left/right arrow) to accompany the text of the sign. I've set up test files but get stuck when it comes to adding symbols. 

 

My thought was to use Font Awesome, Noto Symbol or similar to add the needed symbol. I've tried adding the symbol as a glyph into the .csv and then have a paragraph style for the symbol in the target document with the correct font. I only get broken glyphs (the box with and x).

 

Any idea on how to solve this!? 

 

Importing images works, and is a backup option.

TOPICS
Experiment , How to , Import and export , Scripting , Type
1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Aug 22, 2023 Aug 22, 2023

As this is two byte glyph - f178 - you need to save your CSV file with Unicode coding.

 

Then you need style placeholder - place in the InDesign where you want it to be placed - with this font. 

 

Translate
Community Expert , Aug 22, 2023 Aug 22, 2023

You should be able to just copy and paste the glyph from the web page example you gave us.

 

And, as Robert mentioned, you must save the csv file encoded as UTF-8. 

Translate
Community Expert ,
Aug 22, 2023 Aug 22, 2023

Hi @Nina31724321qd6o, one approach could be to put the font symbol characters into your csv file, eg:

SYMBOL,TEXT
C,The quick brown
F,fox jumps over
B,the lazy dog

And then use a Paragraph Style with a nested style that applies a Character Style to the first character. (Or even simpler: just manually format the first field placeholder with the symbol font!) See my attached demo files. Also there are plenty of other ways to go about this.

- Mark

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 22, 2023 Aug 22, 2023

Thank you! Your example works fine. But still, when I try it with Font Awesome for example, I get errors. Maybe I didn't understand your instruction correctly. How should I add this glyph, for example: 

https://fontawesome.com/icons/arrow-right-long?f=classic&s=solid

 

As unicode? Or paste the glyph? Another way? 

 

Thanks again for taking your time to help me!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2023 Aug 22, 2023

As this is two byte glyph - f178 - you need to save your CSV file with Unicode coding.

 

Then you need style placeholder - place in the InDesign where you want it to be placed - with this font. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2023 Aug 22, 2023

You should be able to just copy and paste the glyph from the web page example you gave us.

 

And, as Robert mentioned, you must save the csv file encoded as UTF-8. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 22, 2023 Aug 22, 2023

I got it to work! Thank you! Huge step on the way. 

 

It does though only work if I create the .csv in Sublime Text (I've tried Excel and TextEdit - to get the Excel-csv-file to open in InDesign data merge at all, I had to first open in text edit and save again, even if there was only A-Z glyphs). Any idea why that is? And thanks again!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2023 Aug 22, 2023
LATEST

Great. 

 

InDesing is very fussy with CSV files - it's always best to "manually" convert them into right encoding in a good text editor.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2023 Aug 22, 2023

Tag your character between, for example, "#$#" - #$#k#$#" - then just use GREP to change it with CharStyle.

 

(#$#)(.+)(#$#)

 

$2 (plus CharStyle) 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2023 Aug 22, 2023

The dollar is a special character in regular expressions (stands for 'end of input/paragraph). Better to use a character that has no meaning in regexes, such as &, @, #, %

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2023 Aug 22, 2023

Right, or it can always be escaped. 

 

And then it probably would be better to differentiate opening and closing tags - %#...#%.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2023 Aug 22, 2023

Except that escaping $ doesn't always work (old ID bug, though I haven't checked it for a while). The workaround is to use it as a character class, [$], but that gets messy.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2023 Aug 22, 2023

Thanks, will have to remember to avoid it in GREP - for anything else but intended use. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines