On 18 Dec 2023, at 11:20, Allan Sandfeld Jensen <k...@carewolf.com> wrote: On Montag, 18. Dezember 2023 05:14:38 CET Thomas Larsen Wessel wrote: So in short, if I want to find a generic way of getting / querying / installing fonts across OS'es (including Windows), fontconfig is probably not the way to go, though it may technically be possible.
Yeah, that is complicated. I think you can do it with Qt APIs, but I wouldn't know how myself. For getting/querying, QFontDatabase is your friend. For installing a font: if it’s enough to add the font so that your application can use it, then QFontDatabase::addApplicationFont, with a font file you ship separately or as a resource. There's no API in Qt to install a font file with the system. Your application might not have the privileges to do so, so if you need that, then you’d probably best do that as part of your installation routine. Volker
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest