Well, if you know what kerning or tracking values you're looking for, you can do a findText()
If you don't, and you need to cycle through a lot of text, the quickest way is to use textStyleRange because you know that any given textStyleRange has the same kerning and tracking, so you don't need to check each character individually.
Thanks for your reply, i'm not sure about the kerning value to find, it should grep something like if its not a zero.. do we have any other method to catch this?
@Arivusudar – as Ariel already pointed out: there are textStyleRanges for every change that is made with formatting.
A textStyleRange consists of uniform formatting texts.
To proceed it's important to know what you want exactly. I'm not sure at all…
For every text in your document:
Do you want weed out "manual" kerning? And set the kerning method to "metrics"? Or to "optical"?
Resetting kerning to "manual" with value "0" is no good idea!
See screenshot here:
Please describe what you want to do after you found "manual" kerning that is not of value "0".
For setting all stories to metrics or optical you could use one of the following lines of code:
app.documents.stories.everyItem().kerningMethod = "$ID/Metrics"; app.documents.stories.everyItem().kerningMethod = "$ID/Optical";
This could override existing values in applied paragraph styles or character styles, of course.
Thanks for your reply, this will help me to sort out the issue, and do we have any option to set kerning value if it reaches more than -200 something like that..because, basically what I'm looking for is, for special character like accent, we are using two characters with kerning method to show as single character, but that's the wrong method in InDesign if we have the single character in build, so I need catch all the kerning combination characters..
I apologize this seems to be running away from my knowledge. I know you can use GREP to search for a lot but this may be a scripting request. I've tried searching for "GREP search for kerning value" but not much comes up that doesn't suggest needing a script or kerning tables. Good Luck.