Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.5.1
-
None
-
Mac OS X Tiger
Mac OS X Leopard( 10.5.8 )
Mac OS X Snow Leopard( 10.6 )
-
-
c0136ace31e5473493b2e366847968e30f7490a2
Description
Requirement : Mac OS X leopard
Locale : Arabic/Hebrew
FontMetrics::width() gives the incorrect the width of the text having more than 2 characters or digits on Mac OS X in RTOL locale.
In my customized widget i am drawing the text at a particular location of the widget and trying to draw the bounding rectangle around it. For this i am asking to the QFontMetrics to give the width of the drawn text and based on thw width returned by QFontMetrics i am drawing the bounding rectangle around the drawn text.
But text gets clipped as the width returned by the QFontMetrics is incorrect.
Following are my observations on the values of the QFontMetrics::width() on Mac OS X
1.in LTOR locale
QFontMetrics::width("1000") returns 41 value
QFontMetrics::width("900") returns 33 value
QFontMetrics::width("90") returns 22 value
2.in RTOL locale
QFontMetrics::width("1000") returns 30 value
QFontMetrics::width("900") returns 22 value
QFontMetrics::width("90") returns 22 value
To prove my point i have attached one sample application which contains customized widget to draw the the text containing more than 2 characters.
In order to reproduce this issue please copy the qt_ar.qm file into sample.app/Contents/MacOS directory. Set the locale to Arabic and then launch the application.
Attachments
Issue Links
- replaces
-
QTBUG-4023 QFontMetrics.width() returns incorrect results with multi-run Arabic text - Mac OS X
- Closed