From 720e1372e4e2d20d6345842864929f39b483e667 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 15 Sep 2018 01:27:58 +0200 Subject: [PATCH] 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. --- src/unix/fontutil.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index 97f7fb4ae3..2ba48b9182 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -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)