From 54a64fc549001b798a5d96ed89b84bf39c846e60 Mon Sep 17 00:00:00 2001 From: Daniel Kulp Date: Mon, 22 Feb 2016 23:10:29 +0100 Subject: [PATCH] Accept "underlinedstrikethrough" in wxFont user strings Due to a bug fixed in 78145f9162b64a047e14a160ceed688897303010 converting a font which was both underlined and stricken-through to a user string resulted in using this space-less version and while the bug is fixed now, still accept the strings created while it was there on input, it doesn't cost much and results in a better user experience. See https://github.com/wxWidgets/wxWidgets/pull/187 --- src/common/fontcmn.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/fontcmn.cpp b/src/common/fontcmn.cpp index b850783b69..da8e05d239 100644 --- a/src/common/fontcmn.cpp +++ b/src/common/fontcmn.cpp @@ -981,6 +981,11 @@ bool wxNativeFontInfo::FromUserString(const wxString& s) { SetStrikethrough(true); } + else if ( token == wxT("underlinedstrikethrough") ) + { + SetUnderlined(true); + SetStrikethrough(true); + } else if ( token == wxT("light") || token == _("light") ) { SetWeight(wxFONTWEIGHT_LIGHT);