From: André Pönitz Date: Tue, 12 Mar 2002 13:28:57 +0000 (+0000) Subject: remove hack, gain speed... X-Git-Tag: 1.6.10~19673 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e13a6abffbe6d288398eabfe421e9d7736b0327e;p=features.git remove hack, gain speed... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3727 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_support.C b/src/mathed/math_support.C index 21ff9ae1eb..78dc7cefd1 100644 --- a/src/mathed/math_support.C +++ b/src/mathed/math_support.C @@ -759,13 +759,17 @@ void drawStr(Painter & pain, MathTextCodes type, MathMetricsInfo const & size, void drawChar(Painter & pain, MathTextCodes type, MathMetricsInfo const & size, int x, int y, char c) { - string s; - if (isBinaryOp(c, type)) - s += ' '; - s += c; - if (isBinaryOp(c, type)) - s += ' '; - drawStr(pain, type, size, x, y, s); + LyXFont font; + whichFont(font, type, size); + if (isBinaryOp(c, type)) { + pain.text(x, y, ' ', font); + x += lyxfont::width(' ', font); + pain.text(x, y, c, font); + x += lyxfont::width(c, font); + pain.text(x, y, ' ', font); + } else { + pain.text(x, y, c, font); + } }