Copy link to clipboard
Copied
Hi All,
While using the document with the missing fonts, the font type does not return the code. If no missing fonts, it's working fine. Please guide me if any alternative to collect the font type with missing fonts.
var myUsedFonts = app.activeDocument.fonts.everyItem().getElements(); var FontNameArray = [];
for(var m=0; m<myUsedFonts.length; m++){
var myFontType = myUsedFonts[m].fontType; // If font missing, not working this line.
//try{var myFontType = myUsedFonts[m].fontType;}catch(e){var myFontType = "Nothing"}
var myFontName = myUsedFonts[m].name;
if((myFontType==1718899761)||(String(myFontType)=="TYPE_1")){
FontNameArray.push(newfontname)
}
}
 
Regards,
Selva
Hi Selva,
this information is not shared with the scripting DOM.
You have to read out an IDML file for that.
Resources > Fonts.xml
Here an example line from the Fonts.xml file:
<Font Name="Helvetica Medium" Self="difdFontnHelvetica Medium" TypekitID="$ID/" Version="003.001" PlatformName="$ID/" FontStyleNameNative="$ID/Medium" FullNameNative="Helvetica" FullName="Helvetica" WritingScript="0" FontType="Type1" FontStyleName="Medium" Status="Substituted" PostScriptName="Helvetica" FontFamily="He
...
Copy link to clipboard
Copied
Please attach a sample data occur error.
Copy link to clipboard
Copied
Hi,
Here is the attachment.
 
Helvetica (T1) Medium
Thanks,
Selva
Copy link to clipboard
Copied
Attach a sample InDesign document.
One paragraph with the missing fonts is sufficient.
Thanks,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi Selva,
this information is not shared with the scripting DOM.
You have to read out an IDML file for that.
Resources > Fonts.xml
Here an example line from the Fonts.xml file:
<Font Name="Helvetica Medium" Self="difdFontnHelvetica Medium" TypekitID="$ID/" Version="003.001" PlatformName="$ID/" FontStyleNameNative="$ID/Medium" FullNameNative="Helvetica" FullName="Helvetica" WritingScript="0" FontType="Type1" FontStyleName="Medium" Status="Substituted" PostScriptName="Helvetica" FontFamily="Helvetica"/>
FWIW: IDMS is not working for that purpose.
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Hi Uwe,
Nice info, thanks for the analysis related to this request.
Regards,
Selva