🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20239

Re: Horizontal scaling in InDesign multi-line composer

#20239
From: Olav Kvern
Date: Wed, 31 Jul 2002 19:09
22 lines
1710 bytes
Adam-- 

There's no direct way to do this--it's one of the composer's little secrets.<g> 

But you can calculate the percentage using "out of the box" thinking (i.e., sleazy hacking<g>). I don't know what platform you're using, but the following approach (in pseudocode) would work: 

myX1 = horizontal offset of the character 
myX2 = the horizontal offset of the insertion point following the character 
characterWidth1 = myX2-myX1 
set glyph scaling for the paragraph to 0, 0, 0 
characterWidth2 = measure the character width again 
scaling percentage = characterWidth1/characterWidth2 
undo to revert to the original glyph scaling settings 
 

Glyph scaling will be the same for all characters in a line. 

I do hate any/all glyph scaling, but the above exercise is kinda fun.<g> 

Thanks, 

Ole
Technical Details
Message-ID: <ef9f499.0@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!sn-xit-08!supernews.com!feed.textport.net!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <D44284DDE891D4FDB65955B14365DC58@in.WebX.aaQKaf7vad4>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,705f2a9e5dc8a3c4
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-07-31 12:42:00 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!sn-xit-08!supernews.com!feed.textport.net!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Horizontal scaling in InDesign multi-line composer
Message-ID: <ef9f499.0@WebX.aaQKaf7vad4>
Date: Wed, 31 Jul 2002 12:09:03 -0700
References: <D44284DDE891D4FDB65955B14365DC58@in.WebX.aaQKaf7vad4>
Lines: 27
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit