diff options
author | Morten Sørvig <morten.sorvig@qt.io> | 2023-12-07 14:10:45 +0100 |
---|---|---|
committer | Morten Sørvig <morten.sorvig@qt.io> | 2023-12-18 23:07:13 +0100 |
commit | a5bccd2496e0e06edf864385c1865d3faca9d1ac (patch) | |
tree | d9be57cecae1f941d1a46682e0a98bf028b709ed /src/plugins/platforms/wasm/qwasmintegration.h | |
parent | f2e227742fe90d2420ab433ae18449f46a210ae8 (diff) |
wasm: add config API for controlling local font loading
This makes Qt read the following config options at startup:
- qt.requestLocalFontsPermission
- qt.localFontFamiliesCollection
- qt.extraLocalFontFamilies
And adds the following instance function
- qtLoadLocalFontFamilies
These can be used to control which local fonts Qt will
use, and also if Qt should ask for local fonts permission
on startup.
Also register a startup task for font loading. Font
loading completes asynchronously at some point after
the initial startup, and this way we can prevent showing
the application until the requested fonts are available.
Change-Id: I2b353c8b9c1a4976dddeb447d1f867aa2adf7588
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmintegration.h')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmintegration.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/wasm/qwasmintegration.h b/src/plugins/platforms/wasm/qwasmintegration.h index 8dfa065d9c..b966487760 100644 --- a/src/plugins/platforms/wasm/qwasmintegration.h +++ b/src/plugins/platforms/wasm/qwasmintegration.h @@ -74,8 +74,9 @@ public: void addContainerElement(emscripten::val elementArray); void removeContainerElement(emscripten::val elementArray); void resizeScreen(const emscripten::val &canvas); - void resizeAllScreens(); void updateDpi(); + void resizeAllScreens(); + void loadLocalFontFamilies(emscripten::val families); void removeBackingStore(QWindow* window); static quint64 getTimestamp(); |