Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.7.0, 5.8.0
Description
On certain fonts like Arial with narrow characters (i, j, t, etc), QFontMetrics is returning a width (boundingRect) that is too short. For example, setting the font size to both 12 and 14 returns the same width. The 14 pt width should be longer, but it is not. When this width is used in OpenGL rendering of text., the text is being cutoff at 14pt, 18pt, 22pt, 28pt, 34pt, 40pt, 44pt because the returned width is too short. Problem is magnified when italics and boldness is applied. For comparison, Microsoft PowerPoint has unique widths for all these point sizes. This problem also happens for many fonts and at many point sizes.
Attached is an example that shows the result of bounding rect for both 12 and 14 font sizes.