Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to change character set of printer's font Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
26-Jul-03
Category
Reporting /Printing
Language
Delphi 2.x
Views
157
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Güray CELIK

How to change character set of printer's font?

Answer:

1   uses Sysutils, Printers;
2   
3   procedure TForm1.Button1Click(Sender: TObject);
4   var
5     Dosya: TextFile
6   begin
7     with Printer do
8     begin
9       AssignPrn(Dosya);
10      Rewrite(Dosya);
11      Printer.Canvas.Font.Name := 'Courier New';
12      Printer.Canvas.Font.Style := [fsBold];
13      Printer.Canvas.Font.Size := 18;
14  
15      //****for Turkish special characters
16      Writeln(Dosya, '?üi??ö?');
17  
18      //****set Font CharSet to Turkish(162)
19      Printer.Canvas.Font.Charset := 162;
20      Writeln(Dosya, '?üi??ö?');
21  
22      CloseFile(Dosya);
23    end;
24  end;


The following table lists the predefined constants provided for standard character 
sets: 

25  type
26    TFontCharset = 0..255;


Constant Value Description 

ANSI_CHARSET 0 ANSI characters. 
DEFAULT_CHARSET 1 Font is chosen based solely on Name and Size. If the described 
font is not available on the system, Windows will substitute another font. 
SYMBOL_CHARSET 2 Standard symbol set. 
MAC_CHARSET 77 Macintosh characters. Not available on NT 3.51. 
SHIFTJIS_CHARSET 128 Japanese shift-jis characters. 
HANGEUL_CHARSET 129 Korean characters (Wansung). 
JOHAB_CHARSET 130 Korean characters (Johab). Not available on NT 3.51 

GB2312_CHARSET 134 Simplified Chinese characters (mainland china). 
CHINESEBIG5_CHARSET 136 Traditional Chinese characters (taiwanese). 
GREEK_CHARSET 161 Greek characters. Not available on NT 3.51. 
TURKISH_CHARSET 162 Turkish characters. Not available on NT 3.51 
VIETNAMESE_CHARSET 163 Vietnamese characters. Not available on NT 3.51. 
HEBREW_CHARSET 177 Hebrew characters. Not available on NT 3.51 
ARABIC_CHARSET 178 Arabic characters. Not available on NT 3.51 

BALTIC_CHARSET 186 Baltic characters. Not available on NT 3.51. 
RUSSIAN_CHARSET 204 Cyrillic characters. Not available on NT 3.51. 
THAI_CHARSET 222 Thai characters. Not available on NT 3.51 
EASTEUROPE_CHARSET 238 Includes diacritical marks for eastern european countries. 
Not available on NT 3.51. 
OEM_CHARSET 255 Depends on the codepage of the operating system. 

			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC