Article View: adobe.postscript.programming
Article #125Re: Auto-kerning
From: Jeffrey H. Coffield
Date: Fri, 14 Nov 2008 02:45
Date: Fri, 14 Nov 2008 02:45
34 lines
2551 bytes
2551 bytes
jdaw1 wrote:
>> Here is one public source for the kern table.
>>
>> http://ctan.binkerton.com/macros/text1/compugraphics_8600/etb.fontinfo
>
> Wow, thank you. Do you know in what units are the kerning? That is,
> the line
>> kern W+A -54/10
> means I kern by -5.4 points at what point size?
On digging deeper (you got me curious) I realized that what you need is
the .afm (Adobe Font Metric) file. Putting that into Google leads to this:
http://github.com/sandal/prawn/tree/57cbf8cdb7df0108c7a8d0499937844d07ee4a26/data/fonts/Times-Bold.afm
The relevant entry here is KPX W A -120. This is in a 1000 unit
coordinate space like the rest of the font info so for a 100 point font
I get -120/1000 * 100 = -12.
This piece of postscript looks pretty good to me:
/Times-Bold 100 selectfont
100 100 moveto
{= = -12.0 0 rmoveto} (WA) kshow
showpage
Obviously some work would need to be done to convert the info in the
.afm file into what kshow needs. (I do Postscript on a contract
programming basis.)
Jeff Coffield
www.digitalsynergyinc.com
Technical Details
Message-ID:
<5D5Tk.10513$Ws1.8102@nlpi064.nbdc.sbc.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!flpi089.ffdc.sbc.com!prodigy.net!flpi088.ffdc.sbc.com!prodigy.com!flpi107.ffdc.sbc.com!nlpi064.nbdc.sbc.com.POSTED!cbb6f965!not-for-mailReferences:
<32846ea9-dbe5-46b5-9f01-efaae5c1998e@a26g2000prf.googlegroups.com> <GGXSk.6409$x%.1907@nlpi070.nbdc.sbc.com> <84895d69-712d-4b7d-ad09-58c9858909ea@d10g2000pra.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10c61a,c44b798dae02ef90 X-Google-Attributes: gid10c61a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!flpi089.ffdc.sbc.com!prodigy.net!flpi088.ffdc.sbc.com!prodigy.com!flpi107.ffdc.sbc.com!nlpi064.nbdc.sbc.com.POSTED!cbb6f965!not-for-mail From: "Jeffrey H. Coffield" <jeffrey@digitalsynergyinc.com> User-Agent: Thunderbird 2.0.0.17 (X11/20080922) MIME-Version: 1.0 Newsgroups: adobe.postscript.programming Subject: Re: Auto-kerning References: <32846ea9-dbe5-46b5-9f01-efaae5c1998e@a26g2000prf.googlegroups.com> <GGXSk.6409$x%.1907@nlpi070.nbdc.sbc.com> <84895d69-712d-4b7d-ad09-58c9858909ea@d10g2000pra.googlegroups.com> In-Reply-To: <84895d69-712d-4b7d-ad09-58c9858909ea@d10g2000pra.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Lines: 34 Message-ID: <5D5Tk.10513$Ws1.8102@nlpi064.nbdc.sbc.com> NNTP-Posting-Host: 216.103.32.162 X-Complaints-To: abuse@prodigy.net X-Trace: nlpi064.nbdc.sbc.com 1226630721 ST000 216.103.32.162 (Thu, 13 Nov 2008 21:45:21 EST) NNTP-Posting-Date: Thu, 13 Nov 2008 21:45:21 EST Organization: at&t http://my.att.net/ X-UserInfo1: [[OURY_ESJTYBPXYNCOF_W\@PJ_^PBQLGPQRZ_MHEQR@ETUCCNSKQFCY@TXDX_WHSVB]ZEJLSNY\^J[CUVSA_QLFC^RQHUPH[P[NRWCCMLSNPOD_ESALHUK@TDFUZHBLJ\XGKL^NXA\EVHSP[D_C^B_^JCX^W]CHBAX]POG@SSAZQ\LE[DCNMUPG_VSC@VJM Date: Thu, 13 Nov 2008 18:45:10 -0800