Exemple #1
0
void wxNativeFontInfo::SetStyle(wxFontStyle style)
{
    wxString s;
    switch ( style )
    {
        case wxFONTSTYLE_ITALIC:
            s = wxT('i');
            break;

        case wxFONTSTYLE_SLANT:
            s = wxT('o');
            break;

        case wxFONTSTYLE_NORMAL:
            s = wxT('r');

        default:
            wxFAIL_MSG( wxT("unknown wxFontStyle in wxNativeFontInfo::SetStyle") );
            return;
    }

    SetXFontComponent(wxXLFD_SLANT, s);
}
Exemple #2
0
void wxNativeFontInfo::SetWeight(wxFontWeight weight)
{
    wxString s;
    switch ( weight )
    {
        case wxFONTWEIGHT_BOLD:
            s = wxT("bold");
            break;

        case wxFONTWEIGHT_LIGHT:
            s = wxT("light");
            break;

        case wxFONTWEIGHT_NORMAL:
            s = wxT("medium");
            break;

        default:
            wxFAIL_MSG( wxT("unknown wxFontWeight in wxNativeFontInfo::SetWeight") );
            return;
    }

    SetXFontComponent(wxXLFD_WEIGHT, s);
}
Exemple #3
0
bool wxNativeFontInfo::SetFaceName(const wxString& facename)
{
    SetXFontComponent(wxXLFD_FAMILY, facename);
    return true;
}
Exemple #4
0
void wxNativeFontInfo::SetPointSize(int pointsize)
{
    SetXFontComponent(wxXLFD_POINTSIZE, wxString::Format(wxT("%d"), pointsize));
}