🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #9591

[AS] Kerning Value and Method

#9591
From: David_Markowicz
Date: Fri, 18 Aug 2006 14:39
16 lines
1827 bytes
Is it possible to get the Kerning Method and/or Kerning Value of a character and then display it in a Display Dialog command? I have tried several different approaches to this such as something like this

...some code....
set theContents to (contents of parent story) of item 1
set theCharacter to the last character of theContents
set kerningValue to the kerning value of theCharacter
set kerningMethod to the kerning method of theCharater
...some code...

And yet as far as I can determine the kerning items are not being set in the variables, InDesign throws an error stating it can not make result into string. It seems to set the last character of the text just fine, I can do a display dialog theCharacter and it shows the correct thing so I am at a bit of a lose right now and wondering if anyone had some input on to how to get these values. The end result is so I can account for the bug in CS1 that if the last character of text in a single line text frame has a negative kerning or tracking and you do a fit frame to content I can have it not create a false overset text. Basically have the script determine that the kern of that character is less than 0 and have the user manually adjust the frame to avoid that

Any ideas are welcome

Thanks a bunch

Dave
Technical Details
Message-ID: <3bc14edc.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!news.ecp.fr!news.stben.net!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,374339e236eddaeb,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: David_Markowicz@adobeforums.com
Newsgroups: adobe.scripting.indesign
Subject: [AS] Kerning Value and Method
Message-ID: <3bc14edc.-1@webcrossing.la2eafNXanI>
Date: Fri, 18 Aug 2006 07:39:20 -0700
Lines: 28
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!news.ecp.fr!news.stben.net!webcrossing