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

Extendscript Text Casing/Font Problem

Explorer ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

Hi,

 

We use extendscript to composite thumbnails, and we're finding that there are odd failures where the text randomly has odd casing.

 

We can confirm that the whole Text Area actually has the correct Font and Text Parameters set on it, but for some reason that this could be happening? We're overwriting the text that exists previously, but it's very odd. 

 

If we re-run it again, it won't happen again.

 

nicholash68515175_0-1689113991776.png

 

TOPICS
Scripting

Views

293

Translate

Translate

Report

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 ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

Sigh. It did not change the case, it actually changed the font.

 

This is a known problem (well, I know about it) and has tripped me up in my own development testing.

 

What is happening behind the scenes is named here FontLocking where the code is trying to avoid the missing glyph problem.

 

During the paste operation (that is what Scripting is actually doing) the code takes the characters which are being pasted and asks the applied Font if it has defined glyphs for those character codes. If the Font does not, then the code switches to a fallback Font which will have the glyphs and thus avoiding a blank space/missing glyph.

 

The bug is that the code is often confused and thinks that the glyphs are missing when in fact they are present. This confusion is not deterministic which is why it comes and goes.

 

We are waiting on an integration of new code which we expect to fix this, I have no specific date to offer you.

 

Douglas Waterfall

After Effects Engineering

Votes

Translate

Translate

Report

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
Explorer ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

Wow! I wish I had asked this earlier as we have been wondering about this issue for a very long time.
Is there a workaround in this case for Font Locking? 

 

  • We haven't tested it but would setting the font again AFTER the `copy paste` operation fix this? I think we may have tested this internally but not 100% sure atm
  • As well, is there any scripting method which would allow us to catch these jobs programmatically? I believe `sourceText` will just say it's set correctly, so validating when building the comp won't work...
  • Do you happen to have a rough estimate of a date? 😃😃

 

And yes! It's very difficult to reproduce!! I was honestly surprised that there wasn't more issues open about this....

 

Thanks @Douglas_Waterfall 

Votes

Translate

Translate

Report

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 ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

No.

No.

No.

 

It is a bummer - I am sorry.

 

If it feels any better, I wasted a huge amount of time having this happen to me when I was developing the recent Font Server upgrade. Writing a simple script that exercised all the faces of a font (+ variable ones) with the text set to the PostScript name was strangely mixing the applied font up - that is why I know about this.

 

FontLocking is a "good" thing, but not when it is being done incorrectly.

 

Without any ability to find missing glyphs via scripting there is no way to know that something is missing after the "paste", without an API on the Font to ask if all the characters have glyphs, without per-character styling control there is no way to address true missing glyphs in your own away, and there is no control to in the TextDocument to disable FontLocking. All good ideas, eh?

 

All I can offer you at this point is the knowledge that you are not crazy, are not alone, and I am seeing what can be done.

 

Douglas Waterfall

After Effects Engineering

Votes

Translate

Translate

Report

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
Explorer ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

Awesome, and one last question!

You stated this is a copy and paste operation internally. Right now we're using `sourceText.setValue(textDocument)`. Is this the `copy and paste` operation? 

 

I think this is the only way to set font parameters on a `text` entry - which is important to us. Is there a different method that would avoid this internal copy and paste operation?

 

Thanks for all your hard work Doug! Alongside the clear communications!

Votes

Translate

Translate

Report

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
Explorer ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

And this is both present on Mac as well as Windows? (Currently using Windows)

Votes

Translate

Translate

Report

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 ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

Sorry for the confusion, I am a little looser in my terms when dealing with scripters because, well, we both code, eh?

 

First, there is no way around this - setValue(TextDocument) does what it does - you are stuck with this frustrating behavior.

 

Second, "paste" here is just the same thing which happens when you paste from the clipboard with raw text.  Scripting is simply making use of the same code and inherits the same policy of FontLocking from there.

 

It also is the same for just typing - if you select a Font and type a character which is not supported by it you will get FontLocking behavior. Since the behavior is flaky, it would be rather rare getting it during typing, but creating a lot of TextLayers with scripting makes it much more likely to be noticed.

 

Douglas Waterfall

After Effects Engineering

Votes

Translate

Translate

Report

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
Explorer ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

Hey Doug this is active on Windows & Mac equally?

Votes

Translate

Translate

Report

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 ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

I assume so, but as I work almost entirely on Mac I have not organically come across it during my rare moments on Windows.

 

Douglas Waterfall

After Effects Engineering

Votes

Translate

Translate

Report

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 ,
Sep 13, 2023 Sep 13, 2023

Copy link to clipboard

Copied

We have finally integrated a fix to this FontLocking bug in the latest 24.1 beta build. I forget the specific number, but whatever beta build available from the CC app has the change.

 

As I may have mentioned, it was super annoying to me as well during my work and I am happy to report it stopped doing it. Yay!

 

If you are able to use a beta build in your workflow, I would appreciate knowing if your difficulties with this have also gone away.

 

Douglas Waterfall

After Effects Engineering

Votes

Translate

Translate

Report

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
Explorer ,
Sep 19, 2023 Sep 19, 2023

Copy link to clipboard

Copied

W000t!

This is amazing news @Douglas_Waterfall !

Thank you so much! We're going to be implementing this update right away!

We also have another question - maybe it might be up your alley? Getting Post Script Font Names for all System Fonts 

Votes

Translate

Translate

Report

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
Explorer ,
Nov 10, 2023 Nov 10, 2023

Copy link to clipboard

Copied

Hey @Douglas_Waterfall how do the AE builds/releases work?

How will we know when it's released in in a main build w/ aerender?

Votes

Translate

Translate

Report

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 ,
Nov 11, 2023 Nov 11, 2023

Copy link to clipboard

Copied

Release 24.1 will appear in the Creative Cloud app sometime...soon, you will just have to keep your eye out for it.

 

We have internally seen cases of this FontLocking failure still occuring, but at a dramatically lower rate, so there is more for us to investigate here. If you see issues please let us know here.

 

Douglas Waterfall

After Effects Engineering

Votes

Translate

Translate

Report

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
Explorer ,
Jan 08, 2024 Jan 08, 2024

Copy link to clipboard

Copied

Hi @Douglas_Waterfall,

Following up and checking in on this. We've installed AE Beta 24.2, I expect the changes w would be on there as well and wouldn't have been removed.

Reason we're asking is because we installed AE Beta 24.2 (and are using the aerender.exe) and we're seeing lots of font-locking issues at scale.

Some questions: 

* Would rebuilding the base .aep file from scratch help? We're just replacing the text in an existing box, so maybe there's an issue in there?
* Would setting the base font to something else help?

We're kinda getting stuck for options 🙂 QA'ing these manually is causing us some issues.

Happy New Year!

Votes

Translate

Translate

Report

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 ,
Apr 19, 2024 Apr 19, 2024

Copy link to clipboard

Copied

LATEST

Can you install the latest version of After Effects and see if the issue persists?

Let us know. I am moving this thread from Bugs to Discussions for now.

 

Thanks,

Nishu

Votes

Translate

Translate

Report

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