Font type return is nothing, while using missing fonts

Participant ,
Jun 09, 2021 Jun 09, 2021

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)
    }
}

 

 

Screen Shot 2021-06-10 at 11.00.49 am.png

 

Screen Shot 2021-06-10 at 11.00.07 am.png

 

Regards,

Selva

TOPICS
Scripting

Views

235

Likes

Translate

Translate

Report

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

Adobe Community Professional , Jun 10, 2021 Jun 10, 2021
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...

Likes

Translate

Translate
Enthusiast ,
Jun 10, 2021 Jun 10, 2021

Copy link to clipboard

Copied

Please attach a sample data occur error.

Likes

Translate

Translate

Report

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
Participant ,
Jun 10, 2021 Jun 10, 2021

Copy link to clipboard

Copied

Hi,

Here is the attachment.

 

Screen Shot 2021-06-10 at 1.47.11 pm.png

Helvetica (T1) Medium

 

 

 

 

Thanks,

Selva

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jun 10, 2021 Jun 10, 2021

Copy link to clipboard

Copied

Attach a sample InDesign document.

One paragraph with the missing fonts is sufficient.

 

Thanks,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

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
Participant ,
Jun 10, 2021 Jun 10, 2021

Copy link to clipboard

Copied

Hi,

The document is attached with this request.

 

 

Thanks,

Selva

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jun 10, 2021 Jun 10, 2021

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 )

Likes

Translate

Translate

Report

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
Participant ,
Jun 10, 2021 Jun 10, 2021

Copy link to clipboard

Copied

LATEST

Hi Uwe,

Nice info, thanks for the analysis related to this request. 

 

 

 

 

Regards,

Selva

Likes

Translate

Translate

Report

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