Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #2588
| Path | csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.astraweb.com!border6.newsrouter.astraweb.com!not-for-mail |
|---|---|
| Newsgroups | comp.lang.postscript |
| From | Peter Billam <peter@www.pjb.com.au> |
| Subject | Re: wanted: kcharpath ... |
| References | <slrnnjfrfs.2bk.peter@box8.pjb.com.au> <20160518230051.164da369@samara.DOMA> <slrnnjvgqe.1tl.peter@box8.pjb.com.au> <20160522142030.2ad51c0f@samara.DOMA> |
| Reply-To | contact.html@www.pjb.com.au |
| User-Agent | slrn/1.0.2 (Linux) |
| Message-ID | <slrnnkl2os.2lf.peter@box8.pjb.com.au> (permalink) |
| Date | 29 May 2016 06:24:29 GMT |
| Lines | 61 |
| Organization | Unlimited download news at news.astraweb.com |
| NNTP-Posting-Host | b1a71e9c.news.astraweb.com |
| X-Trace | DXC=0@jWN`7gGjAc_WgCkn9MLEL?0kYOcDh@Ja30YlQ[TC>Jh:BbU8OZ3AM<Ah6b28J?ED<h::ASf1A`JBC]<acPU5CFB<9icFi`WXL |
| Xref | csiph.com comp.lang.postscript:2588 |
Show key headers only | View raw
Sorry for the delay, I've been creating my first ever Type 3 font.
When I look through The Art Deco Poster (Crouse) I notice that every
single poster has its own individual font ! (and they're almost all
all-uppercase, too.) I going to miss charpath and clip, though ...
On 2016-05-22, Carlos <angus@quovadis.com.ar> wrote:
> [Peter Billam <peter@www.pjb.com.au>, 2016-05-21 02:09]
>> ...
>> I'm still not sure how that works. How does it turn lower-case
>> into small uppercase? It must be in the SubsVector, since 61 hex
>> is "A" ascii, and 1a is 26, the length of the alphabet;
>> but I don't see a `32 sub` or `32 add` anywhere.
>> And how does `0.8 scalefont` only get applied to former a-z chars ?
>> And the `/Encoding [ 65 1 90` (PLRM: "an array of integers, each
>> used as an index to extract a font dictionary from the FDepVector")
>> I think it was at that point that I got brain-overload :-( ...
>
> SubsVector defines character code ranges by their size, the last being
> implicit. The ranges are:
> size range
> 16#61 = 97 0 - 96; \000 - `
> 16#1A = 26 97 - 122; a - z
> implicit 123 - 256; { - \377
>
> When show (or cshow) meets an 'a' in a string (code 97), it finds it
> belongs to the second range (index 1). It looks up the number at index
> 1 in the Encoding vector (it's 1 again). Then uses that number to find
> which subfont to use from FDepVector (it's the font at index 1). Then
> it subtracts the start of the range from the char code (97-97=0) and
> uses the glyph at that index in the subfont's Encoding vector.
>
> The font at index 1 in FDepVector is reencoded, it's Encoding vector
> is simply [ /A /B /C /D /E ... /Z ]. I made it looping from 'A' (65)
> to 'Z' (90), creating a string with that letter and then converting it
> to a name... it was a silly thing to do, using getinterval/putinterval
> to copy the range from Times-Roman's encoding, or even writing /A /B
> ... /Z would have been faster and more readable.
That's the:
dup /Encoding [65 1 90 {1 string dup 0 4 -1 roll put cvn} for] put
So how would you rewrite that, in an ideal world ?
(I'll roll it into my SmallCaps collection.)
> Anyway, to get back... the subtraction you were missing is done
> automatically by the composite font system. And scalefont is only
> applied to the font on top of the stack, which is the font we just
> created by copying Times-Roman, and changing its Encoding vector.
OK, I think I get that :-)
Could still be a while before I'm fluent in this area, though...
Is there a website somewhere with a collection of Type 3 fonts ?
Should be on github, really, if github can realise .ps is text...
Many thanks,
Peter
--
Peter Billam www.pjb.com.au www.pjb.com.au/comp/contact.html
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-15 03:33 +0000
Re: wanted: kcharpath ... luser- -droog <mijoryx@yahoo.com> - 2016-05-15 14:16 -0700
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-16 06:51 +0000
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-18 02:01 +0000
Re: wanted: kcharpath ... luser- -droog <mijoryx@yahoo.com> - 2016-05-17 20:41 -0700
Re: wanted: kcharpath ... luser- -droog <mijoryx@yahoo.com> - 2016-05-17 20:44 -0700
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-18 06:59 +0000
Re: wanted: kcharpath ... luser- -droog <mijoryx@yahoo.com> - 2016-05-18 22:29 -0700
Re: wanted: kcharpath ... Carlos <angus@quovadis.com.ar> - 2016-05-18 23:00 +0200
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-21 02:09 +0000
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-21 03:13 +0000
Re: wanted: kcharpath ... Carlos <angus@quovadis.com.ar> - 2016-05-22 14:20 +0200
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-29 06:24 +0000
Re: wanted: kcharpath ... luser- -droog <mijoryx@yahoo.com> - 2016-05-28 23:43 -0700
Re: wanted: kcharpath ... luser- -droog <mijoryx@yahoo.com> - 2016-05-29 01:10 -0700
from image to imagemask Peter Billam <peter@www.pjb.com.au> - 2016-05-31 08:51 +0000
Re: from image to imagemask luser- -droog <mijoryx@yahoo.com> - 2016-06-01 00:53 -0700
Re: from image to imagemask luser- -droog <mijoryx@yahoo.com> - 2016-06-01 01:10 -0700
Re: from image to imagemask Peter Billam <peter@www.pjb.com.au> - 2016-06-02 01:26 +0000
Re: from image to imagemask Peter Billam <peter@www.pjb.com.au> - 2016-06-03 07:53 +0000
Re: wanted: kcharpath ... Carlos <angus@quovadis.com.ar> - 2016-06-03 14:38 +0200
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-06-06 02:43 +0000
Re: wanted: kcharpath ... Carlos <angus@quovadis.com.ar> - 2016-06-06 07:53 +0200
csiph-web