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

More Scripting Hooks

Adobe Employee ,
Sep 13, 2023 Sep 13, 2023
Hi.

In build (24.1x10), we have revealed a few new esoteric scripting hooks useful for managing fonts and understanding changes to the font environment. We expect them to be of interest to a small number of scripters who might be tempted to provide alternate views of the font environment.
 
  • app.fonts.fontServerRevision
  • app.fonts.getFontByID
  • FontObject.fontID
 
 
The latter two will benefit from a short explanation.
 
Every underlying native Font instance at runtime is assigned a unsigned integer ID when it is created. This value is now exposed as a read only property on FontObject as fontID. The ID is never re-used in the same app session when the native Font instance is deleted. This value is only valid as long as the app is running (so do not bother saving it to disk).
 
You can now use this fontID to retrieve the font via the app.fonts.getFontByID() function.
 
Why might this be interesting? Well, if you were struggling to maintain a list of fonts in your script by using the PostScript name, technology, writing script, etc it is a bit of pain (I know - which is why I created the fontID internally) to be sure that it was the same font in the presence of duplicates. So now you can just remember the fontID and be able to find it again (if it still exists of course).
 
Remember, these scripting hooks are currently in Beta and are subject to change.
 
Douglas Waterfall
After Effects Engineering
TOPICS
Feature request
339
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 26, 2024 Jan 26, 2024
LATEST

These APIs have been promoted out of beta and will appear in the upcoming 24.2 release.

 

Douglas Waterfall

After Effects Engineering

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