macOS + FreeType: fix crash with non printable unicode
Task-number: QTBUG-84096 Change-Id: Ia60b7094ef9e82cf24f5a8b7995000ae65bb379a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit ebfd0b14aadc8d7e1415fa6a698038dffd251cb0) Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
This commit is contained in:
parent
208979ed01
commit
435f853ae3
@ -376,7 +376,10 @@ QFontEngine *QCoreTextFontDatabaseEngineFactory<QFontEngineFT>::fontEngine(const
|
||||
faceId.filename = QString::fromNSString(url.path).toUtf8();
|
||||
return QFontEngineFT::create(fontDef, faceId);
|
||||
}
|
||||
Q_UNREACHABLE();
|
||||
// We end up here with a descriptor does not contain Qt font data or kCTFontURLAttribute.
|
||||
// Since the FT engine can't deal with a descriptor with just a NSFontNameAttribute,
|
||||
// we should return nullptr.
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user