class WXDLLEXPORT wxFontEnumerator
{
public:
- // start enumerating font families - will result in OnFontFamily() being
- // called for each available font family (unless it returns FALSE)
- virtual bool EnumerateFamilies(bool fixedWidthOnly = FALSE);
+ // start enumerating font families (either all of them or those which
+ // support the given encoding) - will result in OnFontFamily() being
+ // called for each available font family (until they are exhausted or
+ // OnFontFamily returns FALSE)
+ virtual bool EnumerateFamilies
+ (
+ wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all
+ bool fixedWidthOnly = FALSE
+ );
// enumerate the different encodings either for given font family or for
// all font families - will result in OnFontEncoding() being called for
virtual bool OnFontEncoding(const wxString& WXUNUSED(family),
const wxString& WXUNUSED(encoding))
{ return FALSE; }
+
+ // virtual dtor for the base class
+ virtual ~wxFontEnumerator() { }
};
#endif // _WX_FONTENUM_H_
virtual int GetMax() const { return m_max; }
// operations
+ virtual void SetValue(const wxString& value) = 0;
virtual void SetValue(int val) = 0;
virtual void SetRange(int minVal, int maxVal) = 0;
#elif defined(__WXGTK__)
#include "wx/gtk/spinctrl.h"
#else // Win16 || !Win
- #include "wx/generic/spinctrl.h"
+ #include "wx/generic/spinctlg.h"
#endif // platform
#endif // _WX_SPINCTRL_H_
const wxString &facename,
wxFontEncoding encoding);
+// fills xencoding and xregistry with the X font spec parts for the given
+// encoding ('*' if encoding == wxFONTENCODING_SYSTEM) and returns TRUE if any
+// fonts with this encoding exist or FALSE if it's unknown (it does *not* mean
+// that they don't exist!)
+extern bool wxGetXFontEncoding(wxFontEncoding encoding,
+ wxString *xencoding, wxString *xregistry);
+
#endif // X || GTK
#endif // wxUSE_GUI
// Modified by:
// Created: 30.09.99
// RCS-ID: $Id$
-// Copyright: (c) Vadim Zeitlin
+// Copyright: (c) 1999 Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include <wx/log.h>
#endif
+#include <wx/choicdlg.h>
#include <wx/fontdlg.h>
#include <wx/fontenum.h>
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnSelectFont(wxCommandEvent& event);
- void OnCreateFont(wxCommandEvent& event);
+ void OnEnumerateFamiliesForEncoding(wxCommandEvent& event);
void OnEnumerateFamilies(wxCommandEvent& WXUNUSED(event))
{ DoEnumerateFamilies(FALSE); }
void OnEnumerateFixedFamilies(wxCommandEvent& WXUNUSED(event))
{ DoEnumerateFamilies(TRUE); }
void OnEnumerateEncodings(wxCommandEvent& event);
+ void OnSize(wxSizeEvent& event);
+
protected:
- void DoEnumerateFamilies(bool fixedWidthOnly);
+ void DoEnumerateFamilies(bool fixedWidthOnly,
+ wxFontEncoding encoding = wxFONTENCODING_SYSTEM);
+
+ void Resize(const wxSize& size, const wxFont& font = wxNullFont);
- MyCanvas *m_canvas;
+ wxTextCtrl *m_textctrl;
+ MyCanvas *m_canvas;
private:
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
};
-// A custom font dialog which allows to directly edit wxFont proprieties
-class MyFontDialog : public wxDialog
-{
-public:
- MyFontDialog(MyFrame *frame);
-
- // event handlers
- void OnApply(wxCommandEvent& WXUNUSED(event)) { DoApply(); }
-
-protected:
- void DoApply();
-
- MyCanvas *m_canvas;
-
-private:
- //DECLARE_EVENT_TABLE() TODO
-};
-
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
Font_Quit = 1,
Font_About,
Font_Choose = 100,
- Font_Create,
+ Font_EnumFamiliesForEncoding,
Font_EnumFamilies,
Font_EnumFixedFamilies,
Font_EnumEncodings,
EVT_MENU(Font_Quit, MyFrame::OnQuit)
EVT_MENU(Font_About, MyFrame::OnAbout)
EVT_MENU(Font_Choose, MyFrame::OnSelectFont)
- EVT_MENU(Font_Create, MyFrame::OnCreateFont)
+ EVT_MENU(Font_EnumFamiliesForEncoding, MyFrame::OnEnumerateFamiliesForEncoding)
EVT_MENU(Font_EnumFamilies, MyFrame::OnEnumerateFamilies)
EVT_MENU(Font_EnumFixedFamilies, MyFrame::OnEnumerateFixedFamilies)
EVT_MENU(Font_EnumEncodings, MyFrame::OnEnumerateEncodings)
+
+ EVT_SIZE(MyFrame::OnSize)
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create
wxMenu *menuFont = new wxMenu;
menuFont->Append(Font_Choose, "&Select font...\tCtrl-S",
"Select a standard font");
- menuFont->Append(Font_Create, "&Create font...\tCtrl-C",
- "Create a custom font");
menuFont->AppendSeparator();
menuFont->Append(Font_EnumFamilies, "Enumerate font &families\tCtrl-F");
menuFont->Append(Font_EnumFixedFamilies,
"Enumerate f&ixed font families\tCtrl-I");
menuFont->Append(Font_EnumEncodings,
"Enumerate &encodings\tCtrl-E");
+ menuFont->Append(Font_EnumFamiliesForEncoding,
+ "Find font for en&coding...\tCtrl-C",
+ "Find font families for given encoding");
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar;
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
+ m_textctrl = new wxTextCtrl(this, -1,
+ "Paste text here to see how it looks\n"
+ "like in the given font",
+ wxDefaultPosition, wxDefaultSize,
+ wxTE_MULTILINE);
+
m_canvas = new MyCanvas(this);
// create a status bar just for fun (by default with 1 pane only)
fontEnumerator.GetText().c_str());
}
-void MyFrame::DoEnumerateFamilies(bool fixedWidthOnly)
+void MyFrame::DoEnumerateFamilies(bool fixedWidthOnly, wxFontEncoding encoding)
{
class MyFontEnumerator : public wxFontEnumerator
{
public:
MyFontEnumerator() { m_n = 0; }
+ bool GotAny() const { return m_n; }
+
const wxString& GetText() const { return m_text; }
protected:
wxString m_text;
} fontEnumerator;
- fontEnumerator.EnumerateFamilies(fixedWidthOnly);
+ fontEnumerator.EnumerateFamilies(encoding, fixedWidthOnly);
- wxLogMessage("Enumerating %s font families:\n%s",
- fixedWidthOnly ? "fixed width" : "all",
- fontEnumerator.GetText().c_str());
+ if ( fontEnumerator.GotAny() )
+ {
+ wxLogMessage("Enumerating %s font families:\n%s",
+ fixedWidthOnly ? "fixed width" : "all",
+ fontEnumerator.GetText().c_str());
+ }
+ else
+ {
+ wxLogWarning("No such fonts found.");
+ }
}
-void MyFrame::OnCreateFont(wxCommandEvent& WXUNUSED(event))
+void MyFrame::OnEnumerateFamiliesForEncoding(wxCommandEvent& WXUNUSED(event))
{
- MyFontDialog dialog(this);
-
- (void)dialog.ShowModal();
+ static wxFontEncoding encodings[] =
+ {
+ wxFONTENCODING_ISO8859_1,
+ wxFONTENCODING_ISO8859_2,
+ wxFONTENCODING_ISO8859_5,
+ wxFONTENCODING_ISO8859_7,
+ wxFONTENCODING_ISO8859_15,
+ wxFONTENCODING_KOI8,
+ wxFONTENCODING_CP1250,
+ wxFONTENCODING_CP1251,
+ wxFONTENCODING_CP1252,
+ };
+
+ static const char *encodingNames[] =
+ {
+ "West European (Latin 1)",
+ "Central European (Latin 2)",
+ "Cyrillic (Latin 5)",
+ "Greek (Latin 7)",
+ "West European new (Latin 0)",
+ "KOI8-R",
+ "Windows Latin 2",
+ "Windows Cyrillic",
+ "Windows Latin 1",
+ };
+
+ int n = wxGetSingleChoiceIndex("Choose an encoding", "Font demo",
+ WXSIZEOF(encodingNames), encodingNames,
+ this);
+
+ if ( n != -1 )
+ {
+ DoEnumerateFamilies(FALSE, encodings[n]);
+ }
}
void MyFrame::OnSelectFont(wxCommandEvent& WXUNUSED(event))
if ( dialog.ShowModal() == wxID_OK )
{
wxFontData retData = dialog.GetFontData();
- m_canvas->SetTextFont(retData.GetChosenFont());
- m_canvas->SetColour(retData.GetColour());
+ wxFont font = retData.GetChosenFont();
+ wxColour colour = retData.GetColour();
+
+ Resize(GetSize(), font);
+
+ m_canvas->SetTextFont(font);
+ m_canvas->SetColour(colour);
m_canvas->Refresh();
+
+ m_textctrl->SetFont(font);
+ m_textctrl->SetForegroundColour(colour);
}
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
- wxMessageBox("wxWindows font demo.", "About Font",
+ wxMessageBox("wxWindows font demo\n"
+ "(c) 1999 Vadim Zeitlin",
+ "About Font",
wxOK | wxICON_INFORMATION, this);
}
+void MyFrame::OnSize(wxSizeEvent& event)
+{
+ wxSize size = event.GetSize();
+
+ Resize(size);
+}
+
+void MyFrame::Resize(const wxSize& size, const wxFont& font)
+{
+ wxCoord h;
+ if ( font.Ok() )
+ {
+ wxClientDC dc(this);
+ dc.SetFont(font);
+
+ h = 4*dc.GetCharHeight() + 4;
+ }
+ else
+ {
+ h = m_textctrl->GetSize().y;
+ }
+
+ m_textctrl->SetSize(0, 0, size.x, h);
+ m_canvas->SetSize(0, h, size.x, size.y - h);
+}
// ----------------------------------------------------------------------------
// MyCanvas
// the origin for our table
int x = 5,
- y = 2*h + 5;
+ y = 2*h;
// print all font symbols from 32 to 256 in 7 rows of 32 chars each
for ( int i = 1; i < 8; i++ )
dc.DrawLine(xl, y, xl, y + 7*h - 2);
}
}
-
-// ----------------------------------------------------------------------------
-// MyFontDialog
-// ----------------------------------------------------------------------------
-
-MyFontDialog::MyFontDialog(MyFrame *frame)
- : wxDialog(frame, -1, wxString("Edit font attributes"))
-{
- m_canvas = frame->GetCanvas();
-
- // create controls
- wxSize sizeBtn = wxButton::GetDefaultSize();
-
- // TODO
-
- // position and size the dialog
- SetClientSize(4*sizeBtn.x, 10*sizeBtn.y);
- Centre();
-}
-
-void MyFontDialog::DoApply()
-{
- wxFont font; //(size, family, style, weight, underlined, face, encoding);
- if ( !font.Ok() )
- {
- wxLogError("Font creation failed.");
- }
- else
- {
- m_canvas->SetTextFont(font);
- m_canvas->Refresh();
- }
-}
tn.GetNextToken(); // foundry
- M_FONTDATA->m_faceName = tn.GetNextToken(); // courier
+ M_FONTDATA->m_faceName = tn.GetNextToken(); // family
- tmp = tn.GetNextToken().MakeUpper();
+ tmp = tn.GetNextToken().MakeUpper(); // weight
if (tmp == wxT("BOLD")) M_FONTDATA->m_weight = wxBOLD;
if (tmp == wxT("BLACK")) M_FONTDATA->m_weight = wxBOLD;
if (tmp == wxT("EXTRABOLD")) M_FONTDATA->m_weight = wxBOLD;
if (tmp == wxT("LIGHT")) M_FONTDATA->m_weight = wxLIGHT;
if (tmp == wxT("THIN")) M_FONTDATA->m_weight = wxLIGHT;
- tmp = tn.GetNextToken().MakeUpper();
+ tmp = tn.GetNextToken().MakeUpper(); // slant
if (tmp == wxT("I")) M_FONTDATA->m_style = wxITALIC;
if (tmp == wxT("O")) M_FONTDATA->m_style = wxITALIC;
tn.GetNextToken(); // set width
- tn.GetNextToken(); // ?
+ tn.GetNextToken(); // add. style
tn.GetNextToken(); // pixel size
tmp = tn.GetNextToken(); // pointsize
tn.GetNextToken(); // x-res
tn.GetNextToken(); // y-res
- tmp = tn.GetNextToken().MakeUpper();
- if (tmp == wxT("M")) M_FONTDATA->m_family = wxMODERN;
- else if (M_FONTDATA->m_faceName == wxT("TIMES")) M_FONTDATA->m_family = wxROMAN;
- else if (M_FONTDATA->m_faceName == wxT("HELVETICA")) M_FONTDATA->m_family = wxSWISS;
- else if (M_FONTDATA->m_faceName == wxT("LUCIDATYPEWRITER")) M_FONTDATA->m_family = wxTELETYPE;
- else if (M_FONTDATA->m_faceName == wxT("LUCIDA")) M_FONTDATA->m_family = wxDECORATIVE;
- else if (M_FONTDATA->m_faceName == wxT("UTOPIA")) M_FONTDATA->m_family = wxSCRIPT;
+ tmp = tn.GetNextToken().MakeUpper(); // spacing
+
+ if (tmp == wxT("M"))
+ M_FONTDATA->m_family = wxMODERN;
+ else if (M_FONTDATA->m_faceName == wxT("TIMES"))
+ M_FONTDATA->m_family = wxROMAN;
+ else if (M_FONTDATA->m_faceName == wxT("HELVETICA"))
+ M_FONTDATA->m_family = wxSWISS;
+ else if (M_FONTDATA->m_faceName == wxT("LUCIDATYPEWRITER"))
+ M_FONTDATA->m_family = wxTELETYPE;
+ else if (M_FONTDATA->m_faceName == wxT("LUCIDA"))
+ M_FONTDATA->m_family = wxDECORATIVE;
+ else if (M_FONTDATA->m_faceName == wxT("UTOPIA"))
+ M_FONTDATA->m_family = wxSCRIPT;
+
+ tn.GetNextToken(); // avg width
+
+ // deal with font encoding
+ wxString registry = tn.GetNextToken().MakeUpper(),
+ encoding = tn.GetNextToken().MakeUpper();
+
+ if ( registry == _T("ISO8859") )
+ {
+ int cp;
+ if ( wxSscanf(encoding, "%d", &cp) == 1 )
+ {
+ M_FONTDATA->m_encoding =
+ (wxFontEncoding)(wxFONTENCODING_ISO8859_1 + cp - 1);
+ }
+ }
+ else if ( registry == _T("MICROSOFT") )
+ {
+ int cp;
+ if ( wxSscanf(encoding, "cp125%d", &cp) == 1 )
+ {
+ M_FONTDATA->m_encoding =
+ (wxFontEncoding)(wxFONTENCODING_CP1250 + cp);
+ }
+ }
+ else if ( registry == _T("KOI8") )
+ {
+ M_FONTDATA->m_encoding = wxFONTENCODING_KOI8;
+ }
+ //else: unknown encoding - may be give a warning here?
}
bool wxFont::Create( int pointSize,
tn.GetNextToken(); // foundry
- M_FONTDATA->m_faceName = tn.GetNextToken(); // courier
+ M_FONTDATA->m_faceName = tn.GetNextToken(); // family
- tmp = tn.GetNextToken().MakeUpper();
+ tmp = tn.GetNextToken().MakeUpper(); // weight
if (tmp == wxT("BOLD")) M_FONTDATA->m_weight = wxBOLD;
if (tmp == wxT("BLACK")) M_FONTDATA->m_weight = wxBOLD;
if (tmp == wxT("EXTRABOLD")) M_FONTDATA->m_weight = wxBOLD;
if (tmp == wxT("LIGHT")) M_FONTDATA->m_weight = wxLIGHT;
if (tmp == wxT("THIN")) M_FONTDATA->m_weight = wxLIGHT;
- tmp = tn.GetNextToken().MakeUpper();
+ tmp = tn.GetNextToken().MakeUpper(); // slant
if (tmp == wxT("I")) M_FONTDATA->m_style = wxITALIC;
if (tmp == wxT("O")) M_FONTDATA->m_style = wxITALIC;
tn.GetNextToken(); // set width
- tn.GetNextToken(); // ?
+ tn.GetNextToken(); // add. style
tn.GetNextToken(); // pixel size
tmp = tn.GetNextToken(); // pointsize
tn.GetNextToken(); // x-res
tn.GetNextToken(); // y-res
- tmp = tn.GetNextToken().MakeUpper();
- if (tmp == wxT("M")) M_FONTDATA->m_family = wxMODERN;
- else if (M_FONTDATA->m_faceName == wxT("TIMES")) M_FONTDATA->m_family = wxROMAN;
- else if (M_FONTDATA->m_faceName == wxT("HELVETICA")) M_FONTDATA->m_family = wxSWISS;
- else if (M_FONTDATA->m_faceName == wxT("LUCIDATYPEWRITER")) M_FONTDATA->m_family = wxTELETYPE;
- else if (M_FONTDATA->m_faceName == wxT("LUCIDA")) M_FONTDATA->m_family = wxDECORATIVE;
- else if (M_FONTDATA->m_faceName == wxT("UTOPIA")) M_FONTDATA->m_family = wxSCRIPT;
+ tmp = tn.GetNextToken().MakeUpper(); // spacing
+
+ if (tmp == wxT("M"))
+ M_FONTDATA->m_family = wxMODERN;
+ else if (M_FONTDATA->m_faceName == wxT("TIMES"))
+ M_FONTDATA->m_family = wxROMAN;
+ else if (M_FONTDATA->m_faceName == wxT("HELVETICA"))
+ M_FONTDATA->m_family = wxSWISS;
+ else if (M_FONTDATA->m_faceName == wxT("LUCIDATYPEWRITER"))
+ M_FONTDATA->m_family = wxTELETYPE;
+ else if (M_FONTDATA->m_faceName == wxT("LUCIDA"))
+ M_FONTDATA->m_family = wxDECORATIVE;
+ else if (M_FONTDATA->m_faceName == wxT("UTOPIA"))
+ M_FONTDATA->m_family = wxSCRIPT;
+
+ tn.GetNextToken(); // avg width
+
+ // deal with font encoding
+ wxString registry = tn.GetNextToken().MakeUpper(),
+ encoding = tn.GetNextToken().MakeUpper();
+
+ if ( registry == _T("ISO8859") )
+ {
+ int cp;
+ if ( wxSscanf(encoding, "%d", &cp) == 1 )
+ {
+ M_FONTDATA->m_encoding =
+ (wxFontEncoding)(wxFONTENCODING_ISO8859_1 + cp - 1);
+ }
+ }
+ else if ( registry == _T("MICROSOFT") )
+ {
+ int cp;
+ if ( wxSscanf(encoding, "cp125%d", &cp) == 1 )
+ {
+ M_FONTDATA->m_encoding =
+ (wxFontEncoding)(wxFONTENCODING_CP1250 + cp);
+ }
+ }
+ else if ( registry == _T("KOI8") )
+ {
+ M_FONTDATA->m_encoding = wxFONTENCODING_KOI8;
+ }
+ //else: unknown encoding - may be give a warning here?
}
bool wxFont::Create( int pointSize,
// private functions
// ----------------------------------------------------------------------------
-// create the list of all fonts with the given spacing
-static char **CreateFontList(wxChar spacing, int *nFonts);
+// create the list of all fonts with the given spacing and encoding
+static char **CreateFontList(wxChar spacing, wxFontEncoding encoding,
+ int *nFonts);
// extract all font families from the given font list and call our
// OnFontFamily() for each of them
// helpers
// ----------------------------------------------------------------------------
-static char **CreateFontList(wxChar spacing, int *nFonts)
+static char **CreateFontList(wxChar spacing,
+ wxFontEncoding encoding,
+ int *nFonts)
{
+ wxString xencoding, xregistry;
+ wxGetXFontEncoding(encoding, &xencoding, &xregistry);
+
wxString pattern;
- pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-*-*"), spacing);
+ pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),
+ spacing, xregistry.c_str(), xencoding.c_str());
// get the list of all fonts
return XListFonts((Display *)wxGetDisplay(), pattern.mb_str(), 32767, nFonts);
// wxFontEnumerator
// ----------------------------------------------------------------------------
-bool wxFontEnumerator::EnumerateFamilies(bool fixedWidthOnly)
+bool wxFontEnumerator::EnumerateFamilies(wxFontEncoding encoding,
+ bool fixedWidthOnly)
{
int nFonts;
char **fonts;
if ( fixedWidthOnly )
{
bool cont = TRUE;
- fonts = CreateFontList(wxT('m'), &nFonts);
+ fonts = CreateFontList(wxT('m'), encoding, &nFonts);
if ( fonts )
{
cont = ProcessFamiliesFromFontList(this, fonts, nFonts);
return TRUE;
}
- fonts = CreateFontList(wxT('c'), &nFonts);
+ fonts = CreateFontList(wxT('c'), encoding, &nFonts);
if ( !fonts )
{
return TRUE;
}
else
{
- fonts = CreateFontList(wxT('*'), &nFonts);
+ fonts = CreateFontList(wxT('*'), encoding, &nFonts);
if ( !fonts )
{
- wxFAIL_MSG(wxT("No fonts at all on this system?"));
+ // it's ok if there are no fonts in given encoding - but it's not
+ // ok if there are no fonts at all
+ wxASSERT_MSG(encoding != wxFONTENCODING_SYSTEM,
+ wxT("No fonts at all on this system?"));
return FALSE;
}
}
wxString xregistry, xencoding;
+ if ( !wxGetXFontEncoding(encoding, &xregistry, &xencoding) )
+ {
+ fontSpec.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-*-*-%s-%s"),
+ xregistry.c_str(), xencoding.c_str());
+ if ( !wxTestFontSpec(fontSpec) )
+ {
+ // this encoding isn't available - what to do?
+ xregistry =
+ xencoding = wxT("*");
+ }
+ }
+
+ // construct the X font spec from our data
+ fontSpec.Printf(wxT("-*-%s-%s-%s-normal-*-*-%d-*-*-*-*-%s-%s"),
+ xfamily.c_str(), xweight.c_str(), xstyle.c_str(),
+ pointSize, xregistry.c_str(), xencoding.c_str());
+
+ return wxLoadFont(fontSpec);
+}
+
+bool wxGetXFontEncoding(wxFontEncoding encoding,
+ wxString *pregistry, wxString *pencoding)
+{
+ wxCHECK_MSG( pencoding && pregistry, FALSE, wxT("bad pointer") );
+
+ wxString& xencoding = *pencoding;
+ wxString& xregistry = *pregistry;
+
if ( encoding == wxFONTENCODING_DEFAULT )
{
// use the apps default
case wxFONTENCODING_CP1252:
{
int cp = encoding - wxFONTENCODING_CP1250 + 1250;
+ wxString fontSpec;
fontSpec.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-*-*-microsoft-cp%d"),
cp);
if ( wxTestFontSpec(fontSpec) )
xencoding = wxT("*");
}
- if ( test )
- {
- fontSpec.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-*-*-%s-%s"),
- xregistry.c_str(), xencoding.c_str());
- if ( !wxTestFontSpec(fontSpec) )
- {
- // this encoding isn't available - what to do?
- xregistry =
- xencoding = wxT("*");
- }
- }
-
- // construct the X font spec from our data
- fontSpec.Printf(wxT("-*-%s-%s-%s-normal-*-*-%d-*-*-*-*-%s-%s"),
- xfamily.c_str(), xweight.c_str(), xstyle.c_str(),
- pointSize, xregistry.c_str(), xencoding.c_str());
-
- return wxLoadFont(fontSpec);
+ return !test;
}
wxNativeFont wxLoadQueryNearestFont(int pointSize,