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

GetPostScriptFontName not working correctly with missing fonts

New Here ,
Dec 05, 2025 Dec 05, 2025
For quire some time this approach was working perfectly in our plugin:
 
sAIFont->GetPostScriptFontName(fontKey, postScriptName, 1024);
 
But recently in 29-30 version of Illustrastor it does not return anything when the fonts are missing. The font names are still returned correctly when the fonts are installed in the system. But if they are not, this returns an empty string and the result is an error. Other similar methods from AIFont are also not working correctly.
 
I have also tested it in the recent Illustrator Beta, with the same result.
 
Can someone explain what is happening and why this was somehow changed and how should it work now?
TOPICS
Scripting , SDK
247
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
Adobe
Community Expert ,
Dec 05, 2025 Dec 05, 2025

Hi @DominikLevitsky I'm not sure this is the best forum to ask about this. I think there are developer forums that might be better, or feedback on the beta version. I'm not sure where is the best place to post or who to tag. @Dirk Becker any ideas about this?

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
Mentor ,
Dec 06, 2025 Dec 06, 2025

Are you sure you got a font key at all? I already had problems using AIFont::FontKeyFromFont …

This likely is caused by the new feature that renders text with missing fonts using the subset embedded in the PDF side of the file, rather than the traditional pink.
Somewhere in prefs there might be a toggle to choose the old behaviour. I have not yet even tried to find it, plus figure out whether it works and via what SDK call, currently using something far more convoluted and waiting for a real fix.
A better place to raise such issues is the SDK section in prerelease, and the associated bugbase.

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
New Here ,
Dec 08, 2025 Dec 08, 2025

I am definitely getting font keys, because if the fonts are not missing the very same method returns all the font names absolutely correctly. Anyway, I'll try to post in the SDK forum.

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
Adobe Employee ,
Jan 07, 2026 Jan 07, 2026

@DominikLevitsky : This is most likely due to the recent feature that renders text with missing fonts with the embedded glyphs in the PDF. Now, in case of missing fonts, the fontkey will be null.

Could you please explain your workflow. From where are your getting the font key, is it from the selection ? Kindly share the details to let us help you further.

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
New Here ,
Jan 09, 2026 Jan 09, 2026
LATEST

I was getting the fonts on document open (kAIDocumentOpenedNotifier) like this:

.......

AIArtHandle textFrameArt = NULL;
result = sAIArtSet->IndexArtSet(textFrameArtSet, 0, &textFrameArt); aisdk::check_ai_error(result);
TextFrameRef textFrameRef = NULL;
result = sAITextFrame->GetATETextFrame(textFrameArt, &textFrameRef); aisdk::check_ai_error(result);

ATE::ITextFrame textFrame(textFrameRef);
ATE::IStory story = textFrame.GetStory();
ATE::IStories stories = story.GetStories();
ATE::ITextRanges textRanges = stories.GetTextRanges();
ATE::ICharInspector charInspector = textRanges.GetCharInspector();
ATE::IArrayFontRef fontRefArray = charInspector.GetFont();
ai::int32 fonts = fontRefArray.GetSize();

.......

ai::int32 i = 0;

while (i < fonts) {
    ATE::IFont currentFont = fontRefArray.Item(i);
    if (!currentFont.IsNull()) {
        FontRef fontRef = currentFont.GetRef();
        AIFontKey fontKey = NULL;
        result = sAIFont->FontKeyFromFont(fontRef, &fontKey); 
        aisdk::check_ai_error(result);

        char postScriptName[256];

        result = sAIFont->GetPostScriptFontName(fontKey, postScriptName, 256);
        aisdk::check_ai_error(result);
    }

    i++;
}

.......

 

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