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


Groups > comp.lang.postscript > #2149 > unrolled thread

kshow for real?

Started byluser- -droog <mijoryx@yahoo.com>
First post2015-01-24 00:30 -0800
Last post2015-01-26 12:55 -0800
Articles 9 — 4 participants

Back to article view | Back to comp.lang.postscript


Contents

  kshow for real? luser- -droog <mijoryx@yahoo.com> - 2015-01-24 00:30 -0800
    Re: kshow for real? Ross Presser <rpresser@gmail.com> - 2015-01-24 00:44 -0800
      Re: kshow for real? luser- -droog <mijoryx@yahoo.com> - 2015-01-24 15:01 -0800
        Re: kshow for real? Dan Coby <adcoby@earthlink.net> - 2015-01-24 15:36 -0800
          Re: kshow for real? luser- -droog <mijoryx@yahoo.com> - 2015-01-24 22:08 -0800
    Re: kshow for real? Phyl <psexton19@gmail.com> - 2015-01-24 16:56 -0800
      Re: kshow for real? luser- -droog <mijoryx@yahoo.com> - 2015-01-25 20:57 -0800
        Re: kshow for real? Phyl <psexton19@gmail.com> - 2015-01-26 06:13 -0800
          Re: kshow for real? luser- -droog <mijoryx@yahoo.com> - 2015-01-26 12:55 -0800

#2149 — kshow for real?

Fromluser- -droog <mijoryx@yahoo.com>
Date2015-01-24 00:30 -0800
Subjectkshow for real?
Message-ID<286efe0f-a657-49e2-8a77-be536ef28e67@googlegroups.com>
I've only ever used kshow for stupid tricks like color-changing
letters and stair-step effects. I know I'm not using it 
properly because my proc always begins `pop pop`.

So what does "properly" look like?

My only thought (so far) is to encode the two chars so the
table can use a single key for pairs. That might look sthg like

/pair {256 mul add} def
/pairs <<
    (l) 0 get (l) 0 get pair some-number
    (l) 0 get (i) 0 get pair some-other-number-or-the-same-maybe
>> def

50 100 moveto
(lullali-lililullulalala) {
    pair pairs exch 2 copy known {
        get 0 rmoveto
    }{
        pop pop
    } ifelse
} kshow

It's got to be scaled with the fontsize, right?
And probably tuned to a specific face, right?

[toc] | [next] | [standalone]


#2150

FromRoss Presser <rpresser@gmail.com>
Date2015-01-24 00:44 -0800
Message-ID<f9219c9a-321f-42c7-92f4-7e937db06df2@googlegroups.com>
In reply to#2149
On Saturday, January 24, 2015 at 3:30:55 AM UTC-5, luser- -droog wrote:
> I've only ever used kshow for stupid tricks like color-changing
> letters and stair-step effects. I know I'm not using it 
> properly because my proc always begins `pop pop`.
> 
> So what does "properly" look like?
[snip]
> It's got to be scaled with the fontsize, right?
> And probably tuned to a specific face, right?

Since it's intended for *kerning* (that's what the k is for),
definitely it has to be specific to the face and the fontsize.
This page has some samples.
http://www.hegny.de/stefan/pskern-en.html

[toc] | [prev] | [next] | [standalone]


#2151

Fromluser- -droog <mijoryx@yahoo.com>
Date2015-01-24 15:01 -0800
Message-ID<d47dd2ff-0aa4-4348-ab63-60e5579e9854@googlegroups.com>
In reply to#2150
On Saturday, January 24, 2015 at 2:44:43 AM UTC-6, Ross Presser wrote:
> On Saturday, January 24, 2015 at 3:30:55 AM UTC-5, luser- -droog wrote:
> > I've only ever used kshow for stupid tricks like color-changing
> > letters and stair-step effects. I know I'm not using it 
> > properly because my proc always begins `pop pop`.
> > 
> > So what does "properly" look like?
> [snip]
> > It's got to be scaled with the fontsize, right?
> > And probably tuned to a specific face, right?
> 
> Since it's intended for *kerning* (that's what the k is for),
> definitely it has to be specific to the face and the fontsize.
> This page has some samples.
> http://www.hegny.de/stefan/pskern-en.html

Awesome. So it's not all that complicated. Essentially, the
proc's signature determines the data structure.

    int int  -proc-  -

So we need a 2-key or 2-index map to {some-change-to-state}.

In the link above, he uses an array of {name name offset} tuples.

[
[ /A /C -36 ]
[ /A /Ccedilla -37 ]
[ /A /G -38 ]
[ /A /O -38 ]
[ /A /Odieresis -38 ]
[ /A /Q -38 ]
[ /A /T -50 ]
[ /A /U -29 ]
...
]

That's nice because it's independent of the font encoding,
unlike my chickenscratch upthread (which also had the arguments
in the wrong order).

But the linear data-structure seems slow. I haven't tested,
but I feel in my bones that it'd be better in dictionaries,
maybe even two-deep.

    <<
        /A <<
            << /C -36 >>
            << /Ccedilla -37 >>
            << /G -38 >>
            << /O -38 >>
            << /Odieresis -38 >>
            << /Q -38 >>
           >>
       ...
    >>

[toc] | [prev] | [next] | [standalone]


#2152

FromDan Coby <adcoby@earthlink.net>
Date2015-01-24 15:36 -0800
Message-ID<ao6dnTRdGLQhsVnJnZ2dnUU7-UednZ2d@earthlink.com>
In reply to#2151
On 1/24/2015 3:01 PM, luser- -droog wrote:
> But the linear data-structure seems slow. I haven't tested,
> but I feel in my bones that it'd be better in dictionaries,
> maybe even two-deep.
>
>      <<
>          /A <<
>              << /C -36 >>
>              << /Ccedilla -37 >>
>              << /G -38 >>
>              << /O -38 >>
>              << /Odieresis -38 >>
>              << /Q -38 >>
>             >>
>         ...
>      >>
>

My guess is that you meant:
	<<
	    /A <<
		   /C		-36
		   /Ccedilla	-37
		   /G		-38
		   /O		-38
		   /Odieresis	-38
		   /Q		-38
	       >>
	>>


Dan

[toc] | [prev] | [next] | [standalone]


#2154

Fromluser- -droog <mijoryx@yahoo.com>
Date2015-01-24 22:08 -0800
Message-ID<85496699-23d7-4057-83cd-88d3d4facb83@googlegroups.com>
In reply to#2152
On Saturday, January 24, 2015 at 5:37:33 PM UTC-6, Dan Coby wrote:
> On 1/24/2015 3:01 PM, luser- -droog wrote:
> > But the linear data-structure seems slow. I haven't tested,
> > but I feel in my bones that it'd be better in dictionaries,
> > maybe even two-deep.
> >
> >      <<
> >          /A <<
> >              << /C -36 >>
> >              << /Ccedilla -37 >>
> >              << /G -38 >>
> >              << /O -38 >>
> >              << /Odieresis -38 >>
> >              << /Q -38 >>
> >             >>
> >         ...
> >      >>
> >
> 
> My guess is that you meant:
> 	<<
> 	    /A <<
> 		   /C		-36
> 		   /Ccedilla	-37
> 		   /G		-38
> 		   /O		-38
> 		   /Odieresis	-38
> 		   /Q		-38
> 	       >>
> 	>>
> 
> 
> Dan

Yes. Thanks. I plead lyxdexia.

There's more detail in the AFM spec, section 9.2.
http://partners.adobe.com/public/developer/en/font/5004.AFM_Spec.pdf

And .afm files seem to be easy to find
   find / -name \*.afm

And gs conveniently reports the files when it loads a 
font. So, all the pieces seem to be there to hack 
something together.

[toc] | [prev] | [next] | [standalone]


#2153

