Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Fixed fonts

Posted on 1997-05-10
6
Medium Priority
?
330 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 

Accepted Solution

by:
fcver earned 150 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

636 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