diff options
-rw-r--r-- | vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx | 26 | ||||
-rw-r--r-- | vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx | 13 | ||||
-rw-r--r-- | vcl/aqua/source/gdi/coretext/salgdi.cxx | 16 | ||||
-rw-r--r-- | vcl/inc/aqua/coretext/salcoretextfontutils.hxx | 12 | ||||
-rw-r--r-- | vcl/inc/aqua/coretext/salcoretextstyle.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/aqua/coretext/salgdi.h | 2 |
6 files changed, 36 insertions, 37 deletions
diff --git a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx index faaf11b07352..a54cfb9966f8 100644 --- a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx +++ b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx @@ -203,7 +203,7 @@ SystemFontList::SystemFontList() ImplDevFontAttributes devfont_attr; if(GetDevFontAttributes( font_descriptor, devfont_attr ) ) { - ImplCoreTextFontData* font_data = new ImplCoreTextFontData(devfont_attr, font); + CoreTextPhysicalFontFace* font_data = new CoreTextPhysicalFontFace(devfont_attr, font); if(font_data && font_data->GetCTFont()) { m_aFontContainer [ font_data->GetCTFont() ] = font_data; @@ -224,7 +224,7 @@ SystemFontList::~SystemFontList() m_aFontContainer.clear(); } -ImplCoreTextFontData* SystemFontList::GetFontDataFromRef( CTFontRef font ) const +CoreTextPhysicalFontFace* SystemFontList::GetFontDataFromRef( CTFontRef font ) const { CoreTextFontContainer::const_iterator it = m_aFontContainer.find( font ); return it == m_aFontContainer.end() ? NULL : (*it).second; @@ -240,7 +240,7 @@ void SystemFontList::AnnounceFonts( ImplDevFontList& rFontList ) const } } -ImplCoreTextFontData::ImplCoreTextFontData( const ImplDevFontAttributes& rDFA, CTFontRef font ) +CoreTextPhysicalFontFace::CoreTextPhysicalFontFace( const ImplDevFontAttributes& rDFA, CTFontRef font ) : PhysicalFontFace( rDFA, 0 ) , m_CTFontRef((CTFontRef)CFRetain(font)) , m_pCharMap( NULL ) @@ -252,7 +252,7 @@ ImplCoreTextFontData::ImplCoreTextFontData( const ImplDevFontAttributes& rDFA, C { } -ImplCoreTextFontData::~ImplCoreTextFontData() +CoreTextPhysicalFontFace::~CoreTextPhysicalFontFace() { if( m_pCharMap ) { @@ -264,9 +264,9 @@ ImplCoreTextFontData::~ImplCoreTextFontData() } } -PhysicalFontFace* ImplCoreTextFontData::Clone() const +PhysicalFontFace* CoreTextPhysicalFontFace::Clone() const { - ImplCoreTextFontData* pClone = new ImplCoreTextFontData(*this); + CoreTextPhysicalFontFace* pClone = new CoreTextPhysicalFontFace(*this); if( m_pCharMap ) { m_pCharMap->AddReference(); @@ -278,12 +278,12 @@ PhysicalFontFace* ImplCoreTextFontData::Clone() const return pClone; } -ImplFontEntry* ImplCoreTextFontData::CreateFontInstance(FontSelectPattern& rFSD) const +ImplFontEntry* CoreTextPhysicalFontFace::CreateFontInstance(FontSelectPattern& rFSD) const { return new ImplFontEntry(rFSD); } -const ImplFontCharMap* ImplCoreTextFontData::GetImplFontCharMap() +const ImplFontCharMap* CoreTextPhysicalFontFace::GetImplFontCharMap() { // return the cached charmap if( m_pCharMap ) @@ -316,7 +316,7 @@ const ImplFontCharMap* ImplCoreTextFontData::GetImplFontCharMap() return m_pCharMap; } -bool ImplCoreTextFontData::GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) +bool CoreTextPhysicalFontFace::GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) { // read this only once per font if( m_bFontCapabilitiesRead ) @@ -380,7 +380,7 @@ void addTable(struct font_table* table, CTFontTableTag tag, CFDataRef data) } } -bool ImplCoreTextFontData::GetRawFontData( std::vector<unsigned char>& rBuffer, bool* pJustCFF ) const +bool CoreTextPhysicalFontFace::GetRawFontData( std::vector<unsigned char>& rBuffer, bool* pJustCFF ) const { bool rc; int table_count = 0; @@ -528,7 +528,7 @@ bool ImplCoreTextFontData::GetRawFontData( std::vector<unsigned char>& rBuffer, return rc; } -void ImplCoreTextFontData::DetermineCJKSupport_OS2(CFDataRef rOS2Table) +void CoreTextPhysicalFontFace::DetermineCJKSupport_OS2(CFDataRef rOS2Table) { if(CFDataGetLength(rOS2Table) >= 48) { @@ -545,7 +545,7 @@ void ImplCoreTextFontData::DetermineCJKSupport_OS2(CFDataRef rOS2Table) } } -void ImplCoreTextFontData::DetermineCJKSupport_cmap(CFDataRef rCmapTable) +void CoreTextPhysicalFontFace::DetermineCJKSupport_cmap(CFDataRef rCmapTable) { int table_len = CFDataGetLength(rCmapTable) / 2; if(table_len >= 12) @@ -574,7 +574,7 @@ void ImplCoreTextFontData::DetermineCJKSupport_cmap(CFDataRef rCmapTable) } } -bool ImplCoreTextFontData::HasCJKSupport( void ) +bool CoreTextPhysicalFontFace::HasCJKSupport( void ) { // read this only once per font if(!m_bOs2TableRead ) diff --git a/vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx b/vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx index 5a092af3c96a..90d5187ec56f 100644 --- a/vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx +++ b/vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx @@ -13,7 +13,7 @@ CoreTextStyleInfo::CoreTextStyleInfo() : m_CTParagraphStyle(NULL), m_CTFont(NULL), m_color(NULL), - m_font_data(NULL) + m_font_face(NULL) { msgs_debug(style,"create <-->"); } @@ -38,24 +38,23 @@ void CoreTextStyleInfo::SetFont(FontSelectPattern* requested_font) SafeCFRelease(m_CTFont); if(!requested_font) { - m_font_data = NULL; + m_font_face = NULL; return; } - const ImplCoreTextFontData* font_data = static_cast<const ImplCoreTextFontData*>(requested_font->mpFontData); + m_font_face = static_cast<const CoreTextPhysicalFontFace*>(requested_font->mpFontData); - m_font_data = (ImplCoreTextFontData*)font_data; m_matrix = CGAffineTransformIdentity; CGFloat font_size = (CGFloat)requested_font->mfExactHeight; // enable bold-emulation if needed if( (requested_font->GetWeight() >= WEIGHT_BOLD) && - (font_data->GetWeight() < WEIGHT_SEMIBOLD) ) + (m_font_face->GetWeight() < WEIGHT_SEMIBOLD) ) { /* FIXME: add support for fake bold */ m_fake_bold = true; } if( ((requested_font->GetSlant() == ITALIC_NORMAL) || (requested_font->GetSlant() == ITALIC_OBLIQUE)) && - !((font_data->GetSlant() == ITALIC_NORMAL) || (font_data->GetSlant() == ITALIC_OBLIQUE)) ) + !((m_font_face->GetSlant() == ITALIC_NORMAL) || (m_font_face->GetSlant() == ITALIC_OBLIQUE)) ) { #define kRotationForItalicText 10 m_fake_italic = true; @@ -72,7 +71,7 @@ void CoreTextStyleInfo::SetFont(FontSelectPattern* requested_font) /* FIXME: pass attribute to take into accout 'VerticalStyle' */ /* FIXME: how to deal with 'rendering options' i.e anti-aliasing, does it even matter in CoreText ? */ - m_CTFont = CTFontCreateCopyWithAttributes(font_data->GetCTFont(), font_size, &m_matrix, NULL); + m_CTFont = CTFontCreateCopyWithAttributes(m_font_face->GetCTFont(), font_size, &m_matrix, NULL); msgs_debug(style,"font %p <--", m_CTFont); } diff --git a/vcl/aqua/source/gdi/coretext/salgdi.cxx b/vcl/aqua/source/gdi/coretext/salgdi.cxx index 62e0903b2171..160cf18bf25b 100644 --- a/vcl/aqua/source/gdi/coretext/salgdi.cxx +++ b/vcl/aqua/source/gdi/coretext/salgdi.cxx @@ -23,7 +23,7 @@ AquaSalGraphics::AquaSalGraphics() , mxClipPath( NULL ) , maLineColor( COL_WHITE ) , maFillColor( COL_BLACK ) - , m_pCoreTextFontData( NULL ) + , m_font_face( NULL ) , mbNonAntialiasedText( false ) , mbPrinter( false ) , mbVirDev( false ) @@ -145,28 +145,28 @@ sal_uLong AquaSalGraphics::GetKernPairs( sal_uLong, ImplKernPairData* ) bool AquaSalGraphics::GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const { - if( !m_pCoreTextFontData ) + if( !m_font_face ) { return false; } - return m_pCoreTextFontData->GetImplFontCapabilities(rFontCapabilities); + return m_font_face->GetImplFontCapabilities(rFontCapabilities); } const ImplFontCharMap* AquaSalGraphics::GetImplFontCharMap() const { - if( !m_pCoreTextFontData ) + if( !m_font_face ) { return ImplFontCharMap::GetDefaultMap(); } - return m_pCoreTextFontData->GetImplFontCharMap(); + return m_font_face->GetImplFontCharMap(); } -bool AquaSalGraphics::GetRawFontData( const PhysicalFontFace* pFontData, +bool AquaSalGraphics::GetRawFontData( const PhysicalFontFace* pFontFace, std::vector<unsigned char>& rBuffer, bool* pJustCFF ) { - const ImplCoreTextFontData* font_data = static_cast<const ImplCoreTextFontData*>(pFontData); + const CoreTextPhysicalFontFace* font_face = static_cast<const CoreTextPhysicalFontFace*>(pFontFace); - return font_data->GetRawFontData(rBuffer, pJustCFF); + return font_face->GetRawFontData(rBuffer, pJustCFF); } SystemFontData AquaSalGraphics::GetSysFontData( int /* nFallbacklevel */ ) const diff --git a/vcl/inc/aqua/coretext/salcoretextfontutils.hxx b/vcl/inc/aqua/coretext/salcoretextfontutils.hxx index 3c75899b0a8d..486bafdc3f73 100644 --- a/vcl/inc/aqua/coretext/salcoretextfontutils.hxx +++ b/vcl/inc/aqua/coretext/salcoretextfontutils.hxx @@ -3,7 +3,7 @@ #ifndef _VCL_AQUA_CORETEXT_SALCORETEXTFONTUTILS_HXX #define _VCL_AQUA_CORETEXT_SALCORETEXTFONTUTILS_HXX -class ImplCoreTextFontData; +class CoreTextPhysicalFontFace; class ImplDevFontList; #include <boost/unordered_map.hpp> @@ -13,11 +13,11 @@ class ImplDevFontList; #include "outfont.hxx" #include "impfont.hxx" -class ImplCoreTextFontData : public PhysicalFontFace +class CoreTextPhysicalFontFace : public PhysicalFontFace { public: - ImplCoreTextFontData(const ImplDevFontAttributes&, CTFontRef font); - virtual ~ImplCoreTextFontData(); + CoreTextPhysicalFontFace(const ImplDevFontAttributes&, CTFontRef font); + virtual ~CoreTextPhysicalFontFace(); virtual PhysicalFontFace* Clone() const; virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const; virtual sal_IntPtr GetFontId() const { return (sal_IntPtr)m_CTFontRef;}; @@ -53,10 +53,10 @@ public: ~SystemFontList(); void AnnounceFonts( ImplDevFontList& ) const; - ImplCoreTextFontData* GetFontDataFromRef( CTFontRef ) const; + CoreTextPhysicalFontFace* GetFontDataFromRef( CTFontRef ) const; private: - typedef boost::unordered_map<CTFontRef,ImplCoreTextFontData*> CoreTextFontContainer; + typedef boost::unordered_map<CTFontRef,CoreTextPhysicalFontFace*> CoreTextFontContainer; CoreTextFontContainer m_aFontContainer; void InitGlyphFallbacks(); diff --git a/vcl/inc/aqua/coretext/salcoretextstyle.hxx b/vcl/inc/aqua/coretext/salcoretextstyle.hxx index 91bde5209fcc..63139863f3eb 100644 --- a/vcl/inc/aqua/coretext/salcoretextstyle.hxx +++ b/vcl/inc/aqua/coretext/salcoretextstyle.hxx @@ -6,7 +6,7 @@ #include "aqua/salgdicommon.hxx" class FontSelectPattern; -class ImplCoreTextFontData; +class CoreTextPhysicalFontFace; class CoreTextStyleInfo { @@ -33,7 +33,7 @@ private: CTParagraphStyleRef m_CTParagraphStyle; CTFontRef m_CTFont; CGColorRef m_color; - const ImplCoreTextFontData* m_font_data; + const CoreTextPhysicalFontFace* m_font_face; }; diff --git a/vcl/inc/aqua/coretext/salgdi.h b/vcl/inc/aqua/coretext/salgdi.h index 7f59de203aba..fb9f86318978 100644 --- a/vcl/inc/aqua/coretext/salgdi.h +++ b/vcl/inc/aqua/coretext/salgdi.h @@ -48,7 +48,7 @@ protected: RGBAColor maLineColor; //< pen color RGBA RGBAColor maFillColor; //< brush color RGBA - ImplCoreTextFontData* m_pCoreTextFontData; //< Device Font settings + CoreTextPhysicalFontFace* m_font_face; //< Device Font settings bool mbNonAntialiasedText; //< allows text to be rendered without antialiasing |