Fix unused warnings with DESKTOP_APP_USE_PACKAGED_FONTS
This commit is contained in:
parent
68b43db05d
commit
b361d6151c
1 changed files with 3 additions and 1 deletions
|
|
@ -71,6 +71,7 @@ bool ValidateFont(const QString &familyName, int flags = 0) {
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifndef LIB_UI_USE_PACKAGED_FONTS
|
||||
bool LoadCustomFont(const QString &filePath, const QString &familyName, int flags = 0) {
|
||||
auto regularId = QFontDatabase::addApplicationFont(filePath);
|
||||
if (regularId < 0) {
|
||||
|
|
@ -94,6 +95,7 @@ bool LoadCustomFont(const QString &filePath, const QString &familyName, int flag
|
|||
|
||||
return ValidateFont(familyName, flags);
|
||||
}
|
||||
#endif // !LIB_UI_USE_PACKAGED_FONTS
|
||||
|
||||
[[nodiscard]] QString SystemMonospaceFont() {
|
||||
const auto type = QFontDatabase::FixedFont;
|
||||
|
|
@ -160,7 +162,6 @@ QString FontTypePersianFallback[FontTypesCount] = {
|
|||
"DAVazirMedium",
|
||||
"DAVazirMedium",
|
||||
};
|
||||
#endif // !LIB_UI_USE_PACKAGED_FONTS
|
||||
int32 FontTypeFlags[FontTypesCount] = {
|
||||
0,
|
||||
FontItalic,
|
||||
|
|
@ -169,6 +170,7 @@ int32 FontTypeFlags[FontTypesCount] = {
|
|||
FontSemibold,
|
||||
FontSemibold | FontItalic,
|
||||
};
|
||||
#endif // !LIB_UI_USE_PACKAGED_FONTS
|
||||
|
||||
bool Started = false;
|
||||
QString Overrides[FontTypesCount];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue