Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.2
-
None
-
Target -> Apple M1 Mac os Big Sur
Compiled ->Apple Mac 10.15 Intel
-
-
aeeaa7d253239b4b45e419bcad5cfde5c5714080 (qt/qtbase/dev) c310dcce5706c284d19eb6221b231cc85c435236 (qt/qtbase/6.2) c900eaf599f22be915830ce5a545190c858da429 (qt/tqtc-qtbase/5.15) 4034daa12ebeea3ac6afe896e914853ecbd981f3 (qt/qtbase/5.12)
Description
Hello it's seems that our Qt Application on apple M1 have fonts problem:
Changing font to another one, or use the system default one seems to not change anything
Any idea / hints ?
Project URL: https://github.com/KomodoPlatform/atomicDEX-Desktop
Binaries available here: https://github.com/KomodoPlatform/atomicDEX-Desktop/actions/runs/413092638
Fonts is set here: https://github.com/KomodoPlatform/atomicDEX-Desktop/blob/font-fix-m1/atomic_defi_design/qml/Constants/Style.qml#L27
PS: We use high dpi:
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
Info.plist:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>atomicdex-desktop</string> <key>CFBundleGetInfoString</key> <string></string> <key>CFBundleIconFile</key> <string>atomicdex-desktop</string> <key>CFBundleIdentifier</key> <string></string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleLongVersionString</key> <string>0.0.1</string> <key>CFBundleName</key> <string>atomicdex-desktop</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>0.0.1</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string></string> <key>CSResourcesFileMapped</key> <true/> <key>LSRequiresCarbon</key> <true/> <key>NSHumanReadableCopyright</key> <string></string> <key>NSPrincipalClass</key> <string>NSApplication</string> <key>NSHighResolutionCapable</key> <true/> </dict> </plist>
EDIT 1:
It's seems that the problem come from `QQuickWindow::QtTextRendering`
Using:
auto is_apple_translated = []() { int ret = 0; size_t size = sizeof(ret); if (sysctlbyname("sysctl.proc_translated", &ret, &size, NULL, 0) == -1) { if (errno == ENOENT) return 0; return -1; } return ret; }; if (is_apple_translated() == 1) { SPDLOG_INFO("You are on apple M1 chipset running an Intel application, forcing NativeTextRendering"); QQuickWindow::setTextRenderType(QQuickWindow::TextRenderType::NativeTextRendering); }
Seems to solve the problem but `QQuickWindow::QtTextRendering` is not usable on last macbook M1 translated code
Attachments
Issue Links
- is duplicated by
-
QTBUG-93963 Mac m1 font garbled
- Closed
-
QTBUG-89903 QML "Text" control doesn't work on Mac Pro when using the default "Text.QtRendering" render type. While there is no problem on other platforms or when setting "renderType" to "Text.NativeRendering".
- Closed
- relates to
-
QTBUG-86429 macOS: unit 0 GLD_TEXTURE_INDEX_2D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable
- Closed
-
QTBUG-86405 Qt issues on Rosetta2
- Closed