From e13a6abffbe6d288398eabfe421e9d7736b0327e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Tue, 12 Mar 2002 13:28:57 +0000 Subject: [PATCH] remove hack, gain speed... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3727 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_support.C | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) 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); + } } -- 2.39.2