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


Groups > comp.lang.postscript > #880

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:48 +0000
Organization Public Access Networks Corp.
Message-ID <k0b0js$nqu$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


A *different* followup, ABOUT the postscript language,
as demonstrated in your example:

>
>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
>



I would call having to program like that, with
those miserable-to-code (correctly!) stack operations (eg dup, roll, etc),
it's obviously a language not made for human use.

Even though when it was new, back around 1980 and available
only in the Apple laserwriter, the almost only way to use it *was*
by hand coding it.

Couldn't Adobe have added a *few* ops to make coding VASTLY
simpler?

Example: The HP-50 calculator, using a *very* nice version 
of a reverse polish language.

Has REAL functions and procedures, with args, local vars, 
as just one added feature.

Now, the above is in reverse-polish mode.

But it also lets you write stuff in "algebra" (with parens
and everthing, and even calls to those function you defined
up above!) -- this is its "algebraic" mode.

Here its manual:
 http://h10032.www1.hp.com/ctg/Manual/c00554621.pdf

From the tbl of contents, jump down to "RPL programming", 
and page on from there.

Also note that everything is an "object".

Look at it, you'll like it!

---------------------------

Now, could Adobe could have added these features
back in '80.  No, not with those small and expensive
they were limited to at that time.

BUT, they COULD have EASILY added these language features
later on, eg 2000 or after.  And note that none of the
added language-features would require changes to any
of the prior Adobe postscript!

Old programs would continue to run in new printers
with their new interpreters.  You just couldn't
use the new features in the OLD printers, etc.

If at all curious about these nifty language-featurees
in the HP-50, go to the up above url.  It will make
you jealous!


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