Don't use deprecated wxBOLD, wxNORMAL and similar constants.
Replace them with wxFONTWEIGHT_BOLD, wxFONTSTYLE_NORMAL or wxFONTWEIGHT_NORMAL and equivalents in the code of the library itself and in the samples. Also simplify font construction using wxFontInfo where possible to avoid specifying these constants at all if they are not needed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1084,7 +1084,7 @@ void DnDFrame::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
GetClientSize( &w, &h );
|
GetClientSize( &w, &h );
|
||||||
|
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
dc.SetFont( wxFont( 24, wxDECORATIVE, wxNORMAL, wxNORMAL, false, wxT("charter") ) );
|
dc.SetFont( wxFontInfo(24).Family(wxFONTFAMILY_DECORATIVE).FaceName("charter") );
|
||||||
dc.DrawText( wxT("Drag text from here!"), 100, h-50 );
|
dc.DrawText( wxT("Drag text from here!"), 100, h-50 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -774,7 +774,7 @@ void MyCanvas::DrawDefault(wxDC& dc)
|
|||||||
void MyCanvas::DrawText(wxDC& dc)
|
void MyCanvas::DrawText(wxDC& dc)
|
||||||
{
|
{
|
||||||
// set underlined font for testing
|
// set underlined font for testing
|
||||||
dc.SetFont( wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, true) );
|
dc.SetFont( wxFontInfo(12).Family(wxFONTFAMILY_MODERN).Underlined() );
|
||||||
dc.DrawText( wxT("This is text"), 110, 10 );
|
dc.DrawText( wxT("This is text"), 110, 10 );
|
||||||
dc.DrawRotatedText( wxT("That is text"), 20, 10, -45 );
|
dc.DrawRotatedText( wxT("That is text"), 20, 10, -45 );
|
||||||
|
|
||||||
@@ -791,7 +791,7 @@ void MyCanvas::DrawText(wxDC& dc)
|
|||||||
dc.DrawRotatedText(text , 400, 400, n);
|
dc.DrawRotatedText(text , 400, 400, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
dc.SetFont( wxFont( 18, wxSWISS, wxNORMAL, wxNORMAL ) );
|
dc.SetFont( wxFontInfo(18).Family(wxFONTFAMILY_SWISS) );
|
||||||
|
|
||||||
dc.DrawText( wxT("This is Swiss 18pt text."), 110, 40 );
|
dc.DrawText( wxT("This is Swiss 18pt text."), 110, 40 );
|
||||||
|
|
||||||
@@ -1232,7 +1232,7 @@ void MyCanvas::DrawSplines(wxDC& dc)
|
|||||||
letters[m][n].y = center.y + h[ letters[m][n].y ];
|
letters[m][n].y = center.y + h[ letters[m][n].y ];
|
||||||
}
|
}
|
||||||
|
|
||||||
dc.SetPen( wxPen( *wxBLUE, 1, wxDOT) );
|
dc.SetPen( wxPen( *wxBLUE, 1, wxPENSTYLE_DOT) );
|
||||||
dc.DrawLines(5, letters[m]);
|
dc.DrawLines(5, letters[m]);
|
||||||
dc.SetPen( wxPen( *wxBLACK, 4) );
|
dc.SetPen( wxPen( *wxBLACK, 4) );
|
||||||
dc.DrawSpline(5, letters[m]);
|
dc.DrawSpline(5, letters[m]);
|
||||||
|
@@ -666,7 +666,7 @@ void MyCanvas::CreateAntiAliasedBitmap()
|
|||||||
|
|
||||||
dc.Clear();
|
dc.Clear();
|
||||||
|
|
||||||
dc.SetFont( wxFont( 24, wxDECORATIVE, wxNORMAL, wxNORMAL) );
|
dc.SetFont( wxFontInfo(24).Family(wxFONTFAMILY_DECORATIVE) );
|
||||||
dc.SetTextForeground( wxT("RED") );
|
dc.SetTextForeground( wxT("RED") );
|
||||||
dc.DrawText( wxT("This is anti-aliased Text."), 20, 5 );
|
dc.DrawText( wxT("This is anti-aliased Text."), 20, 5 );
|
||||||
dc.DrawText( wxT("And a Rectangle."), 20, 45 );
|
dc.DrawText( wxT("And a Rectangle."), 20, 45 );
|
||||||
|
@@ -110,11 +110,11 @@ void OwnerDrawnFrame::InitMenu()
|
|||||||
wxMenu *sub_menu = new wxMenu;
|
wxMenu *sub_menu = new wxMenu;
|
||||||
|
|
||||||
// vars used for menu construction
|
// vars used for menu construction
|
||||||
wxFont fontLarge(18, wxROMAN, wxNORMAL, wxBOLD, false),
|
wxFont fontLarge(wxFontInfo(18).Family(wxFONTFAMILY_ROMAN).Bold()),
|
||||||
fontUlined(12, wxDEFAULT, wxNORMAL, wxNORMAL, true),
|
fontUlined(wxFontInfo(12).Underlined()),
|
||||||
fontItalic(12, wxMODERN, wxITALIC, wxBOLD, false),
|
fontItalic(wxFontInfo(12).Italic().Bold()),
|
||||||
// should be at least of the size of bitmaps
|
// should be at least of the size of bitmaps
|
||||||
fontBmp(14, wxDEFAULT, wxNORMAL, wxNORMAL, false);
|
fontBmp(wxFontInfo(14));
|
||||||
|
|
||||||
// sorry for my artistic skills...
|
// sorry for my artistic skills...
|
||||||
wxBitmap bmpBell(wxT("bell")),
|
wxBitmap bmpBell(wxT("bell")),
|
||||||
|
@@ -698,9 +698,8 @@ void MyPrintout::DrawPageTwo()
|
|||||||
wxT("testing "), wxT("string. "), wxT("Enjoy "), wxT("it!") };
|
wxT("testing "), wxT("string. "), wxT("Enjoy "), wxT("it!") };
|
||||||
wxCoord w, h;
|
wxCoord w, h;
|
||||||
long x = 200, y= 250;
|
long x = 200, y= 250;
|
||||||
wxFont fnt(15, wxSWISS, wxNORMAL, wxNORMAL);
|
|
||||||
|
|
||||||
dc->SetFont(fnt);
|
dc->SetFont(wxFontInfo(15).Family(wxFONTFAMILY_SWISS));
|
||||||
|
|
||||||
for (int i = 0; i < 7; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
{
|
{
|
||||||
@@ -746,15 +745,6 @@ void MyPrintout::DrawPageTwo()
|
|||||||
// Writes a header on a page. Margin units are in millimetres.
|
// Writes a header on a page. Margin units are in millimetres.
|
||||||
bool MyPrintout::WritePageHeader(wxPrintout *printout, wxDC *dc, const wxString&text, float mmToLogical)
|
bool MyPrintout::WritePageHeader(wxPrintout *printout, wxDC *dc, const wxString&text, float mmToLogical)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
static wxFont *headerFont = (wxFont *) NULL;
|
|
||||||
if (!headerFont)
|
|
||||||
{
|
|
||||||
headerFont = wxTheFontList->FindOrCreateFont(16, wxSWISS, wxNORMAL, wxBOLD);
|
|
||||||
}
|
|
||||||
dc->SetFont(headerFont);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int pageWidthMM, pageHeightMM;
|
int pageWidthMM, pageHeightMM;
|
||||||
|
|
||||||
printout->GetPageSizeMM(&pageWidthMM, &pageHeightMM);
|
printout->GetPageSizeMM(&pageWidthMM, &pageHeightMM);
|
||||||
|
@@ -113,7 +113,7 @@ void wxFontDataProperty::OnSetValue()
|
|||||||
|
|
||||||
wxFont font = fontData.GetChosenFont();
|
wxFont font = fontData.GetChosenFont();
|
||||||
if ( !font.IsOk() )
|
if ( !font.IsOk() )
|
||||||
font = wxFont(10,wxSWISS,wxNORMAL,wxNORMAL);
|
font = wxFontInfo(10).Family(wxFONTFAMILY_SWISS);
|
||||||
|
|
||||||
m_value = WXVARIANT(font);
|
m_value = WXVARIANT(font);
|
||||||
}
|
}
|
||||||
|
@@ -594,8 +594,8 @@ void MyApp::CreateStyles()
|
|||||||
{
|
{
|
||||||
// Paragraph styles
|
// Paragraph styles
|
||||||
|
|
||||||
wxFont romanFont(12, wxROMAN, wxNORMAL, wxNORMAL);
|
wxFont romanFont(wxFontInfo(12).Family(wxFONTFAMILY_ROMAN));
|
||||||
wxFont swissFont(12, wxSWISS, wxNORMAL, wxNORMAL);
|
wxFont swissFont(wxFontInfo(12).Family(wxFONTFAMILY_SWISS));
|
||||||
|
|
||||||
wxRichTextParagraphStyleDefinition* normalPara = new wxRichTextParagraphStyleDefinition(wxT("Normal"));
|
wxRichTextParagraphStyleDefinition* normalPara = new wxRichTextParagraphStyleDefinition(wxT("Normal"));
|
||||||
wxRichTextAttr normalAttr;
|
wxRichTextAttr normalAttr;
|
||||||
@@ -915,14 +915,14 @@ MyFrame::MyFrame(const wxString& title, wxWindowID id, const wxPoint& pos,
|
|||||||
wxSplitterWindow* splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_LIVE_UPDATE);
|
wxSplitterWindow* splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_LIVE_UPDATE);
|
||||||
sizer->Add(splitter, 1, wxEXPAND);
|
sizer->Add(splitter, 1, wxEXPAND);
|
||||||
|
|
||||||
wxFont textFont = wxFont(12, wxROMAN, wxNORMAL, wxNORMAL);
|
wxFont textFont = wxFont(wxFontInfo(12).Family(wxFONTFAMILY_ROMAN));
|
||||||
wxFont boldFont = wxFont(12, wxROMAN, wxNORMAL, wxBOLD);
|
wxFont boldFont = wxFont(wxFontInfo(12).Family(wxFONTFAMILY_ROMAN));
|
||||||
wxFont italicFont = wxFont(12, wxROMAN, wxITALIC, wxNORMAL);
|
wxFont italicFont = wxFont(wxFontInfo(12).Family(wxFONTFAMILY_ROMAN).Italic());
|
||||||
|
|
||||||
m_richTextCtrl = new MyRichTextCtrl(splitter, ID_RICHTEXT_CTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxVSCROLL|wxHSCROLL/*|wxWANTS_CHARS*/);
|
m_richTextCtrl = new MyRichTextCtrl(splitter, ID_RICHTEXT_CTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxVSCROLL|wxHSCROLL/*|wxWANTS_CHARS*/);
|
||||||
wxASSERT(!m_richTextCtrl->GetBuffer().GetAttributes().HasFontPixelSize());
|
wxASSERT(!m_richTextCtrl->GetBuffer().GetAttributes().HasFontPixelSize());
|
||||||
|
|
||||||
wxFont font(12, wxROMAN, wxNORMAL, wxNORMAL);
|
wxFont font(wxFontInfo(12).Family(wxFONTFAMILY_ROMAN));
|
||||||
|
|
||||||
m_richTextCtrl->SetFont(font);
|
m_richTextCtrl->SetFont(font);
|
||||||
|
|
||||||
|
@@ -145,7 +145,7 @@ Edit::Edit (wxWindow *parent, wxWindowID id,
|
|||||||
SetReadOnly (g_CommonPrefs.readOnlyInitial);
|
SetReadOnly (g_CommonPrefs.readOnlyInitial);
|
||||||
SetWrapMode (g_CommonPrefs.wrapModeInitial?
|
SetWrapMode (g_CommonPrefs.wrapModeInitial?
|
||||||
wxSTC_WRAP_WORD: wxSTC_WRAP_NONE);
|
wxSTC_WRAP_WORD: wxSTC_WRAP_NONE);
|
||||||
wxFont font (10, wxMODERN, wxNORMAL, wxNORMAL);
|
wxFont font(wxFontInfo(10).Family(wxFONTFAMILY_MODERN));
|
||||||
StyleSetFont (wxSTC_STYLE_DEFAULT, font);
|
StyleSetFont (wxSTC_STYLE_DEFAULT, font);
|
||||||
StyleSetForeground (wxSTC_STYLE_DEFAULT, *wxBLACK);
|
StyleSetForeground (wxSTC_STYLE_DEFAULT, *wxBLACK);
|
||||||
StyleSetBackground (wxSTC_STYLE_DEFAULT, *wxWHITE);
|
StyleSetBackground (wxSTC_STYLE_DEFAULT, *wxWHITE);
|
||||||
@@ -529,7 +529,7 @@ bool Edit::InitializePrefs (const wxString &name) {
|
|||||||
// default fonts for all styles!
|
// default fonts for all styles!
|
||||||
int Nr;
|
int Nr;
|
||||||
for (Nr = 0; Nr < wxSTC_STYLE_LASTPREDEFINED; Nr++) {
|
for (Nr = 0; Nr < wxSTC_STYLE_LASTPREDEFINED; Nr++) {
|
||||||
wxFont font (10, wxMODERN, wxNORMAL, wxNORMAL);
|
wxFont font(wxFontInfo(10).Family(wxFONTFAMILY_MODERN));
|
||||||
StyleSetFont (Nr, font);
|
StyleSetFont (Nr, font);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -543,8 +543,9 @@ bool Edit::InitializePrefs (const wxString &name) {
|
|||||||
for (Nr = 0; Nr < STYLE_TYPES_COUNT; Nr++) {
|
for (Nr = 0; Nr < STYLE_TYPES_COUNT; Nr++) {
|
||||||
if (curInfo->styles[Nr].type == -1) continue;
|
if (curInfo->styles[Nr].type == -1) continue;
|
||||||
const StyleInfo &curType = g_StylePrefs [curInfo->styles[Nr].type];
|
const StyleInfo &curType = g_StylePrefs [curInfo->styles[Nr].type];
|
||||||
wxFont font (curType.fontsize, wxMODERN, wxNORMAL, wxNORMAL, false,
|
wxFont font(wxFontInfo(curType.fontsize)
|
||||||
curType.fontname);
|
.Family(wxFONTFAMILY_MODERN)
|
||||||
|
.FaceName(curType.fontname));
|
||||||
StyleSetFont (Nr, font);
|
StyleSetFont (Nr, font);
|
||||||
if (curType.foreground) {
|
if (curType.foreground) {
|
||||||
StyleSetForeground (Nr, wxColour (curType.foreground));
|
StyleSetForeground (Nr, wxColour (curType.foreground));
|
||||||
|
@@ -648,7 +648,7 @@ AppAbout::AppAbout (wxWindow *parent,
|
|||||||
wxBoxSizer *totalpane = new wxBoxSizer (wxVERTICAL);
|
wxBoxSizer *totalpane = new wxBoxSizer (wxVERTICAL);
|
||||||
totalpane->Add (0, 20);
|
totalpane->Add (0, 20);
|
||||||
wxStaticText *appname = new wxStaticText(this, wxID_ANY, *g_appname);
|
wxStaticText *appname = new wxStaticText(this, wxID_ANY, *g_appname);
|
||||||
appname->SetFont (wxFont (24, wxDEFAULT, wxNORMAL, wxBOLD));
|
appname->SetFont (wxFontInfo(24).Bold());
|
||||||
totalpane->Add (appname, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, 40);
|
totalpane->Add (appname, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, 40);
|
||||||
totalpane->Add (0, 10);
|
totalpane->Add (0, 10);
|
||||||
totalpane->Add (aboutpane, 0, wxEXPAND | wxALL, 4);
|
totalpane->Add (aboutpane, 0, wxEXPAND | wxALL, 4);
|
||||||
|
@@ -336,7 +336,6 @@ void MyCanvas::OnDraw(wxDC& dc)
|
|||||||
wxBrush wB;
|
wxBrush wB;
|
||||||
wxPoint points[6];
|
wxPoint points[6];
|
||||||
wxColour wC;
|
wxColour wC;
|
||||||
wxFont wF;
|
|
||||||
|
|
||||||
dc.SetFont(*wxSWISS_FONT);
|
dc.SetFont(*wxSWISS_FONT);
|
||||||
dc.SetPen(*wxGREEN_PEN);
|
dc.SetPen(*wxGREEN_PEN);
|
||||||
@@ -399,8 +398,10 @@ void MyCanvas::OnDraw(wxDC& dc)
|
|||||||
dc.DrawText(wxT("This is a Red string"), 50, 200);
|
dc.DrawText(wxT("This is a Red string"), 50, 200);
|
||||||
dc.DrawRotatedText(wxT("This is a 45 deg string"), 50, 200, 45);
|
dc.DrawRotatedText(wxT("This is a 45 deg string"), 50, 200, 45);
|
||||||
dc.DrawRotatedText(wxT("This is a 90 deg string"), 50, 200, 90);
|
dc.DrawRotatedText(wxT("This is a 90 deg string"), 50, 200, 90);
|
||||||
wF = wxFont ( 18, wxROMAN, wxITALIC, wxBOLD, false, wxT("Times New Roman"));
|
dc.SetFont(wxFontInfo(18)
|
||||||
dc.SetFont(wF);
|
.FaceName("Times New Roman")
|
||||||
|
.Family(wxFONTFAMILY_ROMAN)
|
||||||
|
.Italic().Bold());
|
||||||
dc.SetTextForeground (wC);
|
dc.SetTextForeground (wC);
|
||||||
dc.DrawText(wxT("This is a Times-style string"), 50, 60);
|
dc.DrawText(wxT("This is a Times-style string"), 50, 60);
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
@@ -455,8 +456,10 @@ void MyCanvas::OnDraw(wxDC& dc)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
wF = wxFont ( 18, wxROMAN, wxITALIC, wxBOLD, false, wxT("Times New Roman"));
|
dc.SetFont(wxFontInfo(18)
|
||||||
dc.SetFont(wF);
|
.FaceName("Times New Roman")
|
||||||
|
.Family(wxFONTFAMILY_ROMAN)
|
||||||
|
.Italic().Bold());
|
||||||
dc.DrawLine(0, 0, 200, 200);
|
dc.DrawLine(0, 0, 200, 200);
|
||||||
dc.DrawLine(200, 0, 0, 200);
|
dc.DrawLine(200, 0, 0, 200);
|
||||||
dc.DrawText(wxT("This is an 18pt string"), 50, 60);
|
dc.DrawText(wxT("This is an 18pt string"), 50, 60);
|
||||||
|
@@ -1098,23 +1098,23 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
|||||||
switch ( (wxChar)wxTheApp->argv[1][0] )
|
switch ( (wxChar)wxTheApp->argv[1][0] )
|
||||||
{
|
{
|
||||||
case '2':
|
case '2':
|
||||||
m_horizontal->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxNORMAL,
|
m_horizontal->SetFont(wxFontInfo(18)
|
||||||
false, wxT(""),
|
.Family(wxFONTFAMILY_SWISS)
|
||||||
wxFONTENCODING_ISO8859_2));
|
.Encoding(wxFONTENCODING_ISO8859_2));
|
||||||
m_horizontal->AppendText(wxT("\256lu\273ou\350k\375 k\371\362 zb\354sile \350e\271tina \253\273"));
|
m_horizontal->AppendText(wxT("\256lu\273ou\350k\375 k\371\362 zb\354sile \350e\271tina \253\273"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '1':
|
case '1':
|
||||||
m_horizontal->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxNORMAL,
|
m_horizontal->SetFont(wxFontInfo(18)
|
||||||
false, wxT(""),
|
.Family(wxFONTFAMILY_SWISS)
|
||||||
wxFONTENCODING_CP1251));
|
.Encoding(wxFONTENCODING_CP1251));
|
||||||
m_horizontal->AppendText(wxT("\317\360\350\342\345\362!"));
|
m_horizontal->AppendText(wxT("\317\360\350\342\345\362!"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '8':
|
case '8':
|
||||||
m_horizontal->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxNORMAL,
|
m_horizontal->SetFont(wxFontInfo(18)
|
||||||
false, wxT(""),
|
.Family(wxFONTFAMILY_SWISS)
|
||||||
wxFONTENCODING_CP1251));
|
.Encoding(wxFONTENCODING_CP1251));
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
m_horizontal->AppendText(L"\x0412\x0430\x0434\x0438\x043c \x0426");
|
m_horizontal->AppendText(L"\x0412\x0430\x0434\x0438\x043c \x0426");
|
||||||
#else
|
#else
|
||||||
@@ -1923,12 +1923,12 @@ void RichTextFrame::OnIdle(wxIdleEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
if (attr.HasFont())
|
if (attr.HasFont())
|
||||||
{
|
{
|
||||||
if (attr.GetFont().GetWeight() == wxBOLD)
|
if (attr.GetFont().GetWeight() == wxFONTWEIGHT_BOLD)
|
||||||
msg += wxT(" BOLD");
|
msg += wxT(" BOLD");
|
||||||
else if (attr.GetFont().GetWeight() == wxNORMAL)
|
else if (attr.GetFont().GetWeight() == wxFONTWEIGHT_NORMAL)
|
||||||
msg += wxT(" NORMAL");
|
msg += wxT(" NORMAL");
|
||||||
|
|
||||||
if (attr.GetFont().GetStyle() == wxITALIC)
|
if (attr.GetFont().GetStyle() == wxFONTSTYLE_ITALIC)
|
||||||
msg += wxT(" ITALIC");
|
msg += wxT(" ITALIC");
|
||||||
|
|
||||||
if (attr.GetFont().GetUnderlined())
|
if (attr.GetFont().GetUnderlined())
|
||||||
|
@@ -111,7 +111,7 @@ void ClassListDialog::CreateControls()
|
|||||||
m_pClassCountText = new wxStaticText( this, wxID_STATIC,
|
m_pClassCountText = new wxStaticText( this, wxID_STATIC,
|
||||||
wxT("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"),
|
wxT("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"),
|
||||||
wxDefaultPosition, wxDefaultSize, 0 );
|
wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_pClassCountText->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Tahoma")));
|
m_pClassCountText->SetFont(wxFontInfo(8).Family(wxFONTFAMILY_SWISS).Bold());
|
||||||
itemBoxSizer2->Add(m_pClassCountText, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
itemBoxSizer2->Add(m_pClassCountText, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
@@ -118,13 +118,14 @@ wxFontBundleBase::GetFaceForFont(const wxFontMgrFontRefData& font) const
|
|||||||
|
|
||||||
int type = FaceType_Regular;
|
int type = FaceType_Regular;
|
||||||
|
|
||||||
if ( font.GetWeight() == wxBOLD )
|
if ( font.GetWeight() == wxFONTWEIGHT_BOLD )
|
||||||
type |= FaceType_Bold;
|
type |= FaceType_Bold;
|
||||||
|
|
||||||
// FIXME -- this should read "if ( font->GetStyle() == wxITALIC )",
|
// FIXME -- this should read "if ( font->GetStyle() == wxFONTSTYLE_ITALIC )",
|
||||||
// but since DFB doesn't support slant, we try to display it with italic
|
// but since DFB doesn't support slant, we try to display it with italic
|
||||||
// face (better than nothing...)
|
// face (better than nothing...)
|
||||||
if ( font.GetStyle() == wxITALIC || font.GetStyle() == wxSLANT )
|
if ( font.GetStyle() == wxFONTSTYLE_ITALIC
|
||||||
|
|| font.GetStyle() == wxFONTSTYLE_SLANT )
|
||||||
{
|
{
|
||||||
if ( HasFace((FaceType)(type | FaceType_Italic)) )
|
if ( HasFace((FaceType)(type | FaceType_Italic)) )
|
||||||
type |= FaceType_Italic;
|
type |= FaceType_Italic;
|
||||||
|
@@ -1041,8 +1041,8 @@ void wxPostScriptDCImpl::SetFont( const wxFont& font )
|
|||||||
|
|
||||||
m_font = font;
|
m_font = font;
|
||||||
|
|
||||||
int Style = m_font.GetStyle();
|
wxFontStyle Style = m_font.GetStyle();
|
||||||
int Weight = m_font.GetWeight();
|
wxFontWeight Weight = m_font.GetWeight();
|
||||||
|
|
||||||
const char *name;
|
const char *name;
|
||||||
switch (m_font.GetFamily())
|
switch (m_font.GetFamily())
|
||||||
@@ -1050,16 +1050,16 @@ void wxPostScriptDCImpl::SetFont( const wxFont& font )
|
|||||||
case wxTELETYPE:
|
case wxTELETYPE:
|
||||||
case wxMODERN:
|
case wxMODERN:
|
||||||
{
|
{
|
||||||
if (Style == wxITALIC)
|
if (Style == wxFONTSTYLE_ITALIC)
|
||||||
{
|
{
|
||||||
if (Weight == wxBOLD)
|
if (Weight == wxFONTWEIGHT_BOLD)
|
||||||
name = "/Courier-BoldOblique";
|
name = "/Courier-BoldOblique";
|
||||||
else
|
else
|
||||||
name = "/Courier-Oblique";
|
name = "/Courier-Oblique";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Weight == wxBOLD)
|
if (Weight == wxFONTWEIGHT_BOLD)
|
||||||
name = "/Courier-Bold";
|
name = "/Courier-Bold";
|
||||||
else
|
else
|
||||||
name = "/Courier";
|
name = "/Courier";
|
||||||
@@ -1068,16 +1068,16 @@ void wxPostScriptDCImpl::SetFont( const wxFont& font )
|
|||||||
}
|
}
|
||||||
case wxROMAN:
|
case wxROMAN:
|
||||||
{
|
{
|
||||||
if (Style == wxITALIC)
|
if (Style == wxFONTSTYLE_ITALIC)
|
||||||
{
|
{
|
||||||
if (Weight == wxBOLD)
|
if (Weight == wxFONTWEIGHT_BOLD)
|
||||||
name = "/Times-BoldItalic";
|
name = "/Times-BoldItalic";
|
||||||
else
|
else
|
||||||
name = "/Times-Italic";
|
name = "/Times-Italic";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Weight == wxBOLD)
|
if (Weight == wxFONTWEIGHT_BOLD)
|
||||||
name = "/Times-Bold";
|
name = "/Times-Bold";
|
||||||
else
|
else
|
||||||
name = "/Times-Roman";
|
name = "/Times-Roman";
|
||||||
@@ -1092,16 +1092,16 @@ void wxPostScriptDCImpl::SetFont( const wxFont& font )
|
|||||||
case wxSWISS:
|
case wxSWISS:
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (Style == wxITALIC)
|
if (Style == wxFONTSTYLE_ITALIC)
|
||||||
{
|
{
|
||||||
if (Weight == wxBOLD)
|
if (Weight == wxFONTWEIGHT_BOLD)
|
||||||
name = "/Helvetica-BoldOblique";
|
name = "/Helvetica-BoldOblique";
|
||||||
else
|
else
|
||||||
name = "/Helvetica-Oblique";
|
name = "/Helvetica-Oblique";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Weight == wxBOLD)
|
if (Weight == wxFONTWEIGHT_BOLD)
|
||||||
name = "/Helvetica-Bold";
|
name = "/Helvetica-Bold";
|
||||||
else
|
else
|
||||||
name = "/Helvetica";
|
name = "/Helvetica";
|
||||||
@@ -2092,7 +2092,7 @@ void wxPostScriptDCImpl::DoGetTextExtent(const wxString& string,
|
|||||||
/ dc.StartDoc("Test");
|
/ dc.StartDoc("Test");
|
||||||
/ dc.StartPage();
|
/ dc.StartPage();
|
||||||
/ wxCoord w,h;
|
/ wxCoord w,h;
|
||||||
/ dc.SetFont(new wxFont(10, wxROMAN, wxNORMAL, wxNORMAL));
|
/ dc.SetFont(new wxFontInfo(10).Family(wxFONTFAMILY_ROMAN));
|
||||||
/ dc.GetTextExtent("Hallo",&w,&h);
|
/ dc.GetTextExtent("Hallo",&w,&h);
|
||||||
/ dc.EndPage();
|
/ dc.EndPage();
|
||||||
/ dc.EndDoc();
|
/ dc.EndDoc();
|
||||||
@@ -2135,17 +2135,17 @@ void wxPostScriptDCImpl::DoGetTextExtent(const wxString& string,
|
|||||||
case wxMODERN:
|
case wxMODERN:
|
||||||
case wxTELETYPE:
|
case wxTELETYPE:
|
||||||
{
|
{
|
||||||
if ((Style == wxITALIC) && (Weight == wxBOLD)) name = wxT("CourBoO.afm");
|
if ((Style == wxFONTSTYLE_ITALIC) && (Weight == wxFONTWEIGHT_BOLD)) name = wxT("CourBoO.afm");
|
||||||
else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = wxT("CourBo.afm");
|
else if ((Style != wxFONTSTYLE_ITALIC) && (Weight == wxFONTWEIGHT_BOLD)) name = wxT("CourBo.afm");
|
||||||
else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = wxT("CourO.afm");
|
else if ((Style == wxFONTSTYLE_ITALIC) && (Weight != wxFONTWEIGHT_BOLD)) name = wxT("CourO.afm");
|
||||||
else name = wxT("Cour.afm");
|
else name = wxT("Cour.afm");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxROMAN:
|
case wxROMAN:
|
||||||
{
|
{
|
||||||
if ((Style == wxITALIC) && (Weight == wxBOLD)) name = wxT("TimesBoO.afm");
|
if ((Style == wxFONTSTYLE_ITALIC) && (Weight == wxFONTWEIGHT_BOLD)) name = wxT("TimesBoO.afm");
|
||||||
else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = wxT("TimesBo.afm");
|
else if ((Style != wxFONTSTYLE_ITALIC) && (Weight == wxFONTWEIGHT_BOLD)) name = wxT("TimesBo.afm");
|
||||||
else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = wxT("TimesO.afm");
|
else if ((Style == wxFONTSTYLE_ITALIC) && (Weight != wxFONTWEIGHT_BOLD)) name = wxT("TimesO.afm");
|
||||||
else name = wxT("TimesRo.afm");
|
else name = wxT("TimesRo.afm");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2157,9 +2157,9 @@ void wxPostScriptDCImpl::DoGetTextExtent(const wxString& string,
|
|||||||
case wxSWISS:
|
case wxSWISS:
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if ((Style == wxITALIC) && (Weight == wxBOLD)) name = wxT("HelvBoO.afm");
|
if ((Style == wxFONTSTYLE_ITALIC) && (Weight == wxFONTWEIGHT_BOLD)) name = wxT("HelvBoO.afm");
|
||||||
else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = wxT("HelvBo.afm");
|
else if ((Style != wxFONTSTYLE_ITALIC) && (Weight == wxFONTWEIGHT_BOLD)) name = wxT("HelvBo.afm");
|
||||||
else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = wxT("HelvO.afm");
|
else if ((Style == wxFONTSTYLE_ITALIC) && (Weight != wxFONTWEIGHT_BOLD)) name = wxT("HelvO.afm");
|
||||||
else name = wxT("Helv.afm");
|
else name = wxT("Helv.afm");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -94,11 +94,11 @@ static const wxChar *wxFontWeightIntToString(int weight)
|
|||||||
{
|
{
|
||||||
switch (weight)
|
switch (weight)
|
||||||
{
|
{
|
||||||
case wxLIGHT:
|
case wxFONTWEIGHT_LIGHT:
|
||||||
return wxT("Light");
|
return wxT("Light");
|
||||||
case wxBOLD:
|
case wxFONTWEIGHT_BOLD:
|
||||||
return wxT("Bold");
|
return wxT("Bold");
|
||||||
case wxNORMAL:
|
case wxFONTWEIGHT_NORMAL:
|
||||||
default:
|
default:
|
||||||
return wxT("Normal");
|
return wxT("Normal");
|
||||||
}
|
}
|
||||||
@@ -108,11 +108,11 @@ static const wxChar *wxFontStyleIntToString(int style)
|
|||||||
{
|
{
|
||||||
switch (style)
|
switch (style)
|
||||||
{
|
{
|
||||||
case wxITALIC:
|
case wxFONTSTYLE_ITALIC:
|
||||||
return wxT("Italic");
|
return wxT("Italic");
|
||||||
case wxSLANT:
|
case wxFONTSTYLE_SLANT:
|
||||||
return wxT("Slant");
|
return wxT("Slant");
|
||||||
case wxNORMAL:
|
case wxFONTSTYLE_NORMAL:
|
||||||
default:
|
default:
|
||||||
return wxT("Normal");
|
return wxT("Normal");
|
||||||
}
|
}
|
||||||
@@ -122,62 +122,62 @@ static const wxChar *wxFontFamilyIntToString(int family)
|
|||||||
{
|
{
|
||||||
switch (family)
|
switch (family)
|
||||||
{
|
{
|
||||||
case wxROMAN:
|
case wxFONTFAMILY_ROMAN:
|
||||||
return wxT("Roman");
|
return wxT("Roman");
|
||||||
case wxDECORATIVE:
|
case wxFONTFAMILY_DECORATIVE:
|
||||||
return wxT("Decorative");
|
return wxT("Decorative");
|
||||||
case wxMODERN:
|
case wxFONTFAMILY_MODERN:
|
||||||
return wxT("Modern");
|
return wxT("Modern");
|
||||||
case wxSCRIPT:
|
case wxFONTFAMILY_SCRIPT:
|
||||||
return wxT("Script");
|
return wxT("Script");
|
||||||
case wxTELETYPE:
|
case wxFONTFAMILY_TELETYPE:
|
||||||
return wxT("Teletype");
|
return wxT("Teletype");
|
||||||
case wxSWISS:
|
case wxFONTFAMILY_SWISS:
|
||||||
default:
|
default:
|
||||||
return wxT("Swiss");
|
return wxT("Swiss");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wxFontFamilyStringToInt(const wxString& family)
|
static wxFontFamily wxFontFamilyStringToInt(const wxString& family)
|
||||||
{
|
{
|
||||||
if (family.empty())
|
if (family.empty())
|
||||||
return wxSWISS;
|
return wxFONTFAMILY_SWISS;
|
||||||
|
|
||||||
if (wxStrcmp(family, wxT("Roman")) == 0)
|
if (wxStrcmp(family, wxT("Roman")) == 0)
|
||||||
return wxROMAN;
|
return wxFONTFAMILY_ROMAN;
|
||||||
else if (wxStrcmp(family, wxT("Decorative")) == 0)
|
else if (wxStrcmp(family, wxT("Decorative")) == 0)
|
||||||
return wxDECORATIVE;
|
return wxFONTFAMILY_DECORATIVE;
|
||||||
else if (wxStrcmp(family, wxT("Modern")) == 0)
|
else if (wxStrcmp(family, wxT("Modern")) == 0)
|
||||||
return wxMODERN;
|
return wxFONTFAMILY_MODERN;
|
||||||
else if (wxStrcmp(family, wxT("Script")) == 0)
|
else if (wxStrcmp(family, wxT("Script")) == 0)
|
||||||
return wxSCRIPT;
|
return wxFONTFAMILY_SCRIPT;
|
||||||
else if (wxStrcmp(family, wxT("Teletype")) == 0)
|
else if (wxStrcmp(family, wxT("Teletype")) == 0)
|
||||||
return wxTELETYPE;
|
return wxFONTFAMILY_TELETYPE;
|
||||||
else return wxSWISS;
|
else return wxFONTFAMILY_SWISS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wxFontStyleStringToInt(const wxString& style)
|
static wxFontStyle wxFontStyleStringToInt(const wxString& style)
|
||||||
{
|
{
|
||||||
if (style.empty())
|
if (style.empty())
|
||||||
return wxNORMAL;
|
return wxFONTSTYLE_NORMAL;
|
||||||
if (wxStrcmp(style, wxT("Italic")) == 0)
|
if (wxStrcmp(style, wxT("Italic")) == 0)
|
||||||
return wxITALIC;
|
return wxFONTSTYLE_ITALIC;
|
||||||
else if (wxStrcmp(style, wxT("Slant")) == 0)
|
else if (wxStrcmp(style, wxT("Slant")) == 0)
|
||||||
return wxSLANT;
|
return wxFONTSTYLE_SLANT;
|
||||||
else
|
else
|
||||||
return wxNORMAL;
|
return wxFONTSTYLE_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wxFontWeightStringToInt(const wxString& weight)
|
static wxFontWeight wxFontWeightStringToInt(const wxString& weight)
|
||||||
{
|
{
|
||||||
if (weight.empty())
|
if (weight.empty())
|
||||||
return wxNORMAL;
|
return wxFONTWEIGHT_NORMAL;
|
||||||
if (wxStrcmp(weight, wxT("Bold")) == 0)
|
if (wxStrcmp(weight, wxT("Bold")) == 0)
|
||||||
return wxBOLD;
|
return wxFONTWEIGHT_BOLD;
|
||||||
else if (wxStrcmp(weight, wxT("Light")) == 0)
|
else if (wxStrcmp(weight, wxT("Light")) == 0)
|
||||||
return wxLIGHT;
|
return wxFONTWEIGHT_LIGHT;
|
||||||
else
|
else
|
||||||
return wxNORMAL;
|
return wxFONTWEIGHT_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -543,9 +543,9 @@ void wxGenericFontDialog::CreateWidgets()
|
|||||||
|
|
||||||
void wxGenericFontDialog::InitializeFont()
|
void wxGenericFontDialog::InitializeFont()
|
||||||
{
|
{
|
||||||
int fontFamily = wxSWISS;
|
wxFontFamily fontFamily = wxFONTFAMILY_SWISS;
|
||||||
int fontWeight = wxNORMAL;
|
wxFontWeight fontWeight = wxFONTWEIGHT_NORMAL;
|
||||||
int fontStyle = wxNORMAL;
|
wxFontStyle fontStyle = wxFONTSTYLE_NORMAL;
|
||||||
int fontSize = 12;
|
int fontSize = 12;
|
||||||
bool fontUnderline = false;
|
bool fontUnderline = false;
|
||||||
|
|
||||||
@@ -574,9 +574,9 @@ void wxGenericFontDialog::DoChangeFont()
|
|||||||
{
|
{
|
||||||
if (!m_useEvents) return;
|
if (!m_useEvents) return;
|
||||||
|
|
||||||
int fontFamily = wxFontFamilyStringToInt(m_familyChoice->GetStringSelection());
|
wxFontFamily fontFamily = wxFontFamilyStringToInt(m_familyChoice->GetStringSelection());
|
||||||
int fontWeight = wxFontWeightStringToInt(m_weightChoice->GetStringSelection());
|
wxFontWeight fontWeight = wxFontWeightStringToInt(m_weightChoice->GetStringSelection());
|
||||||
int fontStyle = wxFontStyleStringToInt(m_styleChoice->GetStringSelection());
|
wxFontStyle fontStyle = wxFontStyleStringToInt(m_styleChoice->GetStringSelection());
|
||||||
#if USE_SPINCTRL_FOR_POINT_SIZE
|
#if USE_SPINCTRL_FOR_POINT_SIZE
|
||||||
wxSpinCtrl* fontSizeCtrl = wxDynamicCast(FindWindow(wxID_FONT_SIZE), wxSpinCtrl);
|
wxSpinCtrl* fontSizeCtrl = wxDynamicCast(FindWindow(wxID_FONT_SIZE), wxSpinCtrl);
|
||||||
int fontSize = fontSizeCtrl->GetValue();
|
int fontSize = fontSizeCtrl->GetValue();
|
||||||
|
@@ -7254,9 +7254,9 @@ void wxGrid::SetColLabelAlignment( int horiz, int vert )
|
|||||||
// Note: under MSW, the default column label font must be changed because it
|
// Note: under MSW, the default column label font must be changed because it
|
||||||
// does not support vertical printing
|
// does not support vertical printing
|
||||||
//
|
//
|
||||||
// Example: wxFont font(9, wxSWISS, wxNORMAL, wxBOLD);
|
// Example:
|
||||||
// pGrid->SetLabelFont(font);
|
// pGrid->SetLabelFont(wxFontInfo(9).Family(wxFONTFAMILY_SWISS));
|
||||||
// pGrid->SetColLabelTextOrientation(wxVERTICAL);
|
// pGrid->SetColLabelTextOrientation(wxVERTICAL);
|
||||||
//
|
//
|
||||||
void wxGrid::SetColLabelTextOrientation( int textOrientation )
|
void wxGrid::SetColLabelTextOrientation( int textOrientation )
|
||||||
{
|
{
|
||||||
|
@@ -279,8 +279,8 @@ int wxFontDialog::ShowModal()
|
|||||||
// wxFontDialog stub for mac OS's without a native font dialog
|
// wxFontDialog stub for mac OS's without a native font dialog
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
static const wxChar *FontFamilyIntToString(int family);
|
static const wxChar *FontFamilyIntToString(wxFontFamily family);
|
||||||
static int FontFamilyStringToInt(const wxChar *family);
|
static wxFontFamily FontFamilyStringToInt(const wxChar *family);
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -689,9 +689,9 @@ bool wxFontDialog::ShowToolTips()
|
|||||||
|
|
||||||
void wxFontDialog::InitializeFont()
|
void wxFontDialog::InitializeFont()
|
||||||
{
|
{
|
||||||
int fontFamily = wxSWISS;
|
wxFontFamily fontFamily = wxFONTFAMILY_SWISS;
|
||||||
int fontWeight = wxNORMAL;
|
wxFontWeight fontWeight = wxFONTWEIGHT_NORMAL;
|
||||||
int fontStyle = wxNORMAL;
|
wxFontStyle fontStyle = wxFONTSTYLE_NORMAL;
|
||||||
int fontSize = 12;
|
int fontSize = 12;
|
||||||
bool fontUnderline = false;
|
bool fontUnderline = false;
|
||||||
wxString fontName;
|
wxString fontName;
|
||||||
@@ -723,8 +723,8 @@ void wxFontDialog::InitializeControls()
|
|||||||
if (m_underlinedCtrl)
|
if (m_underlinedCtrl)
|
||||||
m_underlinedCtrl->SetValue(m_dialogFont.GetUnderlined());
|
m_underlinedCtrl->SetValue(m_dialogFont.GetUnderlined());
|
||||||
|
|
||||||
m_boldCtrl->SetValue(m_dialogFont.GetWeight() == wxBOLD);
|
m_boldCtrl->SetValue(m_dialogFont.GetWeight() == wxFONTWEIGHT_BOLD);
|
||||||
m_italicCtrl->SetValue(m_dialogFont.GetStyle() == wxITALIC);
|
m_italicCtrl->SetValue(m_dialogFont.GetStyle() == wxFONTSTYLE_ITALIC);
|
||||||
m_sizeCtrl->SetValue(m_dialogFont.GetPointSize());
|
m_sizeCtrl->SetValue(m_dialogFont.GetPointSize());
|
||||||
|
|
||||||
wxString facename = m_dialogFont.GetFaceName();
|
wxString facename = m_dialogFont.GetFaceName();
|
||||||
@@ -755,14 +755,13 @@ void wxFontDialog::ChangeFont()
|
|||||||
int size = m_sizeCtrl->GetValue();
|
int size = m_sizeCtrl->GetValue();
|
||||||
wxString facename = m_facenameCtrl->GetStringSelection();
|
wxString facename = m_facenameCtrl->GetStringSelection();
|
||||||
|
|
||||||
int family = FontFamilyStringToInt(facename);
|
wxFontFamily family = FontFamilyStringToInt(facename);
|
||||||
if (family == -1)
|
if (family != wxFONTFAMILY_DEFAULT)
|
||||||
family = wxDEFAULT;
|
|
||||||
else
|
|
||||||
facename = wxEmptyString;
|
facename = wxEmptyString;
|
||||||
|
|
||||||
m_dialogFont = wxFont(size, family, italic ? wxITALIC : wxNORMAL, bold ? wxBOLD : wxNORMAL,
|
m_dialogFont = wxFontInfo(size)
|
||||||
underlined, facename);
|
.Family(family).FaceName(facename)
|
||||||
|
.Italic(italic).Bold(bold).Underlined(underlined);
|
||||||
|
|
||||||
m_fontData.SetChosenFont(m_dialogFont);
|
m_fontData.SetChosenFont(m_dialogFont);
|
||||||
|
|
||||||
@@ -789,44 +788,44 @@ void wxFontDialog::OnPanelClose()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const wxChar *FontFamilyIntToString(int family)
|
const wxChar *FontFamilyIntToString(wxFontFamily family)
|
||||||
{
|
{
|
||||||
switch (family)
|
switch (family)
|
||||||
{
|
{
|
||||||
case wxROMAN:
|
case wxFONTFAMILY_ROMAN:
|
||||||
return _("<Any Roman>");
|
return _("<Any Roman>");
|
||||||
case wxDECORATIVE:
|
case wxFONTFAMILY_DECORATIVE:
|
||||||
return _("<Any Decorative>");
|
return _("<Any Decorative>");
|
||||||
case wxMODERN:
|
case wxFONTFAMILY_MODERN:
|
||||||
return _("<Any Modern>");
|
return _("<Any Modern>");
|
||||||
case wxSCRIPT:
|
case wxFONTFAMILY_SCRIPT:
|
||||||
return _("<Any Script>");
|
return _("<Any Script>");
|
||||||
case wxTELETYPE:
|
case wxFONTFAMILY_TELETYPE:
|
||||||
return _("<Any Teletype>");
|
return _("<Any Teletype>");
|
||||||
case wxSWISS:
|
case wxFONTFAMILY_SWISS:
|
||||||
default:
|
default:
|
||||||
return _("<Any Swiss>");
|
return _("<Any Swiss>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int FontFamilyStringToInt(const wxChar *family)
|
wxFontFamily FontFamilyStringToInt(const wxChar *family)
|
||||||
{
|
{
|
||||||
if (!family)
|
if (!family)
|
||||||
return wxSWISS;
|
return wxFONTFAMILY_SWISS;
|
||||||
|
|
||||||
if (wxStrcmp(family, _("<Any Roman>")) == 0)
|
if (wxStrcmp(family, _("<Any Roman>")) == 0)
|
||||||
return wxROMAN;
|
return wxFONTFAMILY_ROMAN;
|
||||||
else if (wxStrcmp(family, _("<Any Decorative>")) == 0)
|
else if (wxStrcmp(family, _("<Any Decorative>")) == 0)
|
||||||
return wxDECORATIVE;
|
return wxFONTFAMILY_DECORATIVE;
|
||||||
else if (wxStrcmp(family, _("<Any Modern>")) == 0)
|
else if (wxStrcmp(family, _("<Any Modern>")) == 0)
|
||||||
return wxMODERN;
|
return wxFONTFAMILY_MODERN;
|
||||||
else if (wxStrcmp(family, _("<Any Script>")) == 0)
|
else if (wxStrcmp(family, _("<Any Script>")) == 0)
|
||||||
return wxSCRIPT;
|
return wxFONTFAMILY_SCRIPT;
|
||||||
else if (wxStrcmp(family, _("<Any Teletype>")) == 0)
|
else if (wxStrcmp(family, _("<Any Teletype>")) == 0)
|
||||||
return wxTELETYPE;
|
return wxFONTFAMILY_TELETYPE;
|
||||||
else if (wxStrcmp(family, _("<Any Swiss>")) == 0)
|
else if (wxStrcmp(family, _("<Any Swiss>")) == 0)
|
||||||
return wxSWISS;
|
return wxFONTFAMILY_SWISS;
|
||||||
else return -1;
|
else return wxFONTFAMILY_DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
|
#endif // !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
|
||||||
|
@@ -402,8 +402,8 @@ bool wxFontDialog::Create(wxWindow *parent)
|
|||||||
[[NSFontManager sharedFontManager] fontWithFamily:
|
[[NSFontManager sharedFontManager] fontWithFamily:
|
||||||
wxNSStringWithWxString(thewxfont.GetFaceName())
|
wxNSStringWithWxString(thewxfont.GetFaceName())
|
||||||
traits:theMask
|
traits:theMask
|
||||||
weight:thewxfont.GetWeight() == wxBOLD ? 9 :
|
weight:thewxfont.GetWeight() == wxFONTWEIGHT_BOLD ? 9 :
|
||||||
thewxfont.GetWeight() == wxLIGHT ? 0 : 5
|
thewxfont.GetWeight() == wxFONTWEIGHT_LIGHT ? 0 : 5
|
||||||
size: (float)(thewxfont.GetPointSize())
|
size: (float)(thewxfont.GetPointSize())
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -530,8 +530,8 @@ int wxFontDialog::ShowModal()
|
|||||||
m_fontData.m_chosenFont.SetFaceName(wxStringWithNSString([theFont familyName]));
|
m_fontData.m_chosenFont.SetFaceName(wxStringWithNSString([theFont familyName]));
|
||||||
m_fontData.m_chosenFont.SetPointSize(theFontSize);
|
m_fontData.m_chosenFont.SetPointSize(theFontSize);
|
||||||
m_fontData.m_chosenFont.SetStyle(theTraits & NSItalicFontMask ? wxFONTSTYLE_ITALIC : 0);
|
m_fontData.m_chosenFont.SetStyle(theTraits & NSItalicFontMask ? wxFONTSTYLE_ITALIC : 0);
|
||||||
m_fontData.m_chosenFont.SetWeight(theFontWeight < 5 ? wxLIGHT :
|
m_fontData.m_chosenFont.SetWeight(theFontWeight < 5 ? wxFONTWEIGHT_LIGHT :
|
||||||
theFontWeight >= 9 ? wxBOLD : wxNORMAL);
|
theFontWeight >= 9 ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL);
|
||||||
|
|
||||||
//Get the shared color panel along with the chosen color and set the chosen color
|
//Get the shared color panel along with the chosen color and set the chosen color
|
||||||
NSColor* theColor = [[theColorPanel color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
|
NSColor* theColor = [[theColorPanel color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
|
||||||
|
@@ -583,9 +583,9 @@ static const wxChar* const gs_fp_es_style_labels[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const long gs_fp_es_style_values[] = {
|
static const long gs_fp_es_style_values[] = {
|
||||||
wxNORMAL,
|
wxFONTSTYLE_NORMAL,
|
||||||
wxSLANT,
|
wxFONTSTYLE_SLANT,
|
||||||
wxITALIC
|
wxFONTSTYLE_ITALIC
|
||||||
};
|
};
|
||||||
|
|
||||||
static const wxChar* const gs_fp_es_weight_labels[] = {
|
static const wxChar* const gs_fp_es_weight_labels[] = {
|
||||||
@@ -596,9 +596,9 @@ static const wxChar* const gs_fp_es_weight_labels[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const long gs_fp_es_weight_values[] = {
|
static const long gs_fp_es_weight_values[] = {
|
||||||
wxNORMAL,
|
wxFONTWEIGHT_NORMAL,
|
||||||
wxLIGHT,
|
wxFONTWEIGHT_LIGHT,
|
||||||
wxBOLD
|
wxFONTWEIGHT_BOLD
|
||||||
};
|
};
|
||||||
|
|
||||||
// Class body is in advprops.h
|
// Class body is in advprops.h
|
||||||
@@ -806,9 +806,7 @@ void wxFontProperty::OnCustomPaint(wxDC& dc,
|
|||||||
dc.DrawRectangle( rect );
|
dc.DrawRectangle( rect );
|
||||||
|
|
||||||
wxFont oldFont = dc.GetFont();
|
wxFont oldFont = dc.GetFont();
|
||||||
wxFont drawFont(oldFont.GetPointSize(),
|
dc.SetFont(wxFontInfo(oldFont.GetPointSize().Bold().FaceName(drawFace));
|
||||||
wxDEFAULT,wxNORMAL,wxBOLD,false,drawFace);
|
|
||||||
dc.SetFont(drawFont);
|
|
||||||
|
|
||||||
dc.SetTextForeground( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT) );
|
dc.SetTextForeground( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT) );
|
||||||
dc.DrawText( wxT("Aa"), rect.x+2, rect.y+1 );
|
dc.DrawText( wxT("Aa"), rect.x+2, rect.y+1 );
|
||||||
|
@@ -355,8 +355,8 @@ void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) {
|
|||||||
#endif
|
#endif
|
||||||
int size = font.GetPointSize();
|
int size = font.GetPointSize();
|
||||||
wxString faceName = font.GetFaceName();
|
wxString faceName = font.GetFaceName();
|
||||||
bool bold = font.GetWeight() == wxBOLD;
|
bool bold = font.GetWeight() == wxFONTWEIGHT_BOLD;
|
||||||
bool italic = font.GetStyle() != wxNORMAL;
|
bool italic = font.GetStyle() != wxFONTSTYLE_NORMAL;
|
||||||
bool under = font.GetUnderlined();
|
bool under = font.GetUnderlined();
|
||||||
wxFontEncoding encoding = font.GetEncoding();
|
wxFontEncoding encoding = font.GetEncoding();
|
||||||
|
|
||||||
|
@@ -517,9 +517,9 @@ static wxHashTable *g_fontHash = NULL;
|
|||||||
static bool wxTestFontSpec(const wxString& fontspec);
|
static bool wxTestFontSpec(const wxString& fontspec);
|
||||||
|
|
||||||
static wxNativeFont wxLoadQueryFont(int pointSize,
|
static wxNativeFont wxLoadQueryFont(int pointSize,
|
||||||
int family,
|
wxFontFamily family,
|
||||||
int style,
|
wxFontStyle style,
|
||||||
int weight,
|
wxFontWeight weight,
|
||||||
bool underlined,
|
bool underlined,
|
||||||
const wxString& facename,
|
const wxString& facename,
|
||||||
const wxString& xregistry,
|
const wxString& xregistry,
|
||||||
@@ -1000,9 +1000,9 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxNativeFont wxLoadQueryNearestFont(int pointSize,
|
wxNativeFont wxLoadQueryNearestFont(int pointSize,
|
||||||
int family,
|
wxFontFamily family,
|
||||||
int style,
|
wxFontStyle style,
|
||||||
int weight,
|
wxFontWeight weight,
|
||||||
bool underlined,
|
bool underlined,
|
||||||
const wxString &facename,
|
const wxString &facename,
|
||||||
wxFontEncoding encoding,
|
wxFontEncoding encoding,
|
||||||
@@ -1087,9 +1087,9 @@ wxNativeFont wxLoadQueryNearestFont(int pointSize,
|
|||||||
// second round: use normal weight
|
// second round: use normal weight
|
||||||
if ( round == 1 )
|
if ( round == 1 )
|
||||||
{
|
{
|
||||||
if ( testweight != wxNORMAL )
|
if ( testweight != wxFONTWEIGHT_NORMAL )
|
||||||
{
|
{
|
||||||
testweight = wxNORMAL;
|
testweight = wxFONTWEIGHT_NORMAL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1100,9 +1100,9 @@ wxNativeFont wxLoadQueryNearestFont(int pointSize,
|
|||||||
// third round: ... and use normal style
|
// third round: ... and use normal style
|
||||||
if ( round == 2 )
|
if ( round == 2 )
|
||||||
{
|
{
|
||||||
if ( teststyle != wxNORMAL )
|
if ( teststyle != wxFONTSTYLE_NORMAL )
|
||||||
{
|
{
|
||||||
teststyle = wxNORMAL;
|
teststyle = wxFONTSTYLE_NORMAL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1127,9 +1127,9 @@ wxNativeFont wxLoadQueryNearestFont(int pointSize,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Try default family
|
// Try default family
|
||||||
if ( !font && family != wxDEFAULT )
|
if ( !font && family != wxFONTFAMILY_DEFAULT )
|
||||||
{
|
{
|
||||||
font = wxLoadQueryFont(pointSize, wxDEFAULT, style, weight,
|
font = wxLoadQueryFont(pointSize, wxFONTFAMILY_DEFAULT, style, weight,
|
||||||
underlined, facename,
|
underlined, facename,
|
||||||
info.xregistry, info.xencoding,
|
info.xregistry, info.xencoding,
|
||||||
xFontName );
|
xFontName );
|
||||||
@@ -1139,7 +1139,8 @@ wxNativeFont wxLoadQueryNearestFont(int pointSize,
|
|||||||
// given facename and encoding
|
// given facename and encoding
|
||||||
if ( !font )
|
if ( !font )
|
||||||
{
|
{
|
||||||
font = wxLoadQueryFont(120, wxDEFAULT, wxNORMAL, wxNORMAL,
|
font = wxLoadQueryFont(120, wxFONTFAMILY_DEFAULT,
|
||||||
|
wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
|
||||||
underlined, facename,
|
underlined, facename,
|
||||||
info.xregistry, info.xencoding,
|
info.xregistry, info.xencoding,
|
||||||
xFontName);
|
xFontName);
|
||||||
@@ -1147,7 +1148,8 @@ wxNativeFont wxLoadQueryNearestFont(int pointSize,
|
|||||||
// ignore family as well
|
// ignore family as well
|
||||||
if ( !font )
|
if ( !font )
|
||||||
{
|
{
|
||||||
font = wxLoadQueryFont(120, wxDEFAULT, wxNORMAL, wxNORMAL,
|
font = wxLoadQueryFont(120, wxFONTFAMILY_DEFAULT,
|
||||||
|
wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
|
||||||
underlined, wxEmptyString,
|
underlined, wxEmptyString,
|
||||||
info.xregistry, info.xencoding,
|
info.xregistry, info.xencoding,
|
||||||
xFontName);
|
xFontName);
|
||||||
@@ -1158,7 +1160,8 @@ wxNativeFont wxLoadQueryNearestFont(int pointSize,
|
|||||||
// different from 120
|
// different from 120
|
||||||
if ( !font )
|
if ( !font )
|
||||||
{
|
{
|
||||||
font = wxLoadQueryFont(-1, wxDEFAULT, wxNORMAL, wxNORMAL,
|
font = wxLoadQueryFont(-1, wxFONTFAMILY_DEFAULT,
|
||||||
|
wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
|
||||||
false, wxEmptyString,
|
false, wxEmptyString,
|
||||||
info.xregistry, info.xencoding,
|
info.xregistry, info.xencoding,
|
||||||
xFontName);
|
xFontName);
|
||||||
@@ -1170,8 +1173,8 @@ wxNativeFont wxLoadQueryNearestFont(int pointSize,
|
|||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("this encoding should be available!") );
|
wxFAIL_MSG( wxT("this encoding should be available!") );
|
||||||
|
|
||||||
font = wxLoadQueryFont(-1,
|
font = wxLoadQueryFont(-1, wxFONTFAMILY_DEFAULT,
|
||||||
wxDEFAULT, wxNORMAL, wxNORMAL,
|
wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
|
||||||
false, wxEmptyString,
|
false, wxEmptyString,
|
||||||
wxT("*"), wxT("*"),
|
wxT("*"), wxT("*"),
|
||||||
xFontName);
|
xFontName);
|
||||||
@@ -1220,41 +1223,40 @@ static bool wxTestFontSpec(const wxString& fontspec)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static wxNativeFont wxLoadQueryFont(int pointSize,
|
static wxNativeFont wxLoadQueryFont(int pointSize,
|
||||||
int family,
|
wxFontFamily family,
|
||||||
int style,
|
wxFontStyle style,
|
||||||
int weight,
|
wxFontWeight weight,
|
||||||
bool WXUNUSED(underlined),
|
bool WXUNUSED(underlined),
|
||||||
const wxString& facename,
|
const wxString& facename,
|
||||||
const wxString& xregistry,
|
const wxString& xregistry,
|
||||||
const wxString& xencoding,
|
const wxString& xencoding,
|
||||||
wxString* xFontName)
|
wxString* xFontName)
|
||||||
{
|
{
|
||||||
wxString xfamily;
|
wxString xfamily("*");
|
||||||
switch (family)
|
switch (family)
|
||||||
{
|
{
|
||||||
case wxDECORATIVE: xfamily = wxT("lucida"); break;
|
case wxFONTFAMILY_DECORATIVE: xfamily = wxT("lucida"); break;
|
||||||
case wxROMAN: xfamily = wxT("times"); break;
|
case wxFONTFAMILY_ROMAN: xfamily = wxT("times"); break;
|
||||||
case wxMODERN: xfamily = wxT("courier"); break;
|
case wxFONTFAMILY_MODERN: xfamily = wxT("courier"); break;
|
||||||
case wxSWISS: xfamily = wxT("helvetica"); break;
|
case wxFONTFAMILY_SWISS: xfamily = wxT("helvetica"); break;
|
||||||
case wxTELETYPE: xfamily = wxT("lucidatypewriter"); break;
|
case wxFONTFAMILY_TELETYPE: xfamily = wxT("lucidatypewriter"); break;
|
||||||
case wxSCRIPT: xfamily = wxT("utopia"); break;
|
case wxFONTFAMILY_SCRIPT: xfamily = wxT("utopia"); break;
|
||||||
default: xfamily = wxT("*");
|
|
||||||
}
|
}
|
||||||
#if wxUSE_NANOX
|
#if wxUSE_NANOX
|
||||||
int xweight;
|
int xweight;
|
||||||
switch (weight)
|
switch (weight)
|
||||||
{
|
{
|
||||||
case wxBOLD:
|
case wxFONTWEIGHT_BOLD:
|
||||||
{
|
{
|
||||||
xweight = MWLF_WEIGHT_BOLD;
|
xweight = MWLF_WEIGHT_BOLD;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxLIGHT:
|
case wxFONTWEIGHT_LIGHT:
|
||||||
{
|
{
|
||||||
xweight = MWLF_WEIGHT_LIGHT;
|
xweight = MWLF_WEIGHT_LIGHT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxNORMAL:
|
case wxFONTWEIGHT_NORMAL:
|
||||||
{
|
{
|
||||||
xweight = MWLF_WEIGHT_NORMAL;
|
xweight = MWLF_WEIGHT_NORMAL;
|
||||||
break;
|
break;
|
||||||
@@ -1289,7 +1291,7 @@ static wxNativeFont wxLoadQueryFont(int pointSize,
|
|||||||
logFont.lfEscapement = 0;
|
logFont.lfEscapement = 0;
|
||||||
logFont.lfOrientation = 0;
|
logFont.lfOrientation = 0;
|
||||||
logFont.lfWeight = xweight;
|
logFont.lfWeight = xweight;
|
||||||
logFont.lfItalic = (style == wxNORMAL ? 0 : 1) ;
|
logFont.lfItalic = (style == wxFONTSTYLE_ITALIC ? 0 : 1) ;
|
||||||
logFont.lfUnderline = 0;
|
logFont.lfUnderline = 0;
|
||||||
logFont.lfStrikeOut = 0;
|
logFont.lfStrikeOut = 0;
|
||||||
logFont.lfCharSet = MWLF_CHARSET_DEFAULT; // TODO: select appropriate one
|
logFont.lfCharSet = MWLF_CHARSET_DEFAULT; // TODO: select appropriate one
|
||||||
@@ -1327,7 +1329,7 @@ static wxNativeFont wxLoadQueryFont(int pointSize,
|
|||||||
wxString xstyle;
|
wxString xstyle;
|
||||||
switch (style)
|
switch (style)
|
||||||
{
|
{
|
||||||
case wxSLANT:
|
case wxFONTSTYLE_SLANT:
|
||||||
fontSpec.Printf(wxT("-*-%s-*-o-*-*-*-*-*-*-*-*-*-*"),
|
fontSpec.Printf(wxT("-*-%s-*-o-*-*-*-*-*-*-*-*-*-*"),
|
||||||
xfamily.c_str());
|
xfamily.c_str());
|
||||||
if ( wxTestFontSpec(fontSpec) )
|
if ( wxTestFontSpec(fontSpec) )
|
||||||
@@ -1335,18 +1337,18 @@ static wxNativeFont wxLoadQueryFont(int pointSize,
|
|||||||
xstyle = wxT("o");
|
xstyle = wxT("o");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// fall through - try wxITALIC now
|
// fall through - try wxFONTSTYLE_ITALIC now
|
||||||
|
|
||||||
case wxITALIC:
|
case wxFONTSTYLE_ITALIC:
|
||||||
fontSpec.Printf(wxT("-*-%s-*-i-*-*-*-*-*-*-*-*-*-*"),
|
fontSpec.Printf(wxT("-*-%s-*-i-*-*-*-*-*-*-*-*-*-*"),
|
||||||
xfamily.c_str());
|
xfamily.c_str());
|
||||||
if ( wxTestFontSpec(fontSpec) )
|
if ( wxTestFontSpec(fontSpec) )
|
||||||
{
|
{
|
||||||
xstyle = wxT("i");
|
xstyle = wxT("i");
|
||||||
}
|
}
|
||||||
else if ( style == wxITALIC ) // and not wxSLANT
|
else if ( style == wxFONTSTYLE_ITALIC ) // and not wxFONTSTYLE_SLANT
|
||||||
{
|
{
|
||||||
// try wxSLANT
|
// try wxFONTSTYLE_SLANT
|
||||||
fontSpec.Printf(wxT("-*-%s-*-o-*-*-*-*-*-*-*-*-*-*"),
|
fontSpec.Printf(wxT("-*-%s-*-o-*-*-*-*-*-*-*-*-*-*"),
|
||||||
xfamily.c_str());
|
xfamily.c_str());
|
||||||
if ( wxTestFontSpec(fontSpec) )
|
if ( wxTestFontSpec(fontSpec) )
|
||||||
@@ -1365,7 +1367,7 @@ static wxNativeFont wxLoadQueryFont(int pointSize,
|
|||||||
wxFAIL_MSG(wxT("unknown font style"));
|
wxFAIL_MSG(wxT("unknown font style"));
|
||||||
// fall back to normal
|
// fall back to normal
|
||||||
|
|
||||||
case wxNORMAL:
|
case wxFONTSTYLE_NORMAL:
|
||||||
xstyle = wxT("r");
|
xstyle = wxT("r");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1373,7 +1375,7 @@ static wxNativeFont wxLoadQueryFont(int pointSize,
|
|||||||
wxString xweight;
|
wxString xweight;
|
||||||
switch (weight)
|
switch (weight)
|
||||||
{
|
{
|
||||||
case wxBOLD:
|
case wxFONTWEIGHT_BOLD:
|
||||||
{
|
{
|
||||||
fontSpec.Printf(wxT("-*-%s-bold-*-*-*-*-*-*-*-*-*-*-*"),
|
fontSpec.Printf(wxT("-*-%s-bold-*-*-*-*-*-*-*-*-*-*-*"),
|
||||||
xfamily.c_str());
|
xfamily.c_str());
|
||||||
@@ -1419,7 +1421,7 @@ static wxNativeFont wxLoadQueryFont(int pointSize,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case wxLIGHT:
|
case wxFONTWEIGHT_LIGHT:
|
||||||
{
|
{
|
||||||
fontSpec.Printf(wxT("-*-%s-light-*-*-*-*-*-*-*-*-*-*-*"),
|
fontSpec.Printf(wxT("-*-%s-light-*-*-*-*-*-*-*-*-*-*-*"),
|
||||||
xfamily.c_str());
|
xfamily.c_str());
|
||||||
@@ -1437,7 +1439,7 @@ static wxNativeFont wxLoadQueryFont(int pointSize,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case wxNORMAL:
|
case wxFONTWEIGHT_NORMAL:
|
||||||
{
|
{
|
||||||
fontSpec.Printf(wxT("-*-%s-medium-*-*-*-*-*-*-*-*-*-*-*"),
|
fontSpec.Printf(wxT("-*-%s-medium-*-*-*-*-*-*-*-*-*-*-*"),
|
||||||
xfamily.c_str());
|
xfamily.c_str());
|
||||||
|
Reference in New Issue
Block a user