Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: How do I find the font for a specific character in a textItem?

$
0
0

I can't quite figure out the try for this, I've wrapped this in a few ifs as well, which as my knowledge of PS scripting, and Javascript isn't vast at this point, may seem like terrible ideas, but that's how I learn!

 

        try{styleDesc.getObjectValue(stringIDToTypeID('fontPostScriptName')) != undefined}
        catch(e){
            var aFont = styleDesc.getString(stringIDToTypeID('fontPostScriptName'));
        }

 

Below are additional statements I tried, but I'm sure they don't follow the correct syntax:

try{styleDesc.getByName('fontPostScriptName')}

try{fontPostScriptName in styleDesc}

try{styleDesc.getString(stringIDToTypeID('fontPostScriptName')))

try{styleDesc.hasOwnProperty('fontPostScriptName'}

 

As well as a few others, but nothing work, a few returned false for each fi

 

I was also encountering the following error:

Capture.PNG

I can send the file with the error in it if needed, but I'm a bit stumped at this point. Even searching for error #8500, wasn't doing me any good.


Viewing all articles
Browse latest Browse all 27456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>