Ah, now it seems that Photoshop is the highest and the lowest pixel of the font to determine the height of the bounding rect.
The is not correct for a real bounding rect.
The upper and lower distance from font pixel to the bounding rect can be different when you are using different fonts. That’s why it is not linear.
To get the photoshop height you have to calculate the height like:
int height = fontM.boundingRect() – fontM.ascent() -fontM.descent();
I hope that this will solve partially your problem.
Cheers
Juergen
↧