add a few comments about the fact that Get/SetNativeFontInfoUserDesc are not meant for 100%-precise serialization/deserialization of wxFont objects, at least under wxMSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2009-03-25 12:44:15 +00:00
parent 071de7a097
commit a912ea269e

View File

@@ -401,18 +401,21 @@ public:
Note that the returned string is not meant to be shown or edited by the user: a
typical use of this function is for serializing in string-form a wxFont object.
@see SetNativeFontInfo(),GetNativeFontInfoUserDesc()
@see SetNativeFontInfo(), GetNativeFontInfoUserDesc()
*/
wxString GetNativeFontInfoDesc() const;
/**
Returns a user-friendly string for this font object.
Returned string is always non-empty.
The string does not encode all wxFont infos under all platforms;
e.g. under wxMSW the font family is not present in the returned string.
Some examples of the formats of returned strings (which are platform-dependent)
are in SetNativeFontInfoUserDesc().
@see GetNativeFontInfoDesc()
@see SetNativeFontInfoUserDesc(), GetNativeFontInfoDesc()
*/
wxString GetNativeFontInfoUserDesc() const;
@@ -562,6 +565,12 @@ 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).
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
is not restored (because GetNativeFontInfoUserDesc doesn't return it on wxMSW).
If you want to serialize/deserialize a font in string form, you should use
GetNativeFontInfoDesc() and SetNativeFontInfo() instead.
@see SetNativeFontInfo()
*/