Copier le lien dans le Presse-papiers
Copié
If we import or enter a text code (e.g. a Katakana character ) for which a font has no Glyph, then Indesign will display an x'd rectangle.
Is it possible to find/scan for these with a script?
Thanks !
I did finally manage to script a list of all the unassinged glyphs in my document - with .findGlyph().
This sample just writes to the extendscript toolkit js console.
[CS6]
-------------------------------------------------------------------------------
var myDocument=app.activeDocument;
var allFound = [];
var numFonts = myDocument.fonts.length;
for (var z=0;z<numFonts;z++) {
allFound = [];
app.findGlyphPreferences = NothingEnum.nothing;
app.findGlyphPreferences = NothingEnum.nothing;
app.f
...Copier le lien dans le Presse-papiers
Copié
Peter.
Thanks - works well !
pjb
e.g.,
4 Unassigned Glyphs in Myriad Pro | Regular |
十 21313 U+5341
分 20998 U+5206
な 12394 U+306a
利 21033 U+5229
--done--
Copier le lien dans le Presse-papiers
Copié
There's a bug that prevents the script from working with font styles other than Regular (and probably Roman). The problem is that doc.fonts
app.findGlyphPreferences.appliedFont = doc.fonts
with these two:
app.findGlyphPreferences.appliedFont = doc.fonts
app.findGlyphPreferences.fontStyle = doc.fonts
Peter
Copier le lien dans le Presse-papiers
Copié
I'd only tried "regular" font styles, and didn't have occasion to notice the regular/roman bug, so I really appreciate Peter K.'s going back and ferreting this out. For those who know even less about scripting than I do, I got his fix to work in the code presented earlier in this thread by adjusting the three "doc." references in his before and after lines to "myDocument."
David
Copier le lien dans le Presse-papiers
Copié
Peter
Thanks !
Pete
Copier le lien dans le Presse-papiers
Copié
Pete,
This is the only way I can contact you. Hope you don't mind that I tarted up the script based on your excellent method with an interface and posted it on my site at http://www.kahrel.plus.com/indesign/missing_glyphs.jsx
Peter
Copier le lien dans le Presse-papiers
Copié
This is the best, juiciest addition to my InDesign workflow ever. Thanks so much Peter 🙂
I work with a lot of text books with Japanese and Chinese content. Our editors will often type script into a line of text (using InCopy) without the correct script font selected and I end up with 400pp+ docs riddled with these annoying, tiny pink boxes. Your script fixed this in minutes. Brilliant.
Copier le lien dans le Presse-papiers
Copié
That's great
Glad to help.
I merged that script into our CopyFlow Gold extension at napsys.com
All the best,
Pjb
Sent from my iPhone
Copier le lien dans le Presse-papiers
Copié
Hello,
there is a problem when I run that missing_glyphs.jsx script in Indesign CC 2018 / Mac OS 10.13.6: it will not find any missing glyphs on master pages. I tried to modify that script by including app.findChangeGrepOptions.includeMasterPages = true; like this:
app.findGlyphPreferences = null;
app.findGlyphPreferences.glyphID = 0;
app.findGlyphPreferences.appliedFont = docFonts.fontFamily;
app.findGlyphPreferences.fontStyle = docFonts.fontStyleName;
app.findChangeGrepOptions.includeMasterPages = true; // <- new line added
found = app.activeDocument.findGlyph();
but still it will not find missing glyphs on master pages. Is there another solution for this?
Greetings
Copier le lien dans le Presse-papiers
Copié
Copier le lien dans le Presse-papiers
Copié
Copier le lien dans le Presse-papiers
Copié
oIndesign.FindGlyphPreferences = 1851876449
oIndesign.FindGlyphPreferences.glyphID = 0
oIndesign.FindGlyphPreferences.AppliedFont = oDocument.TextFrames(1).Characters(13).appliedfont.name // 小塚明朝 Pro
Dim oFind As Object = oDocument.FindGlyph()
If set oIndesign.FindGlyphPreferences.glyphID = 0 :FindGlyph() not return value
If set oIndesign.FindGlyphPreferences.glyphID = CID of oDocument.TextFrames(1).Characters(13) :FindGlyph() return value
Font name is Japanese
Font name is English ,It is ok.
Copier le lien dans le Presse-papiers
Copié
I modified your sceript to make it work in CC2019
var myDocument=app.activeDocument;
$.writeln('--Looking for missing fonts in ' + myDocument.name + '--');
var allFound = [];
var numFonts = myDocument.fonts.length;
for (var z=0;z<numFonts;z++) {
allFound = [];
app.findGlyphPreferences = NothingEnum.nothing;
app.findGlyphPreferences = NothingEnum.nothing;
app.findGlyphPreferences.glyphID = 0;
app.findGlyphPreferences.appliedFont = myDocument.fonts[z].name;
allFound = app.findGlyph ();
if (allFound.length>0) {
$.writeln(allFound.length+ ' Unassigned Glyphs in ' + myDocument.fonts[z].name );
for (var y=0;y<allFound.length;y++) {
$.writeln(allFound[y].contents+ ' ( ' +allFound[y].contents.charCodeAt(0)+')' );
}
}
}
$.writeln('--done--');
Trouvez plus d’idées, d’événements et de ressources dans la nouvelle communauté Adobe
Explorer maintenant