diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-01-18 10:51:01 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-01-18 13:21:15 +0100 |
commit | 914a43d8aa0283c363369de48f2826712a2f6372 (patch) | |
tree | 90dc63f63da9512041f16f52f0c5f4e9f427b9b1 /src | |
parent | b0add5bf2f56c2afc8bdf27ccbb153414617250b (diff) |
macOS: Fix assert with Freetype engine
d8602ce58b6ef268be84b9aa0166b0c3fa6a96e8 removed the internal usage
of the singular fontDef.family, changing this to fontDef.families.first()
instead, which will assert if the families list is empty. To match
old behavior, we set the symbol flag to false if there is no family
name.
Change-Id: I594cf3dfa2798e60b37dc525c172fb2cd9aa7380
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/freetype/qfontengine_ft.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/freetype/qfontengine_ft.cpp b/src/gui/text/freetype/qfontengine_ft.cpp index 9644149754..2937857f71 100644 --- a/src/gui/text/freetype/qfontengine_ft.cpp +++ b/src/gui/text/freetype/qfontengine_ft.cpp @@ -734,7 +734,7 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format, PS_FontInfoRec psrec; // don't assume that type1 fonts are symbol fonts by default if (FT_Get_PS_Font_Info(freetype->face, &psrec) == FT_Err_Ok) { - symbol = bool(fontDef.families.first().contains(QLatin1String("symbol"), Qt::CaseInsensitive)); + symbol = !fontDef.families.isEmpty() && bool(fontDef.families.first().contains(QLatin1String("symbol"), Qt::CaseInsensitive)); } freetype->computeSize(fontDef, &xsize, &ysize, &defaultGlyphSet.outline_drawing, &scalableBitmapScaleFactor); |