Allow displaying Japanese character with wxMotif/ANSI under a
Japanese EUC-JP locale: - add a #define (wxMOTIF_NEW_FONT_HANDLING) defaulting to off - factor the code for getting text extents in a central wxGetTextExtent function - when the new font handling is enabled load a fontset instead of a single font. For non-Japanese locales this should load a fontset containing a single font. - on a Japanese locale set the default point size to 15: the Japanese fonts I have are much more readable like this. - do not set the wordwrap property for multiline wxTextCtrl with OpenMotif 2.1, otherwise it crashes when text is added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -16,6 +16,10 @@
|
||||
#pragma interface "font.h"
|
||||
#endif
|
||||
|
||||
#if __WXMOTIF20__ && !__WXLESSTIF__ && !defined(wxMOTIF_NEW_FONT_HANDLING)
|
||||
#define wxMOTIF_NEW_FONT_HANDLING 0 // safe default
|
||||
#endif
|
||||
|
||||
class wxXFont;
|
||||
|
||||
// Font
|
||||
@@ -95,14 +99,18 @@ public:
|
||||
WXDisplay* display = NULL) const;
|
||||
|
||||
// These two are helper functions for convenient access of the above.
|
||||
#if !wxMOTIF_NEW_FONT_HANDLING
|
||||
WXFontStructPtr GetFontStruct(double scale = 1.0,
|
||||
WXDisplay* display = NULL) const;
|
||||
WXFontList GetFontList(double scale = 1.0,
|
||||
WXDisplay* display = NULL) const;
|
||||
#if __WXMOTIF20__
|
||||
#else
|
||||
WXFontSet GetFontSet(double scale, WXDisplay* display = NULL) const;
|
||||
#endif
|
||||
#if __WXMOTIF20__ // && !__WXLESSTIF__ for 2.7
|
||||
WXRenderTable GetRenderTable(WXDisplay* display) const;
|
||||
#endif
|
||||
// returns either a XmFontList or XmRendition, depending
|
||||
// returns either a XmFontList or XmRenderTable, depending
|
||||
// on Motif version
|
||||
WXFontType GetFontType(WXDisplay* display) const;
|
||||
// like the function above but does a copy for XmFontList
|
||||
|
Reference in New Issue
Block a user