Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
FontLoader {
id: materialFont
source: "https://github.com/google/material-design-icons/blob/master/font/MaterialIcons-Regular.ttf?raw=true"
AFAIK it will download the font again each time you run QML containing something like that. And QQuickFontLoader has such an NIH implementation anyway, sharing nothing with the image-loading code, which also in turn is not using a virtual filesystem as it should (QTBUG-108146).
One goal would be that if you have downloaded it once, it should be transparently cached.
Another goal might be that if we can somehow verify that the same font is already installed as a system font, there is no need to download it at all. But of course that's trickier: system fonts are found by parametric search (family name, weight, possibly foundry, etc.) whereas here we have only a filename. It would be nice if the web server could provide the hash of the file and if the font database also could look it up by that hash, or something like that; but I suppose it's a bit far-fetched compared to uncoordinated reality, and even then it would still need to ask the web server for the hash, which is not suitable for fully offline usage. Or maybe the font database could look it up by filename, and we can just assume it's probably the same font: that could work offline.
Attachments
Issue Links
- depends on
-
QTBUG-108146 move remote resource loading from Qt Quick to QtCore
- Reported