Hello,
I see a GetStringWidth but I do not see one for height? Am I missing it?
Thanks again!
wxPdfDocument Calculating Text Height Topic is solved
-
- Earned some good credits
- Posts: 125
- Joined: Wed Oct 28, 2015 9:48 pm
Re: wxPdfDocument Calculating Text Height
The method you are seeking for is GetFontSize. This method returns the size of the currently selected font in points, where 1 point equals 1/72 inch. It is not necessary to calculate the text height of a text string, because it is determined by the font size.Everydaydiesel wrote:I see a GetStringWidth but I do not see one for height? Am I missing it?
For readable text output the line height should typically be about 25 % higher than the font size.
If you need more details about the currently selected font, you can use method GetDescription of the wxPdfFont class, which returns a wxPdfFontDescription object.
Regards,
Ulrich