Allow leaving the point size unspecified for ports using XLFD

Rather than defaulting to the normal font size, just leave the font size
unspecified as it might result in better font size being chosen.
This commit is contained in:
Vadim Zeitlin
2018-09-15 01:27:58 +02:00
parent 22839b865d
commit 720e1372e4

View File

@@ -795,8 +795,13 @@ wxFontEncoding wxNativeFontInfo::GetEncoding() const
void wxNativeFontInfo::SetFractionalPointSize(float pointsize)
{
SetXFontComponent(wxXLFD_POINTSIZE,
wxString::Format("%d", wxRound(10*pointsize)));
wxString s;
if ( pointsize < 0 )
s = '*';
else
s.Printf("%d", wxRound(10*pointsize));
SetXFontComponent(wxXLFD_POINTSIZE, s);
}
void wxNativeFontInfo::SetStyle(wxFontStyle style)