Handle underlined and strikethrough attributes in wxGTK native font info.

These attributes were not handled by wxFont::GetNativeFontInfoDesc() as it
only serialized the Pango font description which doesn't support them.

Fix this by handling these attributes explicitly and prepending them to the
Pango font string if necessary.

Closes #14559.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-09-15 23:17:12 +00:00
parent cba4e486a4
commit a349dc1085
5 changed files with 87 additions and 34 deletions

View File

@@ -817,7 +817,7 @@ public:
@beginTable
@hdr3col{platform, generic syntax, example}
@row3col{wxGTK2, <tt>[FACE-NAME] [bold] [oblique|italic] [POINTSIZE]</tt>, Monospace bold 10}
@row3col{wxGTK2, <tt>[underlined] [strikethrough] [FACE-NAME] [bold] [oblique|italic] [POINTSIZE]</tt>, Monospace bold 10}
@row3col{wxMSW, <tt>[light|bold] [italic] [FACE-NAME] [POINTSIZE] [ENCODING]</tt>, Tahoma 10 WINDOWS-1252}
@endTable
@@ -825,7 +825,9 @@ public:
For more detailed information about the allowed syntaxes you can look at the
documentation of the native API used for font-rendering
(e.g. @c pango_font_description_from_string on GTK).
(e.g. @c pango_font_description_from_string under GTK, although notice
that it doesn't support the "underlined" and "strikethrough" attributes
and so those are handled by wxWidgets itself).
Note that unlike SetNativeFontInfo(), this function doesn't always restore all
attributes of the wxFont object under all platforms; e.g. on wxMSW the font family