Copy link to clipboard
Copied
There is a function that I have been using that works from cs to cs4 now with cs5 it does not error it just doesn't find all the missing fonts. If anyone is willing to take a crack at this it would be very helpful. Here is the function:
function myCheckFont(currFile){
numMissingFonts=0;
docFonts=app.activeDocument.fonts.everyItem().name;
appFonts=app.fonts.everyItem().name.join('');
var numFont = myDocument.fonts.length;
myFile.write("MISSING FONTS: ");
for (var loopvar=0; loopvar<docFonts.length; loopvar++){
if (appFonts.match(RegExp(docFonts[loopvar]))==null){
if (myDocument.fonts.item(loopvar).status=="1718832705"){
if (numMissingFonts==0){
myFile.write(docFonts[loopvar]);
numMissingFonts=numMissingFonts+1;
}
else{
myFile.write(", "+docFonts[loopvar]);
numMissingFonts=numMissingFonts+1;
}
}
}
}
if (numMissingFonts==0)
myFile.write("none");
myFile.writeln("");
return [numMissingFonts];
Copy link to clipboard
Copied
I thought it might be a different status number but its the same in 5. 1718832705
Copy link to clipboard
Copied
Hi
I run this script to same documents both CS4 and CS5,
and insert the snippet to check status.
$.writeln(app.activeDocument.fonts.item(loopvar).status);
font status return differnt value!
CS4
missing OpenType Fonts => 1718832705
missing Composite Fonts => 1718834037
CS5
missing CpenType Fonts => SUBSTITUTED (1718834037)
missing Composite Fonts => SUBSTITUTED (1718834037)