Skip to main content
Sébastien Périer17107209
Community Manager
Community Manager
August 21, 2023
Question

New Text Scripting Hooks for Font Replacement

  • August 21, 2023
  • 1 reply
  • 2060 views
Hi everyone,

 

We're happy to announce that starting in Beta build 24.0x37, we have added 2 new scripting hooks, one to get the fonts being used in the project, and the other one to replace fonts.

 

You can check their respective documentation here:
 
Please remember that these scripting hooks are currently in Beta and are subject to change.

 

We've also created a demo script panel that exercises these new hooks to recreate the Font Replace experience from Premiere Pro. 
 

The script is attached to this post, but you must rename the file's extension from .jsx.txt to .jsx to run it inside AE. It is also available GitHub here: https://github.com/AdobeDocs/after-effects/blob/main/samples/ReplaceFontsInProject_ScriptUISample.jsx

 

We're excited to see what you'll be able to do with these new hooks and to hear any feedback you may have!

1 reply

ru_izw
Participant
August 22, 2023
>This operation is a complete and precise replacement, even on TextDocuments which have mixed styling,
replaceFont() is the behavior I was hoping for.
I would also like to see replacements on a per text layer basis.
 

I have created my own font replacement tool on a per-text-layer basis like this one.

  1. I would like to have a replaceFont per layer.
    app.project.item(index).layer(index).replaceFont(fromFont, toFont)