Solved

Fixed fonts

Posted on 1997-05-10
6
308 Views
Last Modified: 2013-12-02
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
Comment
Question by:softinfo
  • 4
  • 2
6 Comments
 

Accepted Solution

by:
fcver earned 50 total points
ID: 1336092
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
 

Author Comment

by:softinfo
ID: 1336093
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
 

Author Comment

by:softinfo
ID: 1336094
Edited text of question
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Expert Comment

by:fcver
ID: 1336095
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
 

Author Comment

by:softinfo
ID: 1336096
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
 

Author Comment

by:softinfo
ID: 1336097
My  email address : mark.jacobs@club.innet.be
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now