X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ccd67a6af88981a8c1a2b752a14051fe7698814b..3d7a1b394baa3255d084c877b5caae4b29720a12:/src/mac/carbon/font.cpp diff --git a/src/mac/carbon/font.cpp b/src/mac/carbon/font.cpp index 75ea3f918a..7766ff4e53 100644 --- a/src/mac/carbon/font.cpp +++ b/src/mac/carbon/font.cpp @@ -154,6 +154,8 @@ public: wxNativeFontInfo m_info; }; +#define M_FONTDATA ((wxFontRefData*)m_refData) + // ============================================================================ // implementation @@ -533,10 +535,10 @@ wxSize wxFont::GetPixelSize() const #if wxUSE_GRAPHICS_CONTEXT // TODO: consider caching the value wxGraphicsContext* dc = wxGraphicsContext::CreateFromNative((CGContextRef) NULL); - dc->SetFont(*(wxFont *)this); + dc->SetFont(*(wxFont *)this,*wxBLACK); wxDouble width, height = 0; - dc->GetTextExtent( wxT("g"), &width, &height, NULL, NULL); - return wxSize(width, height); + dc->GetTextExtent( wxT("g"), &width, &height, NULL, NULL); + return wxSize((int)width, (int)height); #else wxFontBase::GetPixelSize(); #endif