TeeSaveToPDFFile draws random gap between text characters

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Collinor
Newbie
Newbie
Posts: 3
Joined: Wed Oct 19, 2011 12:00 am

TeeSaveToPDFFile draws random gap between text characters

Post by Collinor » Fri Jan 06, 2012 12:18 pm

TeeChart's TeeSaveToPDFFile function does not work reliable, since a random gap is drawn between characters of text. Only if this gap is 0, output is OK.

Inspecting the source code, I found the following lines in TeePDFCanvas.TPDFCanvas.RotateLabel(x,y:Integer; Const St:String; RotDegree:Double):

Code: Select all

    if Assigned(IFont) then
       WriteStringToStream(FCStream,FontProperties(IFont,FontIndex)+' ')
    else
       WriteStringToStream(FCStream,FontProperties(TTeeFont(Font),FontIndex)+' ');
The last line is critical, since it misses a dynamic type check whether Font is actually a TTeeFont. If Font is not a TTeeFont, the Font's InterCharSize property returns a random value in function FontProperties which causes the random gap to be drawn.
I would suggest to add the dynamic type check and overload function FontProperties accordingly.

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeSaveToPDFFile draws random gap between text characters

Post by Yeray » Mon Jan 09, 2012 2:31 pm

Hi Collinor,

I've added it to the wish list to be revised asap (TV52015997).
Thanks for reporting it.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply