Summary: | Font features settings are not saved | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kconfig | Reporter: | Manuel <mdomlop> |
Component: | general | Assignee: | 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
Confirmed on git master Konsole flatpak. *** Bug 500331 has been marked as a duplicate of this bug. *** 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 *** Bug 497987 has been marked as a duplicate of this bug. *** 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. A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kconfig/-/merge_requests/389 *** Bug 479686 has been marked as a duplicate of this bug. *** |