[gs-devel] Writing an HPGL driver (with extra xefitra)

Christian Brunschen christian.brunschen at gmail.com
Sat May 3 14:12:36 PDT 2008


On 29 Apr 2008, at 15:15, Ken Sharp wrote:

> Hi Christian,

Hi Ken,

> I don't have any example code I'm afraid, and my own experience  
> doesn't cover PCL, are you intending to input PCL as well ?

Not at this time – just PostScript.

> But here's a few thoughts:

[ excellent information snipped ]

> Using this you should be able to determine whether the font has  
> guaranteed outlines which you can use. If it does, you should be  
> able to alter the operation from (eg) TEXT_DO_DRAW to  
> TEXT_DO_ANY_CHARPATH.

I ended up creating a separate text_enum with a copy of all the  
parameters except for the operation, and using that for the contained  
charpath operation, following a pattern from the gdevpnga driver  
(though it wasn't collecting a charpath). Oh, and with a path that's  
been initialized with a moveto to the current point.

I'm thinking it might be interesting if I could, for Type 3 fonts, try  
the charpath operation, and if it did not result in a path, rerun the  
operation; or something similar that could capture paths even from  
font-types where outlines are a possibility though not a certainty.  
But that is for later.

> Of course, you will also need to deal with the path once you have it!

Oh, that I know, and I'm dealing with it by filling it with the  
current colour (as one might expect). And it works!

> You will need to do something in the text_release routine with the  
> current path, I'm afraid I don't know what you would want to do here.

Yes, I can collect the path very nicely, thanks.

> Hope that's of some help,

It's a great amount of help, actually!

>                Ken

Best wishes and many thanks,

// Christian Brunschen


More information about the gs-devel mailing list