Bug 499736 - Font features settings are not saved
Summary: Font features settings are not saved
Status: CONFIRMED
Alias: None
Product: frameworks-kconfig
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Matthew Dawson
URL:
Keywords:
: 497987 500331 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-02-10 05:40 UTC by Manuel
Modified: 2025-03-30 17:35 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel 2025-02-10 05:40:52 UTC
SUMMARY

Font features settings are not saved.

STEPS TO REPRODUCE

1. Go to "Edit current profile" -> "Appearence" -> "Font" -> "Choose" - "Comma separated font features (e. g. liga, calt):"
2. Type: "zero" (without quotes).
3.  Click the OK button.
4. Click the OK button (or Apply and OK).
5. Close Konsole
6. Open Konsole

OBSERVED RESULT

In the third step you can see how the terminal font adopts the established features and they are maintained while the program is open. But those changes are not saved. When I close and reopen Konsole, I can see that those font features are not preserved.

I have observed that this option works correctly in other programs, such as Kwrite.

I am on Artix Linux, but the exact same error occurs in other distributions such as Debian testing.

EXPECTED RESULT

That the changes are maintained, just as they do in other programs such as Kwrite.

SOFTWARE/OS VERSIONS

Operating System: Artix Linux (kernel 6.13.1-artix1-1)
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.13.1-artix1-1 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 Justin Zobel 2025-02-10 09:02:22 UTC
Confirmed on git master Konsole flatpak.
Comment 2 zgh7tr89z54fdgzisdw1 2025-02-18 17:24:46 UTC
*** Bug 500331 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Cullmann 2025-03-24 17:45:22 UTC
Needs to be fixed in the read/write of fonts in the framework, KTextEditor workarounds with


    // read font, including font features
    auto font = config.readEntry(KEY_FONT, QFontDatabase::systemFont(QFontDatabase::FixedFont));
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
    const QStringList rawFeaturesList = config.readEntry(KEY_FONT_FEATURES, QStringList());
    for (const QString &feature : rawFeaturesList) {
        const auto parts = feature.split(QStringLiteral("="), Qt::SkipEmptyParts);
        if (parts.length() == 2) {
            const auto tag = QFont::Tag::fromString(parts[0]);
            bool ok = false;
            const int number = parts[1].toInt(&ok);
            if (tag.has_value() && ok) {
                font.setFeature(tag.value(), number);
            }
        }
    }
#endif


and


    // write font, including font features
    const auto font = baseFont();
    config.writeEntry(KEY_FONT, font);
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
    const auto tags = font.featureTags();
    QStringList features;
    for (const auto &tag : tags) {
        const QString name = QString::fromUtf8(tag.toString());
        const quint32 value = font.featureValue(tag);
        features.push_back(QStringLiteral("%1=%2").arg(name, QString::number(value)));
    }
    config.writeEntry(KEY_FONT_FEATURES, features);
#endif
Comment 4 Christoph Cullmann 2025-03-30 17:35:18 UTC
*** Bug 497987 has been marked as a duplicate of this bug. ***