Bug 496012 - Web Browser plasmoid and KHelpCenter's QtWebEngine does not adhere to the Fonts KCM's preferences.
Summary: Web Browser plasmoid and KHelpCenter's QtWebEngine does not adhere to the Fon...
Status: RESOLVED UPSTREAM
Alias: None
Product: kdeplasma-addons
Classification: Plasma
Component: Web Browser (show other bugs)
Version: 6.2.2
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-09 15:31 UTC by Roke Julian Lockhart Beedell
Modified: 2024-12-03 16:00 UTC (History)
1 user (show)

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


Attachments
Screenshot of the Web Browser plasmoid at a "file"-schema URI. (300.95 KB, image/png)
2024-11-09 15:31 UTC, Roke Julian Lockhart Beedell
Details
Screenshot of the "Fonts" KCM. (36.61 KB, image/png)
2024-11-09 15:31 UTC, Roke Julian Lockhart Beedell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roke Julian Lockhart Beedell 2024-11-09 15:31:05 UTC
Created attachment 175679 [details]
Screenshot of the Web Browser plasmoid at a "file"-schema URI.

SUMMARY
-------
My `kcm_fonts` font preferences are not applied to Web Browser's embedded Chromium instance.

STEPS TO REPRODUCE
------------------
1. Add the Web Browser plasmoid to the `plasmashell` desktop.
2. Render any HTML file (at any URI) that doesn't explicitly define a font.

OBSERVED RESULT
---------------
My `kcm_fonts` font preferences are not applied to the embedded Chromium instance.

EXPECTED RESULT
---------------
They should be.

SOFTWARE/OS VERSIONS
--------------------
> ```YAML
> Operating System: Fedora Linux 41
> KDE Plasma Version: 6.2.2
> KDE Frameworks Version: 6.7.0
> Qt Version: 6.8.0
> Kernel Version: 6.11.6-300.fc41.x86_64 (64-bit)
> Graphics Platform: Wayland
> Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
> Memory: 30.4 GiB of RAM
> Graphics Processor: AMD Radeon RX 5700
> Manufacturer: ASRock
> Product Name: X670E Taichi
> ```

ADDITIONAL INFORMATION
----------------------

I have filed a similar ticket for the *icons* upstream — at https://issues.chromium.org/issues/378121132#comment1. I didn't consider that to be worth reporting here.

This ticket differs to that, because the font fallbacks are an unfortunate consequence of backward compatibility which Google has no desire to remediate.
Comment 1 Roke Julian Lockhart Beedell 2024-11-09 15:31:22 UTC
Created attachment 175680 [details]
Screenshot of the "Fonts" KCM.
Comment 2 Nate Graham 2024-11-13 18:55:39 UTC
Yes, that's because it internally uses QtWebEngine which uses Chromium which doesn't respect these settings.
Comment 3 Roke Julian Lockhart Beedell 2024-11-13 19:18:44 UTC
(In reply to Nate Graham from comment #2)

Thanks. I thought it embedded Chromium directly. Per https://forum.qt.io/post/437001, it seems like Qt can consume the system font is a platform-independent manner, so I'll take this upstream, to the QtWebEngine developers.
Comment 4 Roke Julian Lockhart Beedell 2024-11-13 19:21:05 UTC
(In reply to Nate Graham from comment #2)

On this note, I wanted to file another issue for the same, but about the colour scheme. However, I'd like to know whether it would best be filed here, or, again, at Qt's Jira, instead. Specifically, the undermentioned CSS code:

```CSS
HTML { color-scheme: light dark !important; }
```

...should make the browser utilize the in-use `.colors` file. This works on Firefox (Gecko) but not the Web Browser. I presume that Qt at least understands colour schemes - so again, this is not the purview of KDE Frameworks specifically?
Comment 5 Nate Graham 2024-11-14 17:06:20 UTC
Qt, yeah.
Comment 6 Roke Julian Lockhart Beedell 2024-12-03 15:54:33 UTC
(In reply to Nate Graham from comment #5)
Thanks. Reported to https://bugreports.qt.io/browse/QTBUG-131844.