|
63 | 63 |
|
64 | 64 | static fs::detail::utf8_codecvt_facet utf8;
|
65 | 65 |
|
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 |
| - |
76 | 66 | namespace GUIUtil {
|
77 | 67 |
|
78 | 68 | QString dateTimeStr(const QDateTime &date)
|
@@ -391,42 +381,6 @@ bool openBitcoinConf()
|
391 | 381 | return QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathConfig)));
|
392 | 382 | }
|
393 | 383 |
|
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 |
| - |
430 | 384 | ToolTipToRichTextFilter::ToolTipToRichTextFilter(int _size_threshold, QObject *parent) :
|
431 | 385 | QObject(parent),
|
432 | 386 | size_threshold(_size_threshold)
|
|
0 commit comments