0
More Scripting Hooks
Adobe Employee
,
/t5/after-effects-beta-discussions/more-scripting-hooks/td-p/14083457
Sep 13, 2023
Sep 13, 2023
Copy link to clipboard
Copied
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
You can read the updated docs here: https://ae-scripting.docsforadobe.dev/introduction/changelog.html.
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
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Douglas_Waterfall
AUTHOR
Adobe Employee
,
LATEST
/t5/after-effects-beta-discussions/more-scripting-hooks/m-p/14382341#M3309
Jan 26, 2024
Jan 26, 2024
Copy link to clipboard
Copied
These APIs have been promoted out of beta and will appear in the upcoming 24.2 release.
Douglas Waterfall
After Effects Engineering
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

