0

Here is a scenario: I added a text to the canvas. When I try to find the height of the text using property attribute current-height, it seems to be giving the height of bounding box instead of actual text height. There is space above&below the characters which is also calculated with the text height.

I want to have actual text height without the height of white space in-between the the character tip and bounding box tip.

Any suggestions will be helpful.

1 Answers1

0

By now, the only way to get the real height of text, is cloning text in white canvas, draw text, get canvas as image, and check pixel by pixel to get where starts and end the text. Here“s a usefull answer with a snippet included.

Community
  • 1
  • 1
Prescol
  • 615
  • 5
  • 12