From 8787a21b676dcbc4caaef6aa61ba75fa3ccced33 Mon Sep 17 00:00:00 2001 From: Petr Vanek Date: Sat, 13 Nov 2010 13:55:08 +0100 Subject: [PATCH] font display fix on mac (widths in int) --- lib/TerminalDisplay.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/TerminalDisplay.cpp b/lib/TerminalDisplay.cpp index 1b8805c..8299c44 100644 --- a/lib/TerminalDisplay.cpp +++ b/lib/TerminalDisplay.cpp @@ -232,6 +232,14 @@ void TerminalDisplay::setVTFont(const QFont& f) { QFont font = f; +#ifdef Q_WS_MAC +#if QT_VERSION >= 0x040700 + font.setStyleStrategy(QFont::ForceIntegerMetrics); +#else +#warning "Correct handling of the QFont metrics requited Qt>=4.7" +#endif +#endif + QFontMetrics metrics(font); if ( !QFontInfo(font).fixedPitch() ) {