TeeSaveToPDFFile draws random gap between text characters
Posted: 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):
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.
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)+' ');
I would suggest to add the dynamic type check and overload function FontProperties accordingly.