def get_text_width_height_descent(self, s, prop, ismath):
<EOL>if ismath: s = self.strip_math(s)<EOL>if self.gc is None:<EOL><INDENT>gc = self.new_gc()<EOL><DEDENT>else:<EOL><INDENT>gc = self.gc<EOL><DEDENT>gfx_ctx = gc.gfx_ctx<EOL>font = self.get_wx_font(s, prop)<EOL>gfx_ctx.SetFont(font, wx.BLACK)<EOL>w, h, descent, leading = gfx_ctx.GetFullTextExtent(s)<EOL>return w, h, descent<EOL>
get the width and height in display coords of the string s
with FontPropertry prop