Bug 499736

Summary: Font features settings are not saved
Product: [Frameworks and Libraries] frameworks-kconfig Reporter: Manuel <mdomlop>
Component: generalAssignee: Matthew Dawson <matthew>
Status: ASSIGNED ---    
Severity: normal CC: ahyangyi, christoph, h2+bugs, kdelibs-bugs-null, nate, roamingfox, zgh7tr89z54fdgzisdw1
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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. ***
Comment 5 Yi Yang 2025-07-27 16:48:57 UTC
Also happens to me.

And this is a regression, because Konsole now defaults to *no OpenType features*, even those that should have been on by default, and was on by default in older versions (liga, rlig, calt) are now disabled and there is no way to enable them.
Comment 6 Bug Janitor Service 2025-09-02 18:41:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kconfig/-/merge_requests/389
Comment 7 Christoph Cullmann 2025-09-02 19:19:57 UTC
*** Bug 479686 has been marked as a duplicate of this bug. ***