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


Groups > comp.lang.postscript > #879

Re: Is it possible to replace 1 custom character in a font??

From dkcombs@panix.com (David Combs)
Newsgroups comp.lang.postscript
Subject Re: Is it possible to replace 1 custom character in a font??
Date 2012-08-13 13:15 +0000
Organization Public Access Networks Corp.
Message-ID <k0aul4$lm9$1@reader1.panix.com> (permalink)
References <ae22e8f0-ad4a-491d-9255-155b04c7aa66@j25g2000yqn.googlegroups.com> <988c7d8d-49db-4d82-b878-a0466503a0c6@googlegroups.com>

Show all headers | View raw


>I cooked-up an example.
>
>%!
>%customchar.ps
>%Example replaces the space char (using ASCII decimal code)
>%with a big black 'em'-square
>
>/q{0 0 moveto 1 0 lineto 1 1 lineto 0 1 lineto closepath}def
>
>/X<</FontType 3/FontBBox[0 0 1 1]/FontMatrix[1 0 0 1 0 0]
>    /Encoding StandardEncoding
>    /BuildChar{ % font char(int)
>        exch pop
>        dup 32 eq { pop
>            1 0 0 0 1 1 setcachedevice
>            q fill
>        }{
>            /Times-Roman 1 selectfont
>            (?) dup 0 4 3 roll put dup stringwidth %(?) Wx Wy
>            0 0 1 1 setcachedevice
>            0 0 moveto
>            show
>        }ifelse
>    }
>>>definefont pop
>
>/X 30 selectfont
>
>100 300 moveto
>(Modified Font?) show
>

Thanks for saving people some programming.

I will save this post for possible future use.

But first a probably insulting question: you did TEST
the code?

(I ask only because so many cs textbooks include program
after program (source) that won't even compile, perhaps
even in the human brain!)

David

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


Thread

Is it possible to replace 1 custom character in a font?? Ramon F Herrera <ramon@conexus.net> - 2012-07-16 12:07 -0700
  Re: Is it possible to replace 1 custom character in a font?? Bill <billsrrempire@gmail.com> - 2012-07-16 12:29 -0700
  Re: Is it possible to replace 1 custom character in a font?? Character <Char@cters.bold.italic> - 2012-07-16 17:20 -0700
  Re: Is it possible to replace 1 custom character in a font?? luser- -droog <mijoryx@yahoo.com> - 2012-07-16 20:51 -0700
    Re: Is it possible to replace 1 custom character in a font?? dkcombs@panix.com (David Combs) - 2012-08-13 13:15 +0000
      Re: Is it possible to replace 1 custom character in a font?? luser- -droog <mijoryx@yahoo.com> - 2012-08-13 15:54 -0700
    Re: Is it possible to replace 1 custom character in a font?? dkcombs@panix.com (David Combs) - 2012-08-13 13:48 +0000
      Re: Is it possible to replace 1 custom character in a font?? luser- -droog <mijoryx@yahoo.com> - 2012-08-16 03:09 -0700
        Re: Is it possible to replace 1 custom character in a font?? dkcombs@panix.com (David Combs) - 2012-09-24 06:21 +0000
          How to do Algebraic Mode in PS like the HP does? "luser.droog" <luser.droog@gmail.com> - 2012-09-28 22:48 -0500
            Re: How to do Algebraic Mode in PS like the HP does? "luser.droog" <luser.droog@gmail.com> - 2012-09-30 00:57 -0500
              Re: How to do Algebraic Mode in PS like the HP does? Herbert Voss <Herbert.Voss@alumni.tu-berlin.de> - 2012-09-30 22:40 +0200
                Re: How to do Algebraic Mode in PS like the HP does? "luser.droog" <luser.droog@gmail.com> - 2012-10-02 12:32 -0500
              Re: How to do Algebraic Mode in PS like the HP does? "luser.droog" <luser.droog@gmail.com> - 2012-10-13 01:40 -0500
                Re: How to do Algebraic Mode in PS like the HP does? "luser.droog" <luser.droog@gmail.com> - 2012-10-14 00:51 -0500
                Re: How to do Algebraic Mode in PS like the HP does? "luser.droog" <luser.droog@gmail.com> - 2012-10-14 04:43 -0500
  Re: Is it possible to replace 1 custom character in a font?? SaGS <sags5495@gmail.com> - 2012-08-13 20:04 -0700
  Re: Is it possible to replace 1 custom character in a font?? John Deubert <john@acumentraining.com> - 2012-08-21 06:48 -0700
    Re: Is it possible to replace 1 custom character in a font?? dkcombs@panix.com (David Combs) - 2012-09-24 06:23 +0000

csiph-web