Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #3683

Re: otf/ttf to afm with kern pair adjustments

Newsgroups comp.lang.postscript
Date 2021-09-30 10:02 -0700
References <1c5cc337-1238-4e92-9649-3ce56166a2b8n@googlegroups.com> <MPG.3bbbdae31659aa5f9898cd@usenet.plus.net>
Message-ID <e9ef8c45-fd6c-443f-b2ce-3e77dc34fb95n@googlegroups.com> (permalink)
Subject Re: otf/ttf to afm with kern pair adjustments
From "dougLas.L.mc...@maiL.mil" <dougLas.L.mcaLLaster.civ@mail.mil>

Show all headers | View raw


On Tuesday, September 28, 2021 at 2:52:49 AM UTC-4, ken wrote:
> In article <1c5cc337-1238-4e92...@googlegroups.com>, 
> dougLas.L.mc...@mail.mil says...
> > I found below postscript program in ghostscript distro. 
> > I creates the AFM file but does not include the KPX data. 
> > Does any have a ps job which extracts the KPX data?
> The printafm.ps program doesn't actully extract any data from the font 
> at all. What it does is use the built-in font interpreter to interpret 
> the font data, and some standard PostScript to **create** soemthing akin 
> to an AFM file. THis means that it will work with any font type 
> supported by Ghostscript. 
> 
> Basically it does this by using the PostScript 'stringwidth' on a single 
> character to determine the horizontal (or vertical, for vertical writing 
> fonts) displaement of the glyph, and then turns the glyph description 
> into a path, and executes charpath pathbbox to determine the bounding 
> box. 
> 
> If you want actual data from the TrueType font you will need to write a 
> PostScript program to read and interpret TrueType/OpenType fonts 
> (bearing in mind that OpenType fonts can have CFF outline data). 
> 
> Presumably you want the kern table (I've no idea what KPX means in this 
> context) since you mention OpenType/TrueType fonts. 
> 
> To be frank, you would almost certainly be better off extracting that 
> with some other tool; writing a PostScript program to do it is perfectly 
> possible but probably not wise. 
> 
> 
> Ken
Thanks, Ken, for explaining what that printAFM.ps job actually does.
Yes, I am after the kern table.
Do you have any suggestions on what 'tool' would extract the kern table from a TTF or OTF font file?




Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

otf/ttf to afm with kern pair adjustments "dougLas.L.mc...@maiL.mil" <dougLas.L.mcaLLaster.civ@mail.mil> - 2021-09-26 13:41 -0700
  Re: otf/ttf to afm with kern pair adjustments ken <ken@spamcop.net> - 2021-09-28 07:52 +0100
    Re: otf/ttf to afm with kern pair adjustments "dougLas.L.mc...@maiL.mil" <dougLas.L.mcaLLaster.civ@mail.mil> - 2021-09-30 10:02 -0700
      Re: otf/ttf to afm with kern pair adjustments ken <ken@spamcop.net> - 2021-10-01 07:54 +0100

csiph-web