Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwasmfontdatabase.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWASMFONTDATABASE_H
5#define QWASMFONTDATABASE_H
6
7#include <QtGui/private/qfreetypefontdatabase_p.h>
8
9#include <emscripten/val.h>
10
12
14{
15public:
17 static QWasmFontDatabase *get();
18
19 void populateFontDatabase() override;
20 QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) override;
22 QFont::StyleHint styleHint,
23 QChar::Script script) const override;
24 void releaseHandle(void *handle) override;
25 QFont defaultFont() const override;
26
27 void populateLocalfonts();
28 void populateLocalFontFamilies(emscripten::val families);
29 void populateLocalFontFamilies(const QStringList &famliies, bool allFamilies);
30
31 static void beginFontDatabaseStartupTask();
32 static void endFontDatabaseStartupTask();
33 static void refFontFileLoading();
34 static void derefFontFileLoading();
35 static void endAllFontFileLoading();
36
37private:
38 bool m_localFontsApiSupported = false;
39 bool m_queryLocalFontsPermission = false;
40 enum FontFamilyLoadSet {
41 NoFontFamilies,
42 DefaultFontFamilies,
43 AllFontFamilies,
44 };
45 FontFamilyLoadSet m_localFontFamilyLoadSet;
46 QStringList m_extraLocalFontFamilies;
47};
49#endif
\reentrant
Definition qfont.h:22
StyleHint
Style hints are used by the \l{QFont}{font matching} algorithm to find an appropriate default family ...
Definition qfont.h:25
Style
This enum describes the different styles of glyphs that are used to display text.
Definition qfont.h:76
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
static void derefFontFileLoading()
static void endAllFontFileLoading()
void populateFontDatabase() override
This function is called once at startup by Qt's internal font database.
static QWasmFontDatabase * get()
QFont defaultFont() const override
Returns the default system font.
static void refFontFileLoading()
QFontEngine * fontEngine(const QFontDef &fontDef, void *handle) override
Returns the font engine that can be used to render the font described by the font definition,...
static void beginFontDatabaseStartupTask()
void releaseHandle(void *handle) override
Releases the specified font handle.
static void endFontDatabaseStartupTask()
QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const override
Returns a list of alternative fonts for the specified family and style and script using the styleHint...
void populateLocalFontFamilies(emscripten::val families)
Combined button and popup list for selecting options.
GLuint64 GLenum void * handle