Page 1 of 1

TeeSaveToPDFFile draws random gap between text characters

Posted: Fri Jan 06, 2012 12:18 pm
by 16560497
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.

Re: TeeSaveToPDFFile draws random gap between text characters

Posted: Mon Jan 09, 2012 2:31 pm
by yeray
Hi Collinor,

I've added it to the wish list to be revised asap (TV52015997).
Thanks for reporting it.