Details
-
Type:
Task
-
Status: Reported
-
Priority:
P2: Important
-
Resolution: Unresolved
-
Affects Version/s: 5.15, 6.0.0
-
Fix Version/s: Some future release
-
Component/s: GUI: Font handling
-
Labels:None
-
Platform/s:
-
Technical Risk:Normal
-
Epic Link:
Description
Today, Qt applications built for WebAssembly are not able to access locally installed fonts, and must instead embed font files as application resources. Qt ships one or two default fonts.
This is not ideal for several reasons: the user may want to use a different font face, and expects that locally installed fonts are available. The default-shipped fonts have limited character coverage.
There are a couple of options to improve the situation:
- Add support for web fonts. The application developer could then declare which fonts to use, and qtloader.js will download the font files at startup, either from fonts.google.com or from the app web server.
- Use Web API which gives Qt access to the font data. Such API is being developed, at least for Chrome:
https://bugs.chromium.org/p/chromium/issues/detail?id=535764
https://bugs.chromium.org/p/chromium/issues/detail?id=982054
https://github.com/slightlyoff/local_font_access