1. wxFontMapper almost finished
2. font helper functions are now in separate files, not utilsunx.cpp git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -813,12 +813,16 @@ void wxWindowDC::DoGetTextExtent(const wxString &string,
|
||||
wxCoord wxWindowDC::GetCharWidth() const
|
||||
{
|
||||
GdkFont *font = m_font.GetInternalFont( m_scaleY );
|
||||
wxCHECK_MSG( font, -1, _T("invalid font") );
|
||||
|
||||
return wxCoord(gdk_string_width( font, "H" ) / m_scaleX);
|
||||
}
|
||||
|
||||
wxCoord wxWindowDC::GetCharHeight() const
|
||||
{
|
||||
GdkFont *font = m_font.GetInternalFont( m_scaleY );
|
||||
wxCHECK_MSG( font, -1, _T("invalid font") );
|
||||
|
||||
return wxCoord((font->ascent + font->descent) / m_scaleY);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user