Fix font creation using font flags in Cairo wxGraphicsContext
Don't crash trying to use an uninitialized font in GetPartialTextExtents() later if the font was created using CreateFont(sizeInPixels, facename, flags) overload. Closes #18021.
This commit is contained in:
@@ -1013,6 +1013,10 @@ wxCairoFontData::wxCairoFontData(wxGraphicsRenderer* renderer,
|
||||
int flags,
|
||||
const wxColour& col) :
|
||||
wxGraphicsObjectRefData(renderer)
|
||||
#ifdef __WXGTK__
|
||||
, m_wxfont(wxFontInfo(wxSize(sizeInPixels, sizeInPixels))
|
||||
.AllFlags(flags).FaceName(facename))
|
||||
#endif
|
||||
{
|
||||
InitColour(col);
|
||||
|
||||
|
Reference in New Issue
Block a user