FromPhyl <psexton19@gmail.com>
Date2015-01-24 16:56 -0800
Message-ID<24feda17-8d0d-4162-b7d6-0c8c4071277e@googlegroups.com>
In reply to#2149
On Saturday, January 24, 2015 at 2:30:55 AM UTC-6, luser- -droog wrote:
> I've only ever used kshow for stupid tricks like color-changing
> letters and stair-step effects. I know I'm not using it 
> properly because my proc always begins `pop pop`.
> 
> So what does "properly" look like?
> 
> My only thought (so far) is to encode the two chars so the
> table can use a single key for pairs. That might look sthg like
> 
> /pair {256 mul add} def
> /pairs <<
>     (l) 0 get (l) 0 get pair some-number
>     (l) 0 get (i) 0 get pair some-other-number-or-the-same-maybe
> >> def
> 
> 50 100 moveto
> (lullali-lililullulalala) {
>     pair pairs exch 2 copy known {
>         get 0 rmoveto
>     }{
>         pop pop
>     } ifelse
> } kshow
> 
> It's got to be scaled with the fontsize, right?
> And probably tuned to a specific face, right?

Since moving to Windows7 my posscipt is filled with kshow commands I did not change my postscript driver. It looks like it is trying to to variable spacing in my text which makes my user complain. Currently I change all the kshows for my (test) to shows and delete the array.  How do I go back to getting the plain show?

[toc] | [prev] | [next] | [standalone]


#2155

Fromluser- -droog <mijoryx@yahoo.com>
Date2015-01-25 20:57 -0800
Message-ID<86f153dc-71dc-4a17-aa92-129085b55249@googlegroups.com>
In reply to#2153
On Saturday, January 24, 2015 at 6:56:23 PM UTC-6, Phyl wrote:
> 
> Since moving to Windows7 my posscipt is filled with kshow commands I did not change my postscript driver. It looks like it is trying to to variable spacing in my text which makes my user complain. Currently I change all the kshows for my (test) to shows and delete the array.  How do I go back to getting the plain show?

What's the source application? Did its version 
change with the upgrade? 

[toc] | [prev] | [next] | [standalone]


#2156

FromPhyl <psexton19@gmail.com>
Date2015-01-26 06:13 -0800
Message-ID<de583d2d-2b76-46b2-a2af-de88e3e20e19@googlegroups.com>
In reply to#2155
On Sunday, January 25, 2015 at 10:57:05 PM UTC-6, luser- -droog wrote:
> On Saturday, January 24, 2015 at 6:56:23 PM UTC-6, Phyl wrote:
> > 
> > Since moving to Windows7 my posscipt is filled with kshow commands I did not change my postscript driver. It looks like it is trying to to variable spacing in my text which makes my user complain. Currently I change all the kshows for my (test) to shows and delete the array.  How do I go back to getting the plain show?
> 
> What's the source application? Did its version 
> change with the upgrade?

The source application is a UK product Teleform which has been upgraded recently. I have also tried it in Word, which is a new version for me also.  Is it based on my choice of fonts?

[toc] | [prev] | [next] | [standalone]


#2157

Fromluser- -droog <mijoryx@yahoo.com>
Date2015-01-26 12:55 -0800
Message-ID<bff5b5c1-58af-487a-a978-5542571f1284@googlegroups.com>
In reply to#2156
On Monday, January 26, 2015 at 8:13:54 AM UTC-6, Phyl wrote:
> On Sunday, January 25, 2015 at 10:57:05 PM UTC-6, luser- -droog wrote:
> > On Saturday, January 24, 2015 at 6:56:23 PM UTC-6, Phyl wrote:
> > > 
> > > Since moving to Windows7 my posscipt is filled with kshow commands I did not change my postscript driver. It looks like it is trying to to variable spacing in my text which makes my user complain. Currently I change all the kshows for my (test) to shows and delete the array.  How do I go back to getting the plain show?
> > 
> > What's the source application? Did its version 
> > change with the upgrade?
> 
> The source application is a UK product Teleform which has been upgraded recently. I have also tried it in Word, which is a new version for me also.  Is it based on my choice of fonts?

That could well be it. Kerning data is optional in font files.
So, perhaps the application has always had this ability and
suddenly found the kerning data it needed.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.postscript


csiph-web