Commit bd3de374 authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

Add a TODO about Qt6 removing QFont::ForceIntegerMetrics

parent 68e9f474
...@@ -55,6 +55,8 @@ namespace Konsole ...@@ -55,6 +55,8 @@ namespace Konsole
strategy |= m_antialiasText ? QFont::PreferAntialias : QFont::NoAntialias; strategy |= m_antialiasText ? QFont::PreferAntialias : QFont::NoAntialias;
// Konsole cannot handle non-integer font metrics // Konsole cannot handle non-integer font metrics
// TODO: Qt6 will remove ForceIntegerMetrics
// "Use QFontMetrics to retrieve rounded font metrics."
strategy |= QFont::ForceIntegerMetrics; strategy |= QFont::ForceIntegerMetrics;
// In case the provided font doesn't have some specific characters it should // In case the provided font doesn't have some specific characters it should
...@@ -71,6 +73,8 @@ namespace Konsole ...@@ -71,6 +73,8 @@ namespace Konsole
// Font listed in profile's dialog will not be updated. // Font listed in profile's dialog will not be updated.
newFont = QFont(QStringLiteral("Monospace")); newFont = QFont(QStringLiteral("Monospace"));
// Set style strategy without ForceIntegerMetrics for the font // Set style strategy without ForceIntegerMetrics for the font
// TODO: Qt6 will remove ForceIntegerMetrics
// "Use QFontMetrics to retrieve rounded font metrics."
strategy &= ~QFont::ForceIntegerMetrics; strategy &= ~QFont::ForceIntegerMetrics;
newFont.setStyleHint(QFont::TypeWriter, QFont::StyleStrategy(strategy)); newFont.setStyleHint(QFont::TypeWriter, QFont::StyleStrategy(strategy));
qCDebug(KonsoleDebug)<<"Font changed to "<<newFont.toString(); qCDebug(KonsoleDebug)<<"Font changed to "<<newFont.toString();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment