Page 1 of 1

Printer Fonts

PostPosted: Tue Feb 14, 2006 6:26 am
by dpaterso
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.

Re: Printer Fonts

PostPosted: Tue Feb 14, 2006 7:52 am
by Enrico Maria Giordano
The only standard non-proportional true type font is Courier New, as far as I know.

EMG

Re: Printer Fonts

PostPosted: Tue Feb 14, 2006 2:50 pm
by E. Bartzokas
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...

PostPosted: Tue Feb 14, 2006 7:08 pm
by James Bott
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.
-----------------------------------