X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..3ad41c280f8d84a34b20e29719fea73481386840:/interface/wx/font.h diff --git a/interface/wx/font.h b/interface/wx/font.h index a3eeaba9fe..6668de53da 100644 --- a/interface/wx/font.h +++ b/interface/wx/font.h @@ -8,7 +8,6 @@ /** @class wxFont - @wxheader{font.h} A font is an object which determines the appearance of text. Fonts are used for drawing text to a device context, and setting the appearance of @@ -38,11 +37,82 @@ class wxFont : public wxGDIObject { public: //@{ + /** + Creates a font object. + */ + wxFont(); + + /** + Creates a font object with the specified font. + + @param font + font object. + */ + wxFont(const wxFont& font); + /** Creates a font object with the specified attributes. @param pointSize Size in points. + @param family + Font family, a generic way of referring to fonts without specifying actual + facename. One of: + + + + + + + + +
wxFONTFAMILY_DEFAULTChooses a default font.
wxFONTFAMILY_DECORATIVEA decorative font.
wxFONTFAMILY_ROMANA formal, serif font.
wxFONTFAMILY_SCRIPTA handwriting font.
wxFONTFAMILY_SWISSA sans-serif font.
wxFONTFAMILY_MODERNA fixed pitch font.
wxFONTFAMILY_TELETYPEA teletype font.
+ @param style + One of wxFONTSTYLE_NORMAL, wxFONTSTYLE_SLANT and wxFONTSTYLE_ITALIC. + @param weight + Font weight, sometimes also referred to as font boldness. One of: + + + + +
wxFONTWEIGHT_NORMALNormal font.
wxFONTWEIGHT_LIGHTLight font.
wxFONTWEIGHT_BOLDBold font.
+ @param underline + The value can be @true or @false. At present this has an effect on Windows + and Motif 2.x only. + @param faceName + An optional string specifying the actual typeface to be used. If it is an + empty string, + a default typeface will be chosen based on the family. + @param encoding + An encoding which may be one of + + + + + + +
wxFONTENCODING_SYSTEMDefault system encoding.
wxFONTENCODING_DEFAULT + Default application encoding: this + is the encoding set by calls to + SetDefaultEncoding and which may be set to, + say, KOI8 to create all fonts by default with KOI8 encoding. Initially, the + default application encoding is the same as default system encoding.
wxFONTENCODING_ISO8859_1...15ISO8859 encodings.
wxFONTENCODING_KOI8The standard Russian encoding for Internet.
wxFONTENCODING_CP1250...1252Windows encodings similar to ISO8859 (but not identical).
+ + If the specified encoding isn't available, no font is created + (see also font encoding overview). + + @remarks If the desired font does not exist, the closest match will be + chosen. Under Windows, only scalable TrueType fonts are + used. + */ + wxFont(int pointSize, wxFontFamily family, int style, + wxFontWeight weight, + const bool underline = false, + const wxString& faceName = "", + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + /** + Creates a font object with the specified attributes. + @param pixelSize Size in pixels: this is directly supported only under MSW currently where this constructor can be used directly, under other @@ -52,124 +122,24 @@ public: @param family Font family, a generic way of referring to fonts without specifying actual facename. One of: - - - - - - - - wxFONTFAMILY_DEFAULT - - - - - Chooses a default font. - - - - - - wxFONTFAMILY_DECORATIVE - - - - - A decorative font. - - - - - - wxFONTFAMILY_ROMAN - - - - - A formal, serif font. - - - - - - wxFONTFAMILY_SCRIPT - - - - - A handwriting font. - - - - - - wxFONTFAMILY_SWISS - - - - - A sans-serif font. - - - - - - wxFONTFAMILY_MODERN - - - - - A fixed pitch font. - - - - - - wxFONTFAMILY_TELETYPE - - - - - A teletype font. + + + + + + + + +
wxFONTFAMILY_DEFAULTChooses a default font.
wxFONTFAMILY_DECORATIVEA decorative font.
wxFONTFAMILY_ROMANA formal, serif font.
wxFONTFAMILY_SCRIPTA handwriting font.
wxFONTFAMILY_SWISSA sans-serif font.
wxFONTFAMILY_MODERNA fixed pitch font.
wxFONTFAMILY_TELETYPEA teletype font.
@param style One of wxFONTSTYLE_NORMAL, wxFONTSTYLE_SLANT and wxFONTSTYLE_ITALIC. @param weight Font weight, sometimes also referred to as font boldness. One of: - - - - - - - - wxFONTWEIGHT_NORMAL - - - - - Normal font. - - - - - - wxFONTWEIGHT_LIGHT - - - - - Light font. - - - - - - wxFONTWEIGHT_BOLD - - - - - Bold font. + + + + +
wxFONTWEIGHT_NORMALNormal font.
wxFONTWEIGHT_LIGHTLight font.
wxFONTWEIGHT_BOLDBold font.
@param underline The value can be @true or @false. At present this has an effect on Windows and Motif 2.x only. @@ -179,71 +149,18 @@ public: a default typeface will be chosen based on the family. @param encoding An encoding which may be one of - - - - - - - - wxFONTENCODING_SYSTEM - - - - - Default system encoding. - - - - - - wxFONTENCODING_DEFAULT - - - - - Default application encoding: this - is the encoding set by calls to - SetDefaultEncoding and which may be set to, - say, KOI8 to create all fonts by default with KOI8 encoding. Initially, the - default application encoding is the same as default system encoding. - - - - - - wxFONTENCODING_ISO8859_1...15 - - - - - ISO8859 encodings. - - - - - - wxFONTENCODING_KOI8 - - - - - The standard Russian encoding for Internet. - - - - - - wxFONTENCODING_CP1250...1252 - - - - - Windows encodings similar to ISO8859 (but not identical). - - - - + + + + + + +
wxFONTENCODING_SYSTEMDefault system encoding.
wxFONTENCODING_DEFAULT + Default application encoding: this + is the encoding set by calls to + SetDefaultEncoding and which may be set to, + say, KOI8 to create all fonts by default with KOI8 encoding. Initially, the + default application encoding is the same as default system encoding.
wxFONTENCODING_ISO8859_1...15ISO8859 encodings.
wxFONTENCODING_KOI8The standard Russian encoding for Internet.
wxFONTENCODING_CP1250...1252Windows encodings similar to ISO8859 (but not identical).
If the specified encoding isn't available, no font is created (see also font encoding overview). @@ -252,13 +169,6 @@ public: chosen. Under Windows, only scalable TrueType fonts are used. */ - wxFont(); - wxFont(const wxFont& font); - wxFont(int pointSize, wxFontFamily family, int style, - wxFontWeight weight, - const bool underline = false, - const wxString& faceName = "", - wxFontEncoding encoding = wxFONTENCODING_DEFAULT); wxFont(const wxSize& pixelSize, wxFontFamily family, int style, wxFontWeight weight, const bool underline = false, @@ -425,85 +335,14 @@ public: @param family One of: - - - - - - - - wxFONTFAMILY_DEFAULT - - - - - Chooses a default font. - - - - - - wxFONTFAMILY_DECORATIVE - - - - - A decorative font. - - - - - - wxFONTFAMILY_ROMAN - - - - - A formal, serif font. - - - - - - wxFONTFAMILY_SCRIPT - - - - - A handwriting font. - - - - - - wxFONTFAMILY_SWISS - - - - - A sans-serif font. - - - - - - wxFONTFAMILY_MODERN - - - - - A fixed pitch font. - - - - - - wxFONTFAMILY_TELETYPE - - - - - A teletype font. + + + + + + + + @see GetFamily(), SetFaceName() */ @@ -577,7 +416,7 @@ public: /** Sets underlining. - @param underlining + @param underlined @true to underline, @false otherwise. @see GetUnderlined() @@ -589,41 +428,11 @@ public: @param weight One of: - - - - - - - - wxFONTWEIGHT_NORMAL - - - - - Normal font. - - - - - - wxFONTWEIGHT_LIGHT - - - - - Light font. - - - - - - wxFONTWEIGHT_BOLD - - - - - Bold font. +
wxFONTFAMILY_DEFAULTChooses a default font.
wxFONTFAMILY_DECORATIVEA decorative font.
wxFONTFAMILY_ROMANA formal, serif font.
wxFONTFAMILY_SCRIPTA handwriting font.
wxFONTFAMILY_SWISSA sans-serif font.
wxFONTFAMILY_MODERNA fixed pitch font.
wxFONTFAMILY_TELETYPEA teletype font.
+ + + +
wxFONTWEIGHT_NORMALNormal font.
wxFONTWEIGHT_LIGHTLight font.
wxFONTWEIGHT_BOLDBold font.
@see GetWeight() */ @@ -678,7 +487,6 @@ wxFont wxSWISS_FONT; /** @class wxFontList - @wxheader{gdicmn.h} A font list is a list containing all fonts which have been created. There is only one instance of this class: @b wxTheFontList. Use this object to search