aws-deadline / deadline-cloud-for-after-effects

AWS Deadline Cloud for After Effects
Apache License 2.0
8 stars 9 forks source link

Bug: Fonts installed with Adobe CC Desktop App don't come across with the After Effects submission #45

Open Ahuge opened 5 months ago

Ahuge commented 5 months ago

Expected Behaviour

When using fonts from Adobe CC Desktop app in my After Effects scene, I would expect Deadline Cloud to render out using those custom fonts.

Current Behaviour

The After Effects render from Deadline Cloud does not use the custom fonts and instead falls back to a builtin font.

Reproduction Steps

We utilize the Typekit fonts from Adobe in our After Effects renders and when we submit the AE job to Deadline Cloud, the fonts don't come along and the render is completed with the wrong font :(

You should be able to create a blank render with a custom font from Adobe Fonts and then try to submit that. It will come back without the correct font rendered in

Code Snippet

This is probably more complex than it initially looks.

Adobe seems to install the fonts to C:\Users\<your user name>\AppData\Roaming\Adobe\CoreSync\plugins\livetype\r with custom non human readable names. These fonts apparently will come down just in time if the after effects instance is logged in to Adobe Creative Cloud but if you launch AfterEffects as a render only node, it does not appear to implement that.

I have yet to test if including these as job attachments would work, or if we have to install them as system fonts on the worker.

Some links I've found:

Ahuge commented 5 months ago

Here is a code snippet to get the used Fonts in the scene:

if (parseInt(app.version[0] + app.version[1]) >= 24) {
    alert("New style API");
    var usedList = app.project.usedFonts;
    if (usedList.length) {
        var font = usedList[0].font;
        var usedAt = usedList[0].usedAt;
        var firstFontFamilyName = font.familyName;
        var firstFamilyStyle = font.styleName;
        var str = firstFontFamilyName+" "+firstFamilyStyle + ": " + font.location + "\n";
        alert(str);
    }
} else {
    alert("Old style API");
    var items = app.project.items;
    for (var i = items.length; i >= 1; i--) {
        var myItem = app.project.item(i);
        if ((myItem instanceof CompItem)) {
            for (var j = myItem.layers.length; j >= 1; j--) {
                var myLayer = myItem.layers[j];
                if (myLayer instanceof TextLayer){
                    var textDocument = myLayer.text.sourceText.value;
                    var fontLocation = textDocument.fontLocation;
                    var fontFamily = textDocument.fontFamily;
                    var fontStyle = textDocument.fontStyle;
                    var str = fontFamily+" "+fontStyle + ": " + fontLocation+ "\n";
                    alert(str);
                }
            }
        }
    }
}