Printer Fonts

Printer Fonts

Postby dpaterso » Tue Feb 14, 2006 6:26 am

Does anyone have an idea what parameters to use when defining a printer font that will make the printer print in the equivalent old DOS font size?

What I am trying to say is (for example):

In DOS we had Chr(27) + Chr(15) (usually) which was 'compressed' print and Chr(27) + Chr(18) (usually) which was 'normal' print. What is the equivalent 'Define Font oFont ... Size ...' etc. etc. for 'normal' and 'compressed' fonts.

I don't mean that I want to print using DOS (using TDosPrn) but what the closest fonts to 'normal' and 'compressed' using FWH and Windows printing.

Basically I need a 'normal' and 'compressed' font that does not use proportional spacing.

I hope my question makes sense.

Regards,

Dale.
dpaterso
 
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa

Re: Printer Fonts

Postby Enrico Maria Giordano » Tue Feb 14, 2006 7:52 am

The only standard non-proportional true type font is Courier New, as far as I know.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Printer Fonts

Postby E. Bartzokas » Tue Feb 14, 2006 2:50 pm

EnricoMaria wrote:The only standard non-proportional true type font is Courier New, as far as I know.

EMG


There is also OCR-A that is non-proportional...

The point is that the way to do what you want, is to use CMPRINT().
You need to know exactly the physical width of what you print, and compare how much space the smaller font will occupy... Not an easy job for sure.

My recommendation is to convert your text to some Rich Text format, and print it as a richtext format... I have no more suggestions, because I have not done it, but am sure there is a way to do it...
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby James Bott » Tue Feb 14, 2006 7:08 pm

Dale,

Below are some notes from my files on emulating DOS printing.

James

---------------------------------
ASCII printing uses a fixed pitch font and the only one that comes with Windows is Courier New. To emulate standard ASCII 80 characters per line printing define a 12 point font as follows:

define font oFont name "Courier New" size 0,-12

To get 92 characters define a 10 point font (SIZE 0,-10).

Note, however, that DOS ASCII printing uses the same height font regradless of how many characters per line. I.E. 80 chars are the same height as 132 chars (compressed mode). Windows fonts become shorter as the point size is reduced. To maintain the same font height and get more characters per line just define the font as 12 point (SIZE 0,-12) then multiple oFont:nWidth by a correction factor. For example, to get a simulated compressed typeface (132 characters per line):

FONT oFont name "Courier New" size 0,-12

oFont:nWidth:= oFont:nWidth * (80/132)

This will give you the same number of lines per page (66) as you would get with ASCII printing.
-----------------------------------
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 73 guests