Skip to content

Commit 68c2725

Browse files
committed
gui: remove SubstituteFonts
1 parent 6c6dbd8 commit 68c2725

File tree

3 files changed

+0
-50
lines changed

3 files changed

+0
-50
lines changed

src/qt/bitcoin.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,6 @@ int main(int argc, char *argv[])
614614
QApplication::setOrganizationName(QAPP_ORG_NAME);
615615
QApplication::setOrganizationDomain(QAPP_ORG_DOMAIN);
616616
QApplication::setApplicationName(QAPP_APP_NAME_DEFAULT);
617-
GUIUtil::SubstituteFonts(GetLangTerritory());
618617

619618
/// 4. Initialization of translations, so that intro dialog is in user's language
620619
// Now that QSettings are accessible, initialize translations

src/qt/guiutil.cpp

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,6 @@
6363

6464
static fs::detail::utf8_codecvt_facet utf8;
6565

66-
#if defined(Q_OS_MAC)
67-
extern double NSAppKitVersionNumber;
68-
#if !defined(NSAppKitVersionNumber10_8)
69-
#define NSAppKitVersionNumber10_8 1187
70-
#endif
71-
#if !defined(NSAppKitVersionNumber10_9)
72-
#define NSAppKitVersionNumber10_9 1265
73-
#endif
74-
#endif
75-
7666
namespace GUIUtil {
7767

7868
QString dateTimeStr(const QDateTime &date)
@@ -391,42 +381,6 @@ bool openBitcoinConf()
391381
return QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathConfig)));
392382
}
393383

394-
void SubstituteFonts(const QString& language)
395-
{
396-
#if defined(Q_OS_MAC)
397-
// Background:
398-
// OSX's default font changed in 10.9 and Qt is unable to find it with its
399-
// usual fallback methods when building against the 10.7 sdk or lower.
400-
// The 10.8 SDK added a function to let it find the correct fallback font.
401-
// If this fallback is not properly loaded, some characters may fail to
402-
// render correctly.
403-
//
404-
// The same thing happened with 10.10. .Helvetica Neue DeskInterface is now default.
405-
//
406-
// Solution: If building with the 10.7 SDK or lower and the user's platform
407-
// is 10.9 or higher at runtime, substitute the correct font. This needs to
408-
// happen before the QApplication is created.
409-
#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8
410-
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8)
411-
{
412-
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9)
413-
/* On a 10.9 - 10.9.x system */
414-
QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
415-
else
416-
{
417-
/* 10.10 or later system */
418-
if (language == "zh_CN" || language == "zh_TW" || language == "zh_HK") // traditional or simplified Chinese
419-
QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Heiti SC");
420-
else if (language == "ja") // Japanese
421-
QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Songti SC");
422-
else
423-
QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Lucida Grande");
424-
}
425-
}
426-
#endif
427-
#endif
428-
}
429-
430384
ToolTipToRichTextFilter::ToolTipToRichTextFilter(int _size_threshold, QObject *parent) :
431385
QObject(parent),
432386
size_threshold(_size_threshold)

src/qt/guiutil.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@ namespace GUIUtil
120120
// Open the config file
121121
bool openBitcoinConf();
122122

123-
// Replace invalid default fonts with known good ones
124-
void SubstituteFonts(const QString& language);
125-
126123
/** Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text
127124
representation if needed. This assures that Qt can word-wrap long tooltip messages.
128125
Tooltips longer than the provided size threshold (in characters) are wrapped.

0 commit comments

Comments
 (0)