Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.4, 6.6.2, 6.7.0
-
None
-
-
b959b8f5e (dev), 2370cb0eb (dev), 260685d1e (6.8), f7c05cb53 (6.7), cb94f9d71 (tqtc/lts-6.5), 06304f931 (tqtc/lts-6.2), e180e5335 (6.8), a1c733ff1 (6.7), 7ce983a4b (tqtc/lts-5.15), a0a2f3b58 (tqtc/lts-6.5), 6600cbea3 (tqtc/lts-6.2)
Description
When trying to use a specific glyph (the code icon - '\uf121') from the popular FontAwesome font, the app crashes.
I'm loading the font via QML FontLoader.
OS: Pop!_OS 22.04 LTS 64bit
GNOME version: 42.9
Windowing system: X11
Here's an easy way to reproduce this (I've attached the font file, but you can also download it here):
Main.qml
import QtQuick import QtQuick.Window import QtQuick.Controls Window { id: root width: 640 height: 480 visible: true title: qsTr("Hello World") readonly property FontLoader fontAwesomeSolid: FontLoader { source: "qrc:/Test/fa-solid-900.ttf" } Text { anchors.centerIn: parent text: "\uf121" //f144 works font.family: fontAwesomeSolid.name color: "black" font.pointSize: 20 } }
fonts.qrc
<RCC>
<qresource prefix="/">
<file>fa-solid-900.ttf</file>
</qresource>
</RCC>
CMakeLists.txt
cmake_minimum_required(VERSION 3.16) project(Test VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 6.4 REQUIRED COMPONENTS Quick) qt_standard_project_setup() qt_add_executable(appTest main.cpp ) qt_add_qml_module(appTest URI Test VERSION 1.0 QML_FILES Main.qml TextSelectionMenu.qml ) qt_add_resources(appTest "fonts" PREFIX "/Test" FILES fa-solid-900.ttf ) set_target_properties(appTest PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE ) target_link_libraries(appTest PRIVATE Qt6::Quick ) install(TARGETS appTest BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
Attachments
For Gerrit Dashboard: QTBUG-124572 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
569433,3 | Make it possible to create distance field with specific size | dev | qt/qtbase | Status: MERGED | +2 | 0 |
569446,5 | Fix crash in distance field cache with some glyphs | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
569745,2 | Make it possible to create distance field with specific size | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
570307,2 | Fix crash in distance field cache with some glyphs | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
570466,2 | Make it possible to create distance field with specific size | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
570613,2 | Make it possible to create distance field with specific size | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
570673,2 | Make it possible to create distance field with specific size | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
570760,2 | Make it possible to create distance field with specific size | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
571668,2 | Fix crash in distance field cache with some glyphs | 6.7 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
571880,2 | Fix crash in distance field cache with some glyphs | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |
571928,2 | Fix crash in distance field cache with some glyphs | tqtc/lts-6.2 | qt/tqtc-qtdeclarative | Status: MERGED | -1 | 0 |
578522,2 | Fix crash in distance field cache with some glyphs | tqtc/lts-5.15 | qt/tqtc-qtdeclarative | Status: MERGED | -1 | 0 |