5d2b12d71c
We currently match font family names in cross-platform code, before
asking the system to load it. In the case of an empty family name, we
will return the first font in the list which matches the other
conditions.
After that, though, we would pass the empty family name to the
platform font database, and some old platform-specific matching
was invoked. In the case of Windows, we would default to
MS Sans Serif, which is the old Windows 1.0 raster font and which
is probably used by Qt exclusively in the world at this point.
The problem in the end was that the font info would be out of sync.
If the font matched by Qt happened to be smoothly scalable, then
we would treat MS Sans Serif as smoothly scalable, giving us
random glyphs when displaying text in Qt Quick. We would also
overwrite the family name with the one matched by Qt, so even
when MS Sans Serif was used to render the text, we would report
that it was something else.
For empty font families, we therefore pass the family we have
actually matched into the platform database. This will have
the side effect of trusting the font matching in Qt, but only
for the rare case where someone actually explicitly sets the
font family to the empty string.
Note that the random glyph bug that triggered the investigation is not
happening anymore after
|
||
---|---|---|
.. | ||
qabstracttextdocumentlayout_p.h | ||
qabstracttextdocumentlayout.cpp | ||
qabstracttextdocumentlayout.h | ||
qcssparser_p.h | ||
qcssparser.cpp | ||
qcssscanner.cpp | ||
qdistancefield_p.h | ||
qdistancefield.cpp | ||
qfont_p.h | ||
qfont.cpp | ||
qfont.h | ||
qfontdatabase.cpp | ||
qfontdatabase.h | ||
qfontengine_p.h | ||
qfontengine_qpf2_p.h | ||
qfontengine_qpf2.cpp | ||
qfontengine.cpp | ||
qfontengineglyphcache_p.h | ||
qfontengineglyphcache.cpp | ||
qfontinfo.h | ||
qfontmetrics.cpp | ||
qfontmetrics.h | ||
qfontsubset_agl.cpp | ||
qfontsubset_p.h | ||
qfontsubset.cpp | ||
qfragmentmap_p.h | ||
qfragmentmap.cpp | ||
qglyphrun_p.h | ||
qglyphrun.cpp | ||
qglyphrun.h | ||
qharfbuzzng_p.h | ||
qharfbuzzng.cpp | ||
qinputcontrol_p.h | ||
qinputcontrol.cpp | ||
qplatformfontdatabase.cpp | ||
qplatformfontdatabase.h | ||
qrawfont_p.h | ||
qrawfont.cpp | ||
qrawfont.h | ||
qstatictext_p.h | ||
qstatictext.cpp | ||
qstatictext.h | ||
qsyntaxhighlighter.cpp | ||
qsyntaxhighlighter.h | ||
qtextcursor_p.h | ||
qtextcursor.cpp | ||
qtextcursor.h | ||
qtextdocument_p.cpp | ||
qtextdocument_p.h | ||
qtextdocument.cpp | ||
qtextdocument.h | ||
qtextdocumentfragment_p.h | ||
qtextdocumentfragment.cpp | ||
qtextdocumentfragment.h | ||
qtextdocumentlayout_p.h | ||
qtextdocumentlayout.cpp | ||
qtextdocumentwriter.cpp | ||
qtextdocumentwriter.h | ||
qtextengine_p.h | ||
qtextengine.cpp | ||
qtextformat_p.h | ||
qtextformat.cpp | ||
qtextformat.h | ||
qtexthtmlparser_p.h | ||
qtexthtmlparser.cpp | ||
qtextimagehandler_p.h | ||
qtextimagehandler.cpp | ||
qtextlayout.cpp | ||
qtextlayout.h | ||
qtextlist.cpp | ||
qtextlist.h | ||
qtextobject_p.h | ||
qtextobject.cpp | ||
qtextobject.h | ||
qtextodfwriter_p.h | ||
qtextodfwriter.cpp | ||
qtextoption.cpp | ||
qtextoption.h | ||
qtexttable_p.h | ||
qtexttable.cpp | ||
qtexttable.h | ||
qzip.cpp | ||
qzipreader_p.h | ||
qzipwriter_p.h | ||
text.pri |