IDE: Delphi 2010, VPE: 6.10
I think, there is a problem rendering plain text with RenderPrint(). Calculating the height of a line with a given font with i.e. RenderPrint(0,0,'X') returns a wrong value.
Example:
SetFont('Arial', 11);
RenderPrint(0,0,'X');
hLine := nRenderHeight;
Write(x1, y1, x2, VFREE, SomeLongerPlainText); //in my case 23 Lines in the Preview
hText := nBottom - y1;
nLInes := hText / hLine;
In my case the result for nLines is 22.043..., the preview shows 23 lines.
I found, that the real line height is 0.4407..., the value of nRenderHeight returns 0.45992.
I need manual calculation to avoid single lines of a paragraph a the bottom or top of a page.
How can I calculate the lines count? In version 3.x this was very easy and returned exact values.