controlling fonts while printing in gwbasic

February 15, 2013 at 06:29:06
Specs: Windows XP
Hi there,
I want to know that how can I control the fonts during printing as the programs are written in GW-BASIC , Please help at your earliest .
Regards,
Afghani

See More: controlling fonts while printing in gwbasic

Report •


#1
February 15, 2013 at 06:50:50
To control fonts while coding in GWBasic needs command codes embedded in printing stream as for any DOS program. Command codes are specific for the printer you use, there are three main families ESC/P for Epson, PCL for HP and IBM for IBM. Beware modern printers don't support printing codes if not reported by their technical guide; this is the case of pure GDI Win printers.

So you have to see if your printer supports a command code and what. Then if supported find (googling) the sequences you want to implement.


Report •

#2
February 15, 2013 at 10:24:02
Out of curiosity can you see the Font tab if you right click the program file GWBASIC.EXE or a shortcut to it?

Always pop back and let us know the outcome - thanks


Report •

#3
February 15, 2013 at 17:01:01
@Derek:
Yes, it gives you the fonts option - different heights and widths mostly, none of the "fancy" stuff, and of course the screen-font won't affect the printer output. The only way to get access to the calligraphic fonts, using gwbasic, would be to print into a html page or a text-file for importing into a word-processor. If international char sets are needed, the code-page handles that, but I don't know much about code-page, or whether it would print hardcopy.

Report •

Related Solutions

#4
February 15, 2013 at 18:02:31
nbrane (& IVO)

Thanks guys - I see where you are coming from.

Always pop back and let us know the outcome - thanks


Report •

#5
February 16, 2013 at 06:04:38
Thanks a lot for the prompt reply , I remember back in 1992 one of my gwbasic teacher use to write LPRINT command within the program to reduce or enlarge the printout , But I can't recall the exact command now , Well thanks anyways , Looking forward to hear from some one soon enough.

Report •

#6
February 16, 2013 at 06:32:01
If you specify the printer you are connected and how you want to manipulate your fonts, maybe I can give you the wished sequences. I too however have to walk through my legacy handbooks.

Report •

#7
February 16, 2013 at 09:25:06
This might be of general interest:
http://www.antonis.de/qbebooks/gwba...

Always pop back and let us know the outcome - thanks


Report •

#8
February 16, 2013 at 11:26:51
Yeh, I don't think it's a gwbasic issue so much as a printer-control issue. I use qbasic to send esc-codes to set up my epson dot-mat for various sizes and fonts. It's quite simple (I'll add line no.s for gw compat):
'set up printer for big printing
20 E$ = CHR$(27)
40 OPEN "LPT1" FOR OUTPUT AS #2
50 'Note: 3A sets vert. pitch to A, change for desired preference (A=asc.65
60 ' and represents 65/180ths inch)
70 PRINT #2, E$ + "@" + E$ + "W1" + E$ + "w1" + E$ + "3A";
80 CLOSE
90 PRINT "PRINTER IS NOW SET TO BIG FONT: 5CPI, 4LPI (5/16)"
100 END
110 SYSTEM

But, as has been pointed out, you need to tailor the codes to your printer make/model, this just works for ESC/P (Epson-based) printers.


Report •


Ask Question