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 use the GetKerningPairs function 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
23-Oct-03
Category
Algorithm
Language
Delphi 5.x
Views
122
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Lou Adler

I want to display text with the correct kerning (spacing). GetKerningPairs is a 
function I need for that, but I have no clue how to use it.

Answer:

1   { ... }
2   type
3     TKerningpairarray = array[0..600] of Kerningpair;
4     { ... }
5   
6   var
7     kpa: TKerningpairarray;
8   
9     { ... }
10  var
11    i, Num: Integer;
12  begin
13    Canvas.Font.Name := 'Arial';
14    Num := GetKerningPairs(Canvas.Handle, 600, kpa);
15    Memo1.Text := '';
16    for i := 0 to Num - 1 do
17      Memo1.Lines.Add(IntToStr(kpa[i].wfirst) + ', ' + IntToStr(kpa[i].wsecond) + ', '
18        + IntToStr(kpa[i].ikernamount));
19  end;


			
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