> Thanks so much Michael.
>
> I'm in need of much PostScript help :
> - how to program the fl_width() function for PS output ?

You'll need to map (for now) to one of the base fonts (Times, Helvetica, 
Courier, etc.).  You can find code for this in my HTMLDOC (look in the 
hdStyleFont class):

   http://www.htmldoc.org/

For FLTK you'll probably want to have in-memory font width tables that map from 
Unicode to glyph name and width - HTMLDOC loads them from disk.

> - how to print non-ascii characters ?

That's tricky without using Cairo and Pango.  For the base Type 1 fonts you can 
use a character reservation strategy to support up to 224 unique characters at 
a time (this is what HTMLDOC currently does for UTF-8), but it also means you 
need to buffer the page so you can properly define the font encodings.

> - Roman's code allows to produce PS for levels 1, 2 or 3. What level
> is it reasonable/useful to expect to be supported in today's printers ?

Don't bother with Level 1.  Level 2 is still widely used, and all current 
printers use Level 3.

> "and I'll send it your way...". It would be great if this means
> you could implement these 2 functions:
>
> int Fl_PS_Printer::start_job(int pages, int *firstpage, int *lastpage) {
>   // TODO should start a print dialog, set the selected paper
>   // format and the temp .ps file in Fl_PS_Printer's member variables,
>   // and return the user's desired page range to the caller
>   return Fl_PSfile_Device::start_job(pages,format,firstpage,lastpage);
> }
>
> void Fl_PS_Printer::end_job(void)
> {
>   Fl_PSfile_Device::end_job();
>   // TODO should send the ps_filename_ file to the print queue
>   // and delete it
> }

I'll look at this when I get a chance, but I'll also put up a link to the code 
since I'm currently quite busy on CUPS...

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to