- int slen = text.length();
-
- if (m_font.Ok())
- {
- // Calculate text extent.
- WXFontStructPtr pFontStruct =
- m_font.GetFontStruct(m_userScaleY*m_logicalScaleY, m_display);
- int direction, descent;
- XCharStruct overall_return;
-#if 0
- if (use16)
- (void)XTextExtents16((XFontStruct*) pFontStruct,
- (XChar2b *)(const char*) text,
- slen, &direction,
- &ascent, &descent, &overall_return);
- else
-#endif // 0
- (void)XTextExtents((XFontStruct*) pFontStruct,
- wxConstCast(text.c_str(), char),
- slen, &direction,
- &ascent, &descent, &overall_return);