Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Font question

Reply
Thread Tools

Font question

 
 
Huub
Guest
Posts: n/a
 
      04-27-2007
Hi,

I'm trying to get plain text printed in Courier font. When looking at
CPAN, I find about 39 modules for handling fonts, but none for plain
text. Is there a module for that? BTW, I used font+courier as a search
string in CPAN.

Thanks,

Huub
 
Reply With Quote
 
 
 
 
J. Gleixner
Guest
Posts: n/a
 
      04-27-2007
Huub wrote:
> Hi,
>
> I'm trying to get plain text printed in Courier font. When looking at
> CPAN, I find about 39 modules for handling fonts, but none for plain
> text. Is there a module for that? BTW, I used font+courier as a search
> string in CPAN.


Where medium are you printing it to?
 
Reply With Quote
 
 
 
 
Brian McCauley
Guest
Posts: n/a
 
      04-27-2007
On Apr 27, 3:59 pm, Huub <"v.niekerk at hccnet.nl"> wrote:

> I'm trying to get plain text printed in Courier font. When looking at
> CPAN, I find about 39 modules for handling fonts, but none for plain
> text.


Plain text doesn't have a font. The only way you could associate a
fond with a plain text file would be by settings on your print job or
print queue or printer.

A J. Gleixner asked: Where medium are you printing it to?

And by what mechanism on what OS?

 
Reply With Quote
 
Huub
Guest
Posts: n/a
 
      04-27-2007
> Plain text doesn't have a font. The only way you could associate a
> fond with a plain text file would be by settings on your print job or
> print queue or printer.
>
> A J. Gleixner asked: Where medium are you printing it to?
>
> And by what mechanism on what OS?
>


I'm using Fedora 6 and a Perl-script reading from MySQL printing plain
text to a DeskJet520.
If plain text doesn't have a font, then how can I set this printer to
print the correct font? It seems to use PCL5, but I haven't been able to
find a way to use that from Perl.

Thanks for helping.
 
Reply With Quote
 
Brian McCauley
Guest
Posts: n/a
 
      04-27-2007
On Apr 27, 7:28 pm, Huub <"v.niekerk at hccnet.nl"> wrote:
> > Plain text doesn't have a font. The only way you could associate a
> > fond with a plain text file would be by settings on your print job or
> > print queue or printer.

>
> > A J. Gleixner asked: Where medium are you printing it to?

>
> > And by what mechanism on what OS?

>
> I'm using Fedora 6 and a Perl-script reading from MySQL printing plain
> text to a DeskJet520.
> If plain text doesn't have a font, then how can I set this printer to
> print the correct font? It seems to use PCL5, but I haven't been able to
> find a way to use that from Perl.


Are you opening the printer directly as /dev/whatever or are you
sending the output via lpr? If you are using lpr then there are
probably switches you can use to specify the font to be used for pain
text.

I don't know which of the many lpr implementations available on Linux
Fedora will install by default.

If you are talking direct to /dev/whatever (or using lpr in raw mode)
I don't think there are any PCL modules as such in Perl but there's
nothing stopping you looking up the escape sequence in a PCL manual
and manually doing print("\e(s4099T") [1].

[1] That's untested. I just did a quick Google and glanced at the
following HP manuals:

http://h20000.www2.hp.com/bc/docs/su...0/bpl13210.pdf
http://lprng.sourceforge.net/DISTRIB...S/pcl5comp.pdf


 
Reply With Quote
 
Huub
Guest
Posts: n/a
 
      04-27-2007
>
> Are you opening the printer directly as /dev/whatever or are you
> sending the output via lpr? If you are using lpr then there are
> probably switches you can use to specify the font to be used for pain
> text.
>
> I don't know which of the many lpr implementations available on Linux
> Fedora will install by default.


I'm opening the printer by using lpr.

>
> If you are talking direct to /dev/whatever (or using lpr in raw mode)
> I don't think there are any PCL modules as such in Perl but there's
> nothing stopping you looking up the escape sequence in a PCL manual
> and manually doing print("\e(s4099T") [1].


I found some escape-sequences in a PCL manual, but I found out that was
the wrong PCL version so that didn't work.

>
> [1] That's untested. I just did a quick Google and glanced at the
> following HP manuals:
>
> http://h20000.www2.hp.com/bc/docs/su...0/bpl13210.pdf
> http://lprng.sourceforge.net/DISTRIB...S/pcl5comp.pdf
>
>


Thanks for the links. I'll try the manual print....
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Swing Font, it's Java Font? ot native? how install new font? mttc Java 2 07-03-2009 07:29 PM
How to get the text in html tag.like<div...><font...>Text</font></ =?Utf-8?B?Tmlja3k=?= ASP .Net 2 02-20-2005 03:03 PM
Font class, external font files question Karl Hungus ASP .Net 1 02-04-2004 04:26 PM
JavaRE 1.4.2 font alias in /lib/font.properties (Linux) Nick Spinel Java 0 07-25-2003 08:28 AM
physical font specified but true type font file not available Michael Glavitsch Java 1 07-15-2003 07:09 PM



Advertisments