[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [konsole/frameworks] src: Issue a warning when not matching a font exactly
From:       Casian Andrei <skeletk13 () gmail ! com>
Date:       2014-07-21 13:55:59
Message-ID: E1X9E4N-0000ab-4t () scm ! kde ! org
[Download RAW message or body]

Git commit e6fa0276a55cb915adb2e1c0e43879d8b8c14d65 by Casian Andrei.
Committed on 21/07/2014 at 13:50.
Pushed by casianandrei into branch 'frameworks'.

Issue a warning when not matching a font exactly

When setting a font for the terminal, if it is not found properly by the
system, Qt attempts to use another font which is not an exact match. It
happens that the other font is not fixed-pitch, so konsole ends up using
an unsupported variable-pitch font for the terminal.

Place a warning when an exact match for the desired font has not been
found.

M  +4    -0    src/TerminalDisplay.cpp

http://commits.kde.org/konsole/e6fa0276a55cb915adb2e1c0e43879d8b8c14d65

diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp
index eb9c9f0..4d5bd8a 100644
--- a/src/TerminalDisplay.cpp
+++ b/src/TerminalDisplay.cpp
@@ -209,6 +209,10 @@ void TerminalDisplay::setVTFont(const QFont& f)
 =

     QFontMetrics metrics(font);
 =

+    if (!QFontInfo(font).exactMatch()) {
+        kWarning() << "The font for use in the terminal has not been match=
ed exactly. Perhaps it has not been found properly.";
+    }
+
     if (!QFontInfo(font).fixedPitch()) {
         kWarning() << "Using an unsupported variable-width font in the ter=
minal.  This may produce display errors.";
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic