Re: [newbie] CUPS: importing fonts

2003-03-10 Thread John Richard Smith
Len Lawrence wrote:

On Sun, 09 Mar 2003 19:59:46 +
John Richard Smith [EMAIL PROTECTED] wrote:
 

   

   

Are you working with M9.0 

No, 8.2, but 9.0 has the broken Fontmap link.  The msfonts directory is one 
I created to store downloaded MS TrueType fonts.

I think that my Fontmap was resurrected from Fontmap.GS in the installed
Ghostscript tree.  And, yes, the 5.50 is the cause of the broken link.  It
should be 6.53 in Mandrake 8.2, possibly 8.80 in your case.
 

OK, So I'm beginning to get the general drift of all this . So when you add
additional fonts to an app. no matter that it has it, it still needs for 
ghostscript
to have a set of matching fonts to enable it to process the printfile 
correctly.
Is this correct ?

John

--
John Richard Smith
[EMAIL PROTECTED] 



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] CUPS: importing fonts

2003-03-10 Thread Len Lawrence
On Thu, 6 Mar 2003 09:33:05 +
Anne Wilson [EMAIL PROTECTED] wrote:

 On Thursday 06 Mar 2003 9:03 am, John Richard Smith wrote:
  Len Lawrence wrote:
  On Wed, 05 Mar 2003 10:54:11 +
  
  John Richard Smith [EMAIL PROTECTED] wrote:
  Len Lawrence wrote:
  
  Thanks for your comments John.  I agree that printing is a complex issue
  which probably explains why LX Format has not replied.  If in two years
  research I have not been able to find an explanation of how CUPS deals
  with PostScript fonts then they probably cannot afford the time to follow
  up my query.  It is obviously not something anybody can answer off the
  top of their head.  So I will continue poking around.
  
  Thanks also for the information re PCL5 and PCL3.  I had not come across
   that. The printer is an HP Deskjet 940C by the way.
 
  HP deskjet940C ought to be supported, most of the HP
  inkjet printers are. I have an old HP670C which works
  quite well, but is a very noisy shake rattle and roll
  printer, compared to my Lexmark Z51 + Z52's. I would
  be surprized if HP 940C is not supported, or have I
  misunderstood, perhaps it does work but you need more fonts ?
 
 IIRC the 940 is a slower version of the 990, which I use.  I have no problems 
 per se, but different programs have different capabilities in handling fonts 
 and complex layouts.  Have you tried the same output in a different package?  
 It would tell you, perhaps, whether that is the source of your problem.  
 Oddly enough I find OO.o better on my system than SO6 in handling these 
 things.
Agreed.  Importing TrueType fonts into OO.o seemed easier than in StarOffice.
-- 
Len Lawrence
--
Never argue with a fool -- people might not be able to tell the difference.
--

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] CUPS: importing fonts

2003-03-09 Thread Greg Meyer
On Sunday 09 March 2003 01:51 am, Len Lawrence wrote:


 Then, edit the Fontmap file.  Insert the following line in the end
 section, using tabs as separators, not spaces:

 /Verdana-BoldItalic   (verdanaz.pfa)  ;   % 5066571

 The font alias at the beginning of the line must match exactly the
 name held in the font files and it is this which should appear in the
 postscript file itself with the findfont directive.  Your document
 generator should handle this automatically if given the correct name.

 e.g. /Verdana-BoldItalic findfont 14 scalefont ISOEncode setfont

 The line
 %%DocumentNeededResources: font Verdana-BoldItalic
 appears in the document header.

 I feel a bit of a fool for taking so long to find such a simple solution
 to this problem.  Time to get a life I think.

Are you in a position to test this on 9.1.  It needs to be done quickly.
-- 
Greg

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] CUPS: importing fonts

