Skip to main content
Adobe Employee
September 13, 2023
Question

More Scripting Hooks

  • September 13, 2023
  • 1 reply
  • 428 views
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
This topic has been closed for replies.

1 reply

Adobe Employee
January 26, 2024

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

 

Douglas Waterfall

After Effects Engineering