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:
@@ -409,10 +409,13 @@ public:
|
|||||||
Returns a user-friendly string for this font object.
|
Returns a user-friendly string for this font object.
|
||||||
Returned string is always non-empty.
|
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)
|
Some examples of the formats of returned strings (which are platform-dependent)
|
||||||
are in SetNativeFontInfoUserDesc().
|
are in SetNativeFontInfoUserDesc().
|
||||||
|
|
||||||
@see GetNativeFontInfoDesc()
|
@see SetNativeFontInfoUserDesc(), GetNativeFontInfoDesc()
|
||||||
*/
|
*/
|
||||||
wxString GetNativeFontInfoUserDesc() const;
|
wxString GetNativeFontInfoUserDesc() const;
|
||||||
|
|
||||||
@@ -563,6 +566,12 @@ public:
|
|||||||
documentation of the native API used for font-rendering
|
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 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()
|
@see SetNativeFontInfo()
|
||||||
*/
|
*/
|
||||||
bool SetNativeFontInfoUserDesc(const wxString& info);
|
bool SetNativeFontInfoUserDesc(const wxString& info);
|
||||||
|
Reference in New Issue
Block a user