2003-03-09 Thread Michael Adams
On Sun, 09 Mar 2003 19:51, Len Lawrence wrote:
 On Wed, 05 Mar 2003 10:54:11 +

 John Richard Smith [EMAIL PROTECTED] wrote:
  Len Lawrence wrote:
 
   all snipped --
 
  Understanding linux printer setup is not easy, and
  so here is my best try,
 
  -- snip snip snip --

 Ladies, Gentleman, and script kiddies.  Done it!  Retreading old
 ground, I discovered the exact prescription to allow ghostscript to
 locate the new fonts for postscript files.  Since gv was unable to
 render them either, I figured that it was purely a ghostscript problem
 - nothing to do with CUPS.  GS finds the font resources in the
 ghostscript and Type1 directories under /usr/share/fonts/defaults.
 Indexing is performed through a Fontmap file in ./ghostscript, but in
 Mandrake 8.2 and 9.0 this is a bad link, pointing to lib/Fontmap.GS in
 the ghostscript installation directories.  This was probably the case
 with 8.1 also, and may be carried into 9.1.  The link references the
 wrong (older) version of Ghostscript.  Anyway, I repaired that link
 and carried out the following operations (using Verdana-BoldItalic as
 an example):

 cd /usr/share/fonts/msfonts
 # Generate Type1 fonts from TrueType
 ./ttf2pt1 -e verdanaz.ttf verdanaz
 # Copy the font metric file to ghostscript
 cp verdanaz.afm /usr/share/fonts/default/ghostscript
 # Copy the ASCII font file to ghostscript
 cp verdanaz.pfa /usr/share/fonts/default/ghostscript
 cd /usr/share/fonts/default/ghostscript

 Then, edit the Fontmap file.  Insert the following line in the end
 section, using tabs as separators, not spaces:

 /Verdana-BoldItalic   (verdanaz.pfa)  ;   % 5066571

 The font alias at the beginning of the line must match exactly the
 name held in the font files and it is this which should appear in the
 postscript file itself with the findfont directive.  Your document
 generator should handle this automatically if given the correct name.

 e.g. /Verdana-BoldItalic findfont 14 scalefont ISOEncode setfont

 The line
 %%DocumentNeededResources: font Verdana-BoldItalic
 appears in the document header.

 I feel a bit of a fool for taking so long to find such a simple solution
 to this problem.  Time to get a life I think.

Simple, what weed am i smokin'. I do not understand f a about what you wrote, 
except i recognise a full stop at the end of every sentence.

Seeing as you have just become the authority on the matter could you slow 
this down to about half speed. Then poke it on a web space and post a link to 
it. Else, give it to me direct, at half speed. I will post it on a website 
for you. 

-- 
Michael


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] CUPS: importing fonts

2003-03-09 Thread Len Lawrence
On Sun, 9 Mar 2003 06:58:55 -0500
Greg Meyer [EMAIL PROTECTED] wrote:

 On Sunday 09 March 2003 01:51 am, Len Lawrence wrote:
 
 
  Then, edit the Fontmap file.  Insert the following line in the end
  section, using tabs as separators, not spaces:
 
  /Verdana-BoldItalic (verdanaz.pfa)  ;   % 5066571
 
  The font alias at the beginning of the line must match exactly the
  name held in the font files and it is this which should appear in the
  postscript file itself with the findfont directive.  Your document
  generator should handle this automatically if given the correct name.
 
  e.g. /Verdana-BoldItalic findfont 14 scalefont ISOEncode setfont
 
  The line
  %%DocumentNeededResources: font Verdana-BoldItalic
  appears in the document header.
 
  I feel a bit of a fool for taking so long to find such a simple solution
  to this problem.  Time to get a life I think.
 
 Are you in a position to test this on 9.1.  It needs to be done quickly.
Sorry Greg.  I am not uptodate yet.  Waiting for the wrinkles in 9.1 to be 
ironed out before buyig it.  My preferred system is 8.2 at present.

-- 
Len Lawrence
--
Never argue with a fool -- people might not be able to tell the difference.
--

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] CUPS: importing fonts

2003-03-09 Thread Len Lawrence
On Sun, 09 Mar 2003 19:59:46 +
John Richard Smith [EMAIL PROTECTED] wrote:

 Michael Adams wrote:
 
 On Sun, 09 Mar 2003 19:51, Len Lawrence wrote:
   
 
 On Wed, 05 Mar 2003 10:54:11 +
 
 John Richard Smith [EMAIL PROTECTED] wrote:
 
 
 Len Lawrence wrote:
 
  all snipped --
 
 
 Understanding linux printer setup is not easy, and
 so here is my best try,
 
 -- snip snip snip --
   
 
 Ladies, Gentleman, and script kiddies.  Done it!  Retreading old
 ground, I discovered the exact prescription to allow ghostscript to
 locate the new fonts for postscript files.  Since gv was unable to
 render them either, I figured that it was purely a ghostscript problem
 - nothing to do with CUPS.  GS finds the font resources in the
 ghostscript and Type1 directories under /usr/share/fonts/defaults.
 
 yep found those.
 
 Indexing is performed through a Fontmap file in ./ghostscript, 
 
 /usr/share/fonts/default/ghostscript/Fontmap,
 does not exist in my M9.0 OS
 
 Unable to run the command specified. The file or directory 
 file:/usr/share/ghostscript/5.50/Fontmap.GS does not exist.
 
 but in
 Mandrake 8.2 and 9.0 this is a bad link, pointing to lib/Fontmap.GS in
 
 In mine it points to, ./././ghostscript/5.50/Fontmap.GS
 
 the ghostscript installation directories.  This was probably the case
 with 8.1 also, and may be carried into 9.1.  The link references the
 wrong (older) version of Ghostscript.
 
 I should change 5.50 to , what is it, 8.80, I think ?
 
   Anyway, I repaired that link
 and carried out the following operations (using Verdana-BoldItalic as
 an example):
 
 cd /usr/share/fonts/msfonts
 
 no such directory
 
 /usr/share/fonts/9x15.pcf.gz 
 /usr/share/fonts/bitmap/  
 /usr/share/fonts/console8x16.pcf.gz 
 /usr/share/fonts/default/ 
 /usr/share/fonts/elmar_scalable/ 
 /usr/share/fonts/otf/  
 /usr/share/fonts/ttf/
 /usr/share/fonts/afms/  
 /usr/share/fonts/chinese/ 
 /usr/share/fonts/console8x8.pcf.gz  
 /usr/share/fonts/elmar/   
 /usr/share/fonts/fonts.dir   
 /usr/share/fonts/override/
 
 # Generate Type1 fonts from TrueType
 ./ttf2pt1 -e verdanaz.ttf verdanaz
 # Copy the font metric file to ghostscript
 cp verdanaz.afm /usr/share/fonts/default/ghostscript
 # Copy the ASCII font file to ghostscript
 cp verdanaz.pfa /usr/share/fonts/default/ghostscript
 cd /usr/share/fonts/default/ghostscript
 
 Then, edit the Fontmap file.  
 
 /usr/share/fonts/default/ghostscript/Fontmap
 is empty
 
 Insert the following line in the end
 section, using tabs as separators, not spaces:
 
 /Verdana-BoldItalic (verdanaz.pfa)  ;   % 5066571
 
 The font alias at the beginning of the line must match exactly the
 name held in the font files and it is this which should appear in the
 postscript file itself with the findfont directive.  Your document
 generator should handle this automatically if given the correct name.
 
 e.g. /Verdana-BoldItalic findfont 14 scalefont ISOEncode setfont
 
 The line
 %%DocumentNeededResources: font Verdana-BoldItalic
 appears in the document header.
 
 I feel a bit of a fool for taking so long to find such a simple solution
 to this problem.  Time to get a life I think.
 
 
 Are you working with M9.0 ?
No, 8.2, but 9.0 has the broken Fontmap link.  The msfonts directory is one 
I created to store downloaded MS TrueType fonts.

I think that my Fontmap was resurrected from Fontmap.GS in the installed
Ghostscript tree.  And, yes, the 5.50 is the cause of the broken link.  It
should be 6.53 in Mandrake 8.2, possibly 8.80 in your case.

 -- 
 John Richard Smith
 [EMAIL PROTECTED] 
 
 
 
 


-- 
Len Lawrence
--
Never argue with a fool -- people might not be able to tell the difference.
--

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] CUPS: importing fonts

2003-03-09 Thread Len Lawrence
On Sun, 9 Mar 2003 22:56:45 +1300
Michael Adams [EMAIL PROTECTED] wrote:

 On Sun, 09 Mar 2003 19:51, Len Lawrence wrote:
  On Wed, 05 Mar 2003 10:54:11 +
 
  John Richard Smith [EMAIL PROTECTED] wrote:
   Len Lawrence wrote:
  
    all snipped --
  
   Understanding linux printer setup is not easy, and
   so here is my best try,
  
   -- snip snip snip --
 
  Ladies, Gentleman, and script kiddies.  Done it!  Retreading old
  ground, I discovered the exact prescription to allow ghostscript to
  locate the new fonts for postscript files.  Since gv was unable to
  render them either, I figured that it was purely a ghostscript problem
  - nothing to do with CUPS.  GS finds the font resources in the
  ghostscript and Type1 directories under /usr/share/fonts/defaults.
  Indexing is performed through a Fontmap file in ./ghostscript, but in
  Mandrake 8.2 and 9.0 this is a bad link, pointing to lib/Fontmap.GS in
  the ghostscript installation directories.  This was probably the case
  with 8.1 also, and may be carried into 9.1.  The link references the
  wrong (older) version of Ghostscript.  Anyway, I repaired that link
  and carried out the following operations (using Verdana-BoldItalic as
  an example):
 
  cd /usr/share/fonts/msfonts
  # Generate Type1 fonts from TrueType
  ./ttf2pt1 -e verdanaz.ttf verdanaz
  # Copy the font metric file to ghostscript
  cp verdanaz.afm /usr/share/fonts/default/ghostscript
  # Copy the ASCII font file to ghostscript
  cp verdanaz.pfa /usr/share/fonts/default/ghostscript
  cd /usr/share/fonts/default/ghostscript
 
  Then, edit the Fontmap file.  Insert the following line in the end
  section, using tabs as separators, not spaces:
 
  /Verdana-BoldItalic (verdanaz.pfa)  ;   % 5066571
 
  The font alias at the beginning of the line must match exactly the
  name held in the font files and it is this which should appear in the
  postscript file itself with the findfont directive.  Your document
  generator should handle this automatically if given the correct name.
 
  e.g. /Verdana-BoldItalic findfont 14 scalefont ISOEncode setfont
 
  The line
  %%DocumentNeededResources: font Verdana-BoldItalic
  appears in the document header.
 
  I feel a bit of a fool for taking so long to find such a simple solution
  to this problem.  Time to get a life I think.
 
 Simple, what weed am i smokin'. I do not understand f a about what you wrote, 
 except i recognise a full stop at the end of every sentence.
 
 Seeing as you have just become the authority on the matter could you slow 
 this down to about half speed. Then poke it on a web space and post a link to 
 it. Else, give it to me direct, at half speed. I will post it on a website 
 for you. 
I'll get back to you on this Michael.  And believe me, I'm no expert.
Not many people ever have the need to examine PostScript files or look
inside the standard printing interfaces.  PostScript itself is a dialect
of Forth, which only programmers need to know about, a stack based language
which I remember vaguely from my lab days testing stepper motors.  AFAIK it
deals with two stacks, commands and data and comes with a dictionary of
prewritten commands and definitions.  When loaded it becomes the operating 
system and can be extended at will.  Everything is in Reverse Polish notation,
which makes it a little difficult to read.  

Straying off the point a bit here.  Will be in touch.  Always short of time.
24/7 care for my wife, stuck in a wheelchair with MS.

-- 
Len Lawrence
--
Never argue with a fool -- people might not be able to tell the difference.
--

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] CUPS: importing fonts

2003-03-08 Thread Len Lawrence
On Wed, 05 Mar 2003 10:54:11 +
John Richard Smith [EMAIL PROTECTED] wrote:

 Len Lawrence wrote:
 
  all snipped --
 Understanding linux printer setup is not easy, and
 so here is my best try,
 
 -- snip snip snip --

Ladies, Gentleman, and script kiddies.  Done it!  Retreading old
ground, I discovered the exact prescription to allow ghostscript to
locate the new fonts for postscript files.  Since gv was unable to
render them either, I figured that it was purely a ghostscript problem
- nothing to do with CUPS.  GS finds the font resources in the
ghostscript and Type1 directories under /usr/share/fonts/defaults.
Indexing is performed through a Fontmap file in ./ghostscript, but in
Mandrake 8.2 and 9.0 this is a bad link, pointing to lib/Fontmap.GS in
the ghostscript installation directories.  This was probably the case
with 8.1 also, and may be carried into 9.1.  The link references the
wrong (older) version of Ghostscript.  Anyway, I repaired that link
and carried out the following operations (using Verdana-BoldItalic as
an example):

cd /usr/share/fonts/msfonts
# Generate Type1 fonts from TrueType
./ttf2pt1 -e verdanaz.ttf verdanaz
# Copy the font metric file to ghostscript
cp verdanaz.afm /usr/share/fonts/default/ghostscript
# Copy the ASCII font file to ghostscript
cp verdanaz.pfa /usr/share/fonts/default/ghostscript
cd /usr/share/fonts/default/ghostscript

Then, edit the Fontmap file.  Insert the following line in the end
section, using tabs as separators, not spaces:

/Verdana-BoldItalic (verdanaz.pfa)  ;   % 5066571

The font alias at the beginning of the line must match exactly the
name held in the font files and it is this which should appear in the
postscript file itself with the findfont directive.  Your document
generator should handle this automatically if given the correct name.

e.g. /Verdana-BoldItalic findfont 14 scalefont ISOEncode setfont

The line
%%DocumentNeededResources: font Verdana-BoldItalic
appears in the document header.

I feel a bit of a fool for taking so long to find such a simple solution
to this problem.  Time to get a life I think.
-- 
Len Lawrence
--
Never argue with a fool -- people might not be able to tell the difference.
--

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] CUPS: importing fonts

2003-03-06 Thread John Richard Smith
Len Lawrence wrote:

On Wed, 05 Mar 2003 10:54:11 +
John Richard Smith [EMAIL PROTECTED] wrote:
 

Len Lawrence wrote:
   

   

Thanks for your comments John.  I agree that printing is a complex issue
which probably explains why LX Format has not replied.  If in two years
research I have not been able to find an explanation of how CUPS deals
with PostScript fonts then they probably cannot afford the time to follow
up my query.  It is obviously not something anybody can answer off the 
top of their head.  So I will continue poking around.  

Thanks also for the information re PCL5 and PCL3.  I had not come across that.
The printer is an HP Deskjet 940C by the way.  

 

HP deskjet940C ought to be supported, most of the HP
inkjet printers are. I have an old HP670C which works
quite well, but is a very noisy shake rattle and roll
printer, compared to my Lexmark Z51 + Z52's. I would
be surprized if HP 940C is not supported, or have I
misunderstood, perhaps it does work but you need more fonts ?
John

--
John Richard Smith
[EMAIL PROTECTED] 



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] CUPS: importing fonts

2003-03-06 Thread Anne Wilson
On Thursday 06 Mar 2003 9:03 am, John Richard Smith wrote:
 Len Lawrence wrote:
 On Wed, 05 Mar 2003 10:54:11 +
 
 John Richard Smith [EMAIL PROTECTED] wrote:
 Len Lawrence wrote:
 
 Thanks for your comments John.  I agree that printing is a complex issue
 which probably explains why LX Format has not replied.  If in two years
 research I have not been able to find an explanation of how CUPS deals
 with PostScript fonts then they probably cannot afford the time to follow
 up my query.  It is obviously not something anybody can answer off the
 top of their head.  So I will continue poking around.
 
 Thanks also for the information re PCL5 and PCL3.  I had not come across
  that. The printer is an HP Deskjet 940C by the way.

 HP deskjet940C ought to be supported, most of the HP
 inkjet printers are. I have an old HP670C which works
 quite well, but is a very noisy shake rattle and roll
 printer, compared to my Lexmark Z51 + Z52's. I would
 be surprized if HP 940C is not supported, or have I
 misunderstood, perhaps it does work but you need more fonts ?

IIRC the 940 is a slower version of the 990, which I use.  I have no problems 
per se, but different programs have different capabilities in handling fonts 
and complex layouts.  Have you tried the same output in a different package?  
It would tell you, perhaps, whether that is the source of your problem.  
Oddly enough I find OO.o better on my system than SO6 in handling these 
things.

Anne

-- 
Registered Linux User No.293302


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] CUPS: importing fonts

2003-03-05 Thread John Richard Smith
Len Lawrence wrote:

The importing fonts to CUPS saga continues.  Please bear with me -
this has turned into quite an essay.  

There must be somebody here who understands how CUPS references Type1
fonts.  I have a problem which has resisted solution for well over two
years now.  No help from the CUPS documentation, which comes in eleven
volumes, nor from www.linuxprinting.org, or from any other source.
Linux Format Magazine has refused to respond to two enquiries about
this, nor has anybody on this list responded to previous pleas for
help.  I post this in the hope that some expert might be browsing the
list and willing to shine a little light on this shadowy corner of the
UNIX world.  Any answer needs to be useful in the context of Mandrake
and portable from 8.2 to 9.* - I gather that there has been a recent
change in the way that CUPS and Ghostscript interact.
My specific problem is adding more typefaces to PostScript files
generated from one of my home grown applications; i.e. the file might
reference Andale Mono, Verdana, Tahoma, Densmore or whatever.  Yes, I
do have a Window$ licence, OS not installed.  These are all available
to X and to OpenOffice.org but not apparently to CUPS, and CUPS does
not appear to have a regular mechanism for importing fonts.
Presumably everything has to be done by hand.  I have converted the
TrueType fonts to Type1 .pfb files and placed these in the
/usr/share/cups/fonts directory under the names, for example Verdana,
AndaleMono, Verdana-Bold, etc, in imitation of the existing font names
(and restarted CUPS) but they still print as the default Courier
typeface.  The default set of fonts are listed in the PPD file in
/etc/cups/ppd but it is not clear how font information should be added
to this file.  The meaning of the various fields is not documented.
This may all be nonsense.  Maybe the font files should go somewhere in
the Ghostscript font path together with fonts.dir, fonts.scale and
fonts.alias files.  I really don't have a clue.
Before I sign off, this is my impression of how CUPS works:

lpr - CUPS - GS filter   PPD
  ||
  ||
  pstoraster - driver
   |
   |
spooler? - printer
 
This again may be wrong.  Please correct me somebody.

In words; a postscript file, for instance, is given to lpr aka
lpr-cups which passes it on to Ghostscript for filtering (if it were
raw text it would be converted to PostScript format).  If the printer
is not PostScript capable, the file is fed to the rasterization
section which generates a bitmap of the printed page.  This then goes
to a printer specific driver which converts it into a series of
graphics commands native to the printer.  The driver may consult the
PPD file for defined or allowed options as well and the result is
delivered to the spooler which stores it on disk for a while before
it, or some other daemon, dumps it to the printer.
Somewhere in there the system must try to locate the font resource
specified in the PostScript file, but where exactly, and what form
does the resource take?
All this has taken up far more than the 3.5 minutes I have to spare
each day (and I am not kidding) so help would be appreciated and would
surely be of interest to other members of the list.
 

Understanding linux printer setup is not easy, and
so here is my best try,
The natural output of Linux print commands is in
Printer Control Language 5 (PCL5) , while most
dos inkjet printers rastorize the image files in
Printer Control Language 3 (PCL3) to accomodate
this problem  Ghostscript converts PCL5 to PCL3.
To speak of ghostscript as drivers is something of
a misnomer, as it's a conversion programme.
Your dos inkjet printer has a rastor image processor
chip in PCL3 and a certain amount of buffer as well
but as I understand it the control of the page setup
is what PPD does.
LPD is the local printer daemon and generates the
PCL5 image file , I think? and the image file is
processed through to ghostscript where the conversion
to PCL3 is accomplished, using so called backend filters.
Somewhere in all this is Foomatic , which I have never yet
come across an explanation of.
John

--
John Richard Smith
[EMAIL PROTECTED] 



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] CUPS: importing fonts

2003-03-05 Thread Len Lawrence
On Wed, 05 Mar 2003 10:54:11 +
John Richard Smith [EMAIL PROTECTED] wrote:

 Len Lawrence wrote:
 
 The importing fonts to CUPS saga continues.  Please bear with me -
 this has turned into quite an essay.  
 --- big snip 
 Understanding linux printer setup is not easy, and
 so here is my best try,
 
 The natural output of Linux print commands is in
 Printer Control Language 5 (PCL5) , while most
 dos inkjet printers rastorize the image files in
 Printer Control Language 3 (PCL3) to accomodate
 this problem  Ghostscript converts PCL5 to PCL3.
 To speak of ghostscript as drivers is something of
 a misnomer, as it's a conversion programme.
 
 Your dos inkjet printer has a rastor image processor
 chip in PCL3 and a certain amount of buffer as well
 but as I understand it the control of the page setup
 is what PPD does.
 
 LPD is the local printer daemon and generates the
 PCL5 image file , I think? and the image file is
 processed through to ghostscript where the conversion
 to PCL3 is accomplished, using so called backend filters.
 
 Somewhere in all this is Foomatic , which I have never yet
 come across an explanation of.
Thanks for your comments John.  I agree that printing is a complex issue
which probably explains why LX Format has not replied.  If in two years
research I have not been able to find an explanation of how CUPS deals
with PostScript fonts then they probably cannot afford the time to follow
up my query.  It is obviously not something anybody can answer off the 
top of their head.  So I will continue poking around.  Let's see, at
3.5 minutes a day, I might be getting somewhere by 2025.  You can all look
forward to my article on printing and font handling in LX Format then g.

Thanks also for the information re PCL5 and PCL3.  I had not come across that.
The printer is an HP Deskjet 940C by the way.  

The PPD file contains a list of default fonts which is reflected in a set of
.pfb files in /usr/share/cups/fonts.  It should be possible to use these two
resources to add new fonts - not clear how though.  Any changes seem to be
ignored by CUPS.  It is not even possible to get it to accept a change in the
default typeface, say from Courier to Helvetica.

Cheers mate

-- 
Len Lawrence
--
Opportunities are usually disguised as hard work, so most people don't
recognize them.
--

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


[newbie] CUPS: importing fonts

2003-03-04 Thread Len Lawrence
The importing fonts to CUPS saga continues.  Please bear with me -
this has turned into quite an essay.  

There must be somebody here who understands how CUPS references Type1
fonts.  I have a problem which has resisted solution for well over two
years now.  No help from the CUPS documentation, which comes in eleven
volumes, nor from www.linuxprinting.org, or from any other source.
Linux Format Magazine has refused to respond to two enquiries about
this, nor has anybody on this list responded to previous pleas for
help.  I post this in the hope that some expert might be browsing the
list and willing to shine a little light on this shadowy corner of the
UNIX world.  Any answer needs to be useful in the context of Mandrake
and portable from 8.2 to 9.* - I gather that there has been a recent
change in the way that CUPS and Ghostscript interact.

My specific problem is adding more typefaces to PostScript files
generated from one of my home grown applications; i.e. the file might
reference Andale Mono, Verdana, Tahoma, Densmore or whatever.  Yes, I
do have a Window$ licence, OS not installed.  These are all available
to X and to OpenOffice.org but not apparently to CUPS, and CUPS does
not appear to have a regular mechanism for importing fonts.
Presumably everything has to be done by hand.  I have converted the
TrueType fonts to Type1 .pfb files and placed these in the
/usr/share/cups/fonts directory under the names, for example Verdana,
AndaleMono, Verdana-Bold, etc, in imitation of the existing font names
(and restarted CUPS) but they still print as the default Courier
typeface.  The default set of fonts are listed in the PPD file in
/etc/cups/ppd but it is not clear how font information should be added
to this file.  The meaning of the various fields is not documented.
 
This may all be nonsense.  Maybe the font files should go somewhere in
the Ghostscript font path together with fonts.dir, fonts.scale and
fonts.alias files.  I really don't have a clue.

Before I sign off, this is my impression of how CUPS works:

lpr - CUPS - GS filter   PPD
   ||
   ||
   pstoraster - driver
|
|
 spooler? - printer
  
This again may be wrong.  Please correct me somebody.

In words; a postscript file, for instance, is given to lpr aka
lpr-cups which passes it on to Ghostscript for filtering (if it were
raw text it would be converted to PostScript format).  If the printer
is not PostScript capable, the file is fed to the rasterization
section which generates a bitmap of the printed page.  This then goes
to a printer specific driver which converts it into a series of
graphics commands native to the printer.  The driver may consult the
PPD file for defined or allowed options as well and the result is
delivered to the spooler which stores it on disk for a while before
it, or some other daemon, dumps it to the printer.

Somewhere in there the system must try to locate the font resource
specified in the PostScript file, but where exactly, and what form
does the resource take?

All this has taken up far more than the 3.5 minutes I have to spare
each day (and I am not kidding) so help would be appreciated and would
surely be of interest to other members of the list.


-- 
Len Lawrence
--
Opportunities are usually disguised as hard work, so most people don't
recognize them.
--

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com