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

Missing glyphs in font

Explorer ,
Jan 07, 2020 Jan 07, 2020

I am pasting some text into a text frame in InDesign that was copied from Microsoft Word. Most of the characters use the font Noto Sans Georgian. The numbers and punctuation use Noto Sans. In InDesign, the paragraph style uses Noto Sans Georgian, so most of the characters appear correctly. However, the numbers and punctuation appear as rectangles. If I highlight a rectangle and change its font to Noto Sans, it appears correctly.

 

However, I'm using a script to generate the InDesign document, so I can't manually highlight characters and change their font. I cannot figure out how to detect the rectangles in my script or any other way around this problem. Ideas? Thanks!

TOPICS
How to , Scripting
12.3K
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 1 Correct answer

Community Expert , Jan 08, 2020 Jan 08, 2020

Hi Dan,

some years ago in 2012 Pete Baumgartner invented a method to list all missing glyphs by scripting InDesign:

https://community.adobe.com/t5/indesign/finding-unassigned-glyphs/td-p/4358355

 

Peter Kahrel advanced the script and gave it a user interface.

Recently Peter added an important feature: Now you can even add a character style to every missing glyph:

 

missing_glyphs-1.png

 

See into the ExtendScript (JavaScript) missing_glyphs.jsx script by Peter Kahrel:

https://creativepro.com/files/kahrel/indesign/missing_glyphs.html

...
Translate
Community Expert ,
Jan 07, 2020 Jan 07, 2020

Please tell us what operating system (exactly) you're running. Please tell us (exactly) what InDesign version you're using.

 

What happens if you choose File > Place and place the Word document. (Copying and pasting is inherently dangerous when dealing with some glyphs in some fonts.) Is the text in the language in the Word document the same as the language set in InDesign? In InDesign Clipboard settings, in the setting "Where Pasting Text and Tables..." which setting is chosen. What if you switch the setting?

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
Explorer ,
Jan 07, 2020 Jan 07, 2020

Thanks for your reply, Steve!

 

I am running on a Windows 10 system with InDesign CS6 (Version 8.0). The language of the paragraph in InDesign is [No Language]. The Clipboard setting is Text only. Switching to All information doesn't change the result in the InDesign document.

 

My script is run from a VB.NET program that is reading the text from an Excel spreadsheet. The script creates a frame and adds the text to the frame's story. I haven't tried using File > Place, since the original data is coming from a cell in a spreadsheet. I will try this as a test tomorrow.

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 ,
Jan 07, 2020 Jan 07, 2020

Is this a Word DOC file or a text file you're importing? Do you know the Encoding of the Excel text?

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 ,
Jan 07, 2020 Jan 07, 2020

I'm confused by the relationship between the Excel spreadsheet and the Word file. Can you explain?

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
Explorer ,
Jan 07, 2020 Jan 07, 2020

The original data is in an Excel spreadsheet. I am reading the data from cells in the spreadsheet and passing it to a script to insert into a frame in an InDesign document.

 

I'm only using Word for testing. I can copy and paste the contents of a cell in the spreadsheet into a Word document and everything looks correct. There are no missing characters.

 

I saved the Word document and then used File > Place in InDesign. I get the same result as when my VB.NET program reads the Excel data and passes it to the script: Numbers and punctuation characters are rectangles, not the actual characters.

 

I don't know what the encoding of the data is. How do I check that in Excel, Word and InDesign?

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 ,
Jan 07, 2020 Jan 07, 2020

And you're using exactly the same fonts in both both the Office apps and InDesign on Windows?

 

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
Explorer ,
Jan 08, 2020 Jan 08, 2020

Yes.

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
Explorer ,
Jan 08, 2020 Jan 08, 2020

I've seen some information about font linking in Windows 10, done through regedit. I'm not sure it's relevant and it's not clear how I would set it up to link Noto Sans and Noto Sans Georgian. Is it possible that font linking would solve the problem?

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 ,
Jan 08, 2020 Jan 08, 2020

You can create a composite font – either immediately through scripting it yourself, or using Marc Autret's FontMixer: http://www.indiscripts.com/post/2013/07/fontmixer-extend-typefaces-in-indesign

 

Alternatively: no need to use a script, just add a GREP style to your paragraph style(s) that sets the correct font for numbers and punctuation.

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 ,
Jan 08, 2020 Jan 08, 2020

Hi Dan,

some years ago in 2012 Pete Baumgartner invented a method to list all missing glyphs by scripting InDesign:

https://community.adobe.com/t5/indesign/finding-unassigned-glyphs/td-p/4358355

 

Peter Kahrel advanced the script and gave it a user interface.

Recently Peter added an important feature: Now you can even add a character style to every missing glyph:

 

missing_glyphs-1.png

 

See into the ExtendScript (JavaScript) missing_glyphs.jsx script by Peter Kahrel:

https://creativepro.com/files/kahrel/indesign/missing_glyphs.html

 

Regards,
Uwe Laubender

( ACP )

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
Explorer ,
Jan 08, 2020 Jan 08, 2020

Thanks, everyone, for the suggestions. Both ideas (adding GREP styles to paragraph styles and the missing_glyphs script) were very helpful. With them, I was able to solve my problem.

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
Explorer ,
Feb 20, 2024 Feb 20, 2024
LATEST

Hi Uwe,

 

If document contain table(s) with any cell with overset then this logic hang the indesign file.

Here is the code.

function ApplyCharacterStyleOnMissingGlyphs(c_name, location) {
    var characterStyle, fonts, i, font, textArray, j;
    try {
        var myDoc = app.documents[0];
        if (!myDoc.isValid) return;
        var characterStyle = myDoc.characterStyles.itemByName(c_name);
        if (!characterStyle.isValid) return;

        // location = location || myDoc;
        location = myDoc.xmlElements[0].parentStory;

        var fonts = myDoc.fonts.everyItem().getElements();
        app.findGlyphPreferences = null;
        for (var i = 0, n = fonts.length; n > i; i++) {
            try {
                font = fonts[i];
                if (font.status == FontStatus.INSTALLED) {
                    app.findGlyphPreferences.glyphID = 0;
                    app.findGlyphPreferences.appliedFont = font.fontFamily;
                    app.findGlyphPreferences.fontStyle = font.fontStyleName;
                    textArray = location.findGlyph();
                    for (j = 0; j < textArray.length; j++) {
                        textArray[j].appliedCharacterStyle = characterStyle;
                    }
                }
            }
            catch (e) { }
        }
    }
    catch (e) {
        // $.writeln(e);
    }
}

 

Sumit

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