I am working with a guy in Brazil to producte a font sample book using InDesign for the PC. He has created a script that works fine on his computer with nearly 2500 fonts, but crashes mine after about 1430 fonts. His and my computer are similar. The crash report that is sent to Adode begins with EXCEPTION_ACCESS_VIOLATION and then tons of information. He is not familiar with EXCEPTION_ACCESS_VIOLATION and neither am I. Any general info to point him in the right direction, or this isn't enough info?
(By the way, I am aware of a commerical available script that does this for the Mac, but none for the PC.)
I ran the script and it stopped at Zapfino Extra EFX Ornaments. There was no error message and it didn't crash the program. It just stopped. I guessed that the problem was that the glyphs in the "1234567890" locations were too wide to fit on one line. So I added two spaces to the sample text, i.e., 123 4567 890, and re-ran the script. It continued to the end with no issues. So it looks as if a font problem might not be the issue with the script that crashes InDesign that is the subject of this message.
One more piece of info regarding the script that crashes InDesign. On my computer, if I remove one font anywhere before the crash point and re-run the script it crashes at one font past the previous crash point. If I remove two fonts, it crashes at two fonts past the original crash point. So it's like the script has a maximum number of fonts it can deal with, and when it reaches that number, it crashes InDesign. I stress "on my computer" because my colleague in Brazil can run the script past this "choke point" without a problem.
If your script gets the collection of all the fonts like this:
var allFonts = app.fonts;
try change it like so:
var allFonts = app.fonts.everyItem().getElements();
Much less overload and more faster!
The script @homeboy4 is talking about is mine.
It's the one I mention here: https://community.adobe.com/t5/indesign/scripting-fonts/td-p/11287777
I can deal with the error in that forum thread, but, now, Alan's InDesign is crashing. I ran the script fine, reading more than 2500 fonts and it worked to the end with no errors. He has 1640 and the app crashes after 1400 and something. Really don't know why. He also has no memory issues (96Gb).
Also, I tried both yours and John P. Morrissey's scripts to create font reports. John's stopped in the font I mentioned in the thread I link above. Yours too. Same error.
I think this is a font issue. But re-checking if its status is INSTALLED, the script works.
And yes, I'm getting the fonts using app.fonts.everyItem().getElements();
Much much faster (impressive).
I saw that post. I tried to play with the font in question and something really strange happens with it: I installed it into the Windows/fonts folder but a copy was automatically created in my user's folder, and it was the copy used by InDesign. And indeed, app.fonts sees it as regular instead of medium. I tried to generate correct names in FontLab (pure academic interest) and re-export the font, but it didn't solve the problem.