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


Groups > comp.lang.postscript > #2262

How change character Metrics?

From Martin Leese <please@see.Web.for.e-mail.INVALID>
Newsgroups comp.lang.postscript
Subject How change character Metrics?
Date 2015-05-13 18:48 -0600
Organization A noiseless patient Spider
Message-ID <mj0rb8$qbb$1@dont-email.me> (permalink)

Show all headers | View raw


Hi,

I want to close up the characters in some
text, and can not work out how to do this.
There will be text at many different
orientations, so I decided that to do this
in the character coordinate system would be
preferred.  This looks like a job for the
Metrics dictionary inside the font
dictionary.

I have never tried kerning before;
suggestions for alternative approaches
would be welcome.

Here is the PostScript I have:

%!
% PostScript code to test kerning of font.
%
/tempMetrics 2 dict def
tempMetrics /S [0.0 0.5] put
tempMetrics /P [0.0 0.5] put

/CenturySchL-Bold findfont 20 dict copy dup /Metrics tempMetrics put 22 
scalefont setfont
100 100 moveto (SPAM) show
showpage

In Ghostscript, this gives:
     Error: /invalidfont in --scalefont--

If I replace the line above with:
     /CenturySchL-Bold findfont 22 scalefont setfont
then it works fine.

If I replace the line above with:
     /CenturySchL-Bold findfont 20 dict copy 22 scalefont setfont
then it fails with the same Error.

I copy the existing font into a new dict
because if I use dup then the font is
readonly and the put generates an error.  I
create an empty dict of 20 key value pairs
because that is the maxlength of the font
dictionary I am copying.

Many thanks for any advice you can give.

-- 
Regards,
Martin Leese
E-mail: please@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/

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


Thread

How change character Metrics? Martin Leese <please@see.Web.for.e-mail.INVALID> - 2015-05-13 18:48 -0600
  Re: How change character Metrics? luser- -droog <mijoryx@yahoo.com> - 2015-05-13 23:50 -0700
    Re: How change character Metrics? Martin Leese <please@see.Web.for.e-mail.INVALID> - 2015-05-14 11:26 -0600
      Re: How change character Metrics? Martin Leese <please@see.Web.for.e-mail.INVALID> - 2015-05-14 15:45 -0600
        Re: How change character Metrics? Martin Leese <please@see.Web.for.e-mail.INVALID> - 2015-05-15 09:24 -0600
  Re: How change character Metrics? ken <ken@spamcop.net> - 2015-05-14 07:56 +0100
    Re: How change character Metrics? Martin Leese <please@see.Web.for.e-mail.INVALID> - 2015-05-14 11:52 -0600

csiph-web