CoreText support for iOS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -138,6 +138,8 @@ public:
|
|||||||
|
|
||||||
wxFontEncoding GetEncoding() const { return m_info.GetEncoding(); }
|
wxFontEncoding GetEncoding() const { return m_info.GetEncoding(); }
|
||||||
|
|
||||||
|
bool IsFixedWidth() const;
|
||||||
|
|
||||||
void Free();
|
void Free();
|
||||||
|
|
||||||
void MacFindFont();
|
void MacFindFont();
|
||||||
@@ -272,7 +274,6 @@ wxFontRefData::wxFontRefData(wxOSXSystemFont font, int size)
|
|||||||
Init();
|
Init();
|
||||||
|
|
||||||
#if wxOSX_USE_CORE_TEXT
|
#if wxOSX_USE_CORE_TEXT
|
||||||
if ( UMAGetSystemVersion() >= 0x1050 )
|
|
||||||
{
|
{
|
||||||
CTFontUIFontType uifont = kCTFontSystemFontType;
|
CTFontUIFontType uifont = kCTFontSystemFontType;
|
||||||
switch( font )
|
switch( font )
|
||||||
@@ -465,7 +466,6 @@ void wxFontRefData::MacFindFont()
|
|||||||
m_info.EnsureValid();
|
m_info.EnsureValid();
|
||||||
|
|
||||||
#if wxOSX_USE_CORE_TEXT
|
#if wxOSX_USE_CORE_TEXT
|
||||||
if ( UMAGetSystemVersion() >= 0x1050 )
|
|
||||||
{
|
{
|
||||||
CTFontSymbolicTraits traits = 0;
|
CTFontSymbolicTraits traits = 0;
|
||||||
|
|
||||||
@@ -542,6 +542,16 @@ void wxFontRefData::MacFindFont()
|
|||||||
m_fontValid = true;
|
m_fontValid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxFontRefData::IsFixedWidth() const
|
||||||
|
{
|
||||||
|
#if wxOSX_USE_CORE_TEXT
|
||||||
|
CTFontSymbolicTraits traits = CTFontGetSymbolicTraits(m_ctFont);
|
||||||
|
return (traits & kCTFontMonoSpaceTrait) != 0;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxFont
|
// wxFont
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -730,6 +740,13 @@ wxSize wxFont::GetPixelSize() const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxFont::IsFixedWidth() const
|
||||||
|
{
|
||||||
|
wxCHECK_MSG( M_FONTDATA != NULL , wxFONTWEIGHT_MAX, wxT("invalid font") );
|
||||||
|
|
||||||
|
return M_FONTDATA->IsFixedWidth();
|
||||||
|
}
|
||||||
|
|
||||||
wxFontFamily wxFont::DoGetFamily() const
|
wxFontFamily wxFont::DoGetFamily() const
|
||||||
{
|
{
|
||||||
return M_FONTDATA->GetFamily();
|
return M_FONTDATA->GetFamily();
|
||||||
|
Reference in New Issue
Block a user