Solved

Fixed fonts

Posted on 1997-05-10
6
309 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
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…

895 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