Page 2 of 2

Re: Font search

Posted: October 13th, 2010, 12:00 pm
by Paul Tuersley
It isn't possible for scripts to create multiple text styles within a single text layer in this way.

Re: Font search

Posted: October 13th, 2010, 12:07 pm
by sbaden
Thanks Paul- I was afraid of that. :(

Will the sourceRectAtTime determine the width of a pre-comp's alpha or does it just give you the width of the comp itself?

Re: Font search

Posted: October 13th, 2010, 12:46 pm
by Paul Tuersley
I think it's just the layer bounds, not the alpha.

Re: Font search

Posted: October 13th, 2010, 12:47 pm
by sbaden
Thanks Paul :)

Re: Font search

Posted: February 10th, 2011, 8:03 pm
by vfxman
Hey Paul,

I just started venturing into a font search script that works right now, but I ran across a hiccup and during my search for an answer, found this thread. I noticed a few post ago in this thread someone was trying to set multiple fonts within one text layer and you have answered that it isn't possible yet. My question is, is it possible yet to at least read multiple fonts in one text layer. My guess is no, based on your previous answer, but thought I would ask. :)

Re: Font search

Posted: February 11th, 2011, 6:21 am
by Paul Tuersley
Hi David,

Nothing major has changed in this area since CS4, so as far as I know it still isn't possible, and I doubt it ever will be. I can't even imagine how it could be implemented. You'd need some way of querying the style of every single character on a text layer. At the moment, it just appears to return the style of the first character.

If there is a different style on each keyframe you could read those, but not multiple styles on one keyframe.

I guess you already know about my pt_TextEdit script? That already lets you find the fonts used in a project, barring the limitations I've just mentioned. http://aescripts.com/pt_textedit/

Paul

Re: Font search

Posted: February 11th, 2011, 3:33 pm
by vfxman
I figured as much, but thought I'd ask. :)

I was able to query the first line of text when I was testing a few days ago and I was seeing that only the first line of text was accessible via scripts. I had made a single text layer with three lines of text, each line a different font and I was able to get the font, character length and character by index, but only up to the first carriage return. Nothing else seems readable after that.

I am familiar with your pt_textedit script, nicely done by the way. I am actually adding the "fonts used in project" functionality to my ProjectInfoListExporter v2 script. I'm trying to give the user access to as much project info as possible. My first release limited the info to just the assets, the new version will have that plus fonts, effects and render queue. Guess I'll be submitting a feature request to Adobe for multi font script queries. :) Thanks again for the info.

Re: Font search

Posted: February 12th, 2011, 7:38 am
by Paul Tuersley
You should be able to read all the lines of the actual text, but the font and other values do seem to just come from the first character.

You wouldn't be able to 100% guarantee that you've listed all fonts used in a project. Even if you checked the font used on every keyframe, it would still miss fonts that were never used on the first character of a text layer. While this scenario seems unlikely, I'm often surprised by how regularly things I think unlikely do actually happen in real world situations.