Пример #1
0
void SimpleFontData::platformInit()
{    
    wxFont *font = m_font.font();
    if (font && font->IsOk()) {
        wxFontProperties props = wxFontProperties(font);
        m_ascent = props.GetAscent();
        m_descent = props.GetDescent();
        m_lineSpacing = props.GetLineSpacing();
        m_xHeight = props.GetXHeight();
        m_unitsPerEm = 1; // FIXME!
        m_lineGap = props.GetLineGap();
    }
}
Пример #2
0
void SimpleFontData::platformInit()
{    
    wxFont *font = m_platformData.font();
    if (font && font->IsOk()) {
        wxFontProperties props = wxFontProperties(font);
        m_ascent = props.GetAscent();
        m_descent = props.GetDescent();
        m_lineSpacing = props.GetLineSpacing();
        m_xHeight = props.GetXHeight();
        m_unitsPerEm = 1; // FIXME!
        m_lineGap = props.GetLineGap();
    }

#if OS(WINDOWS)
    m_scriptCache = 0;
    m_scriptFontProperties = 0;
    m_isSystemFont = false;
    m_syntheticBoldOffset = 0.0f;
#endif
}
Пример #3
0
void SimpleFontData::platformInit()
{    
    wxFont *font = m_platformData.font();
    if (font && font->IsOk()) {
        wxFontProperties props = wxFontProperties(font);
        m_fontMetrics.setAscent(props.GetAscent());
        m_fontMetrics.setDescent(props.GetDescent());
        m_fontMetrics.setXHeight(props.GetXHeight());
        m_fontMetrics.setUnitsPerEm(1); // FIXME!
        m_fontMetrics.setLineGap(props.GetLineGap());
        m_fontMetrics.setLineSpacing(props.GetLineSpacing());
    }

    m_syntheticBoldOffset = 0.0f;

#if OS(WINDOWS)
    m_scriptCache = 0;
    m_scriptFontProperties = 0;
    m_isSystemFont = false;
#endif
}