Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
12

InDesign Font API, Favourites?

Contributor ,
Dec 14, 2023 Dec 14, 2023

So I have finally been annoyed long enough that I have begun looking into what can be done about a pet peeve of mine: Apple's insistence on shipping more and more useless fonts as part of macOS, no longer making it possible to disable/remove them, and Adobe's seeming refusal to put in system font filters in their applications (which surely every user ever must want?).

 

In an old thread I saw the suggestion to use font favourites to hide system fonts. I actually had never noticed that this existed in the Adobe applications, but at least that is a start! But although almost everything in InDesign is scriptable (Illustrator is a much sadder state last I looked…), as far as I can tell font favourites is not exposed anywhere in the API?

 

Then I started looking at the C++ plug-in API. Never written a proper plug-in before, but what the hell, how difficult can it be. Searching through the SDK documentation I can't find font favourites exposed anywhere here, either? Not on the IFontMgr, nor an IFontInstance, or an IPMFont.

 

There is an IFontMgr.DeleteFont() method, which ought to permanently remove the font until InDesign is restarted. This particular method has zero documentation though, so presumably Adobe doesn't really intend for anyone but themselves to use it…

TOPICS
Scripting , SDK , UXP Scripting
491
Translate
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
Community Expert ,
Dec 23, 2023 Dec 23, 2023

Can you not disable them in Font Book?

 

Open Font Book:

  1. Click on the Finder icon in the Dock.
  2. In the Finder window, type /System/Library/Fonts in the Search field and press Enter.
  3. The Font Book application will open.

 

Locate the fonts you want to disable:

  1. In the Font Book window, scroll through the list of fonts.
  2. The fonts that are installed by macOS are typically located in the System Fonts folder.

     

     

 

Disable the fonts:

  1. Select the fonts you want to disable.
  2. Click on the Edit menu and select Disable Fonts.
  3. A confirmation dialog will appear. Click Disable to disable the selected fonts.

 

Relaunch applications:

  1. Close the Font Book application.
  2. Relaunch any applications that use fonts, such as InDesign, Photoshop, or Microsoft Office.
Translate
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
Contributor ,
Dec 23, 2023 Dec 23, 2023

No, it is not possible. In previous versions of macOS there were various ways to disable some system fonts. Since the release of macOS 13, it is no longer possible to disable any of them. You are stuck with hundreds of useless fonts cluttering up the font menu.

 

http://www.jklstudios.com/

Translate
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
Community Expert ,
Dec 23, 2023 Dec 23, 2023
Translate
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
Contributor ,
Dec 23, 2023 Dec 23, 2023

What do you not get? Why Apple would make such a dumb decision? Because the Apple support article you're linking to says the exact same thing that I am:

 

Important: You can’t remove or deactivate system fonts. See the Apple Support article Fonts included with macOS Sonoma.

Translate
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
Community Expert ,
Dec 23, 2023 Dec 23, 2023

Hi @Mayhem SWE , I’ve always found Kurt Lang’s MacOS and Mac OSX system font guides useful—see the section on required fonts and the MacOS supplemental folder:

 

http://www.jklstudios.com/

 

Mac OSX

http://www.jklstudios.com/misc/OldArticle2/

 

Translate
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
Contributor ,
Dec 23, 2023 Dec 23, 2023

If you look a few posts up, you'll see that I already linked to that exact page, and if you were to read that page, it says exactly what I've been saying since my first post in this thread – any fonts installed in the system folder can no longer (since macOS 13) be disabled…

Translate
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
Community Expert ,
Dec 23, 2023 Dec 23, 2023

Windows is the same. Why Western users need dozens and dozens of Asian fonts perma-nabled (including some very obscure ones), along with the legions of other world fonts, is a mystery to me. I have yet to see a convincing reason (technical, user or "global community") from either OS maker as to why these hundreds of fonts are included by default on all installations without any ability to sort and at least hide them.

Translate
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
Community Expert ,
Dec 23, 2023 Dec 23, 2023

Very odd. Surprised by this. Won't be back at the Mac til the new year

 

quote

If you look a few posts up, you'll see that I already linked to that exact page, and if you were to read that page, it says exactly what I've been saying since my first post in this thread – any fonts installed in the system folder can no longer (since macOS 13) be disabled…


By @Mayhem SWE

 

Translate
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
Community Expert ,
Dec 24, 2023 Dec 24, 2023
LATEST

 

Never written a proper plug-in before, but what the hell, how difficult can it be.

 

On the scripting side you could build your own font panel and skip the system’s required fonts (there nothing in the JS API that lets you alter the application panels). A simple example would be a dialog dropdown. This creates a dropdown that skips Apple’s Systen and Supplemental font folders, and Adobe’s CC2024 required fonts:

 

 

 

 

makeDialog();
var fnt;
function makeDialog(){
    var d = app.dialogs.add({name:"Choose a Font", canCancel:true});
    with(d){
            with(dialogColumns.add()){
                fnt = dropdowns.add({stringList:getFontList(), selectedIndex:0, minWidth:80});
            } 
        if(d.show()){
            fnt = getFontList()[fnt.selectedIndex];
            app.selection[0].appliedFont = app.fonts.itemByName(fnt)
            d.destroy();
        }
    }
}

/**
* Discription get a list of fonts
* Adobe Required InDesign CC2024:
*   /Applications/Adobe%20InDesign%202021/Resources/Required/fonts
* Adobe Cloud"
*   /Volumes
* System Fonts:
*   /System/Library/Fonts
* System Fonts Supplemental MacOS Ventura:
*   /System/Library/Fonts/Supplemental
* @ return Font name as an array 
*/
function getFontList(){
    var fa = []
    var afp = app.fonts.everyItem().getElements()
    var fp, fn;
    for (var i = 0; i < afp.length; i++){
        fp = File(afp[i].location);
        fn = afp[i].fontFamily
        //Get a list of font families that skips MacOS System fonts, Supplemental fonts and CC2024 Required
        if (fp.parent != "/System/Library/Fonts" && fp.parent != "/System/Library/Fonts/Supplemental" && fp.parent != "/Applications/Adobe%20InDesign%202024/Resources/Required/fonts") {
            if (!checkItem(fa, fn)) {
                fa.push(fn)
            }
        } 
    };   
    return fa
}

/**
* Checks if an item is in an array
* @ param the array to check 
* @ param the item to look for 
* @ return true if the item is in the array 
* 
*/
function checkItem(a, obj) {
    for (var i = 0; i < a.length; i++) {
        if (a[i] === obj) {
            return true;
        }
    }
    return false;
}

 

 

 

 

 

Screen Shot 4.pngScreen Shot 5.png

 

Translate
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