[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

Fixed fonts

How can I print in Delphi  1.0 with fixed (no proportional) fonts and the PC-8 symbol set  when using the writeln commands.
I'm converting a Clipper program to Delphi, but for a while the customer has to use both. In the mean time both programs must generate output with the same style (so standard DOS print)
The output is generated by reading an ASCII txt  file, changing some fields and writing it to the printer.
Even with adding the statements ...canvas.font.name := 'Courier' and ..canvas.font.size:= 12, I still get a proportional font.
0
softinfo
Asked:
softinfo
  • 4
  • 2
1 Solution
 
fcverCommented:
To print in Delphi you should use TPrinter class.
The printed surface represented by TPrinter.Canvas property
To change print font you should set Canvas.Font.Name to
the name of fixed font.

Windows fixed fonts are : Courier TTF, Courier, FixedSys or
may be you have some another.
You can choose font which look like you need.



0
 
softinfoAuthor Commented:
I've tried this solution but it does not work completely. I've added ...font.name :='FixedSys' and ...font.size:=12 statement but I get a proportional font.
When i added some esc sequences at the beginning of the text file that  I want to print: <esc>(s0P to get fixed spacing and <esc>(10U to get PC-8 Symbol set, but this is naturally not a good final solution.
0
 
softinfoAuthor Commented:
Edited text of question
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
fcverCommented:
Fixed font means that all letters and spaces have the same width. Courier, FixedSys are such fonts. All letter widht are the same.

That do you mean proportional, May be I didn't understand something.

Btw, have you email, my : vlads@uniyar.ac.ru
0
 
softinfoAuthor Commented:
The way you described fixed font is my understanding also from fixed and  proportional fonts.
So, even with adding a font.name := 'FixedSys' statement, I didn't get a fixed font. Is maybe the order of the statements (assign, font.name, writeln) important?
0
 
softinfoAuthor Commented:
My  email address : mark.jacobs@club.innet.be
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now