diff options
Diffstat (limited to 'vcl/unx/generic/gdi/cairotextrender.cxx')
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 55d5e49c5025..eb941e2b384c 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -138,31 +138,12 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev // register to use the font mpFreetypeFont[ nFallbackLevel ] = pFreetypeFont; - // apply font specific-hint settings - FreetypeFontInstance* pSFE = static_cast<FreetypeFontInstance*>( pEntry->mpFontInstance ); - pSFE->HandleFontOptions(); - return true; } return false; } -void FreetypeFontInstance::HandleFontOptions() -{ - if( !mpFreetypeFont ) - return; - if( !mbGotFontOptions ) - { - // get and cache the font options - mbGotFontOptions = true; - mxFontOptions.reset(GetFCFontOptions( *maFontSelData.mpFontData, - maFontSelData.mnHeight )); - } - // apply the font options - mpFreetypeFont->SetFontOptions(mxFontOptions); -} - void CairoFontsCache::CacheFont(void *pFont, const CairoFontsCache::CacheId &rId) { maLRUFonts.push_front( std::pair<void*, CairoFontsCache::CacheId>(pFont, rId) ); @@ -461,29 +442,16 @@ void CairoTextRender::GetDevFontList( PhysicalFontCollection* pFontCollection ) ImplGetSVData()->maGDIData.mbNativeFontConfig = true; } -void cairosubcallback(void* pPattern) +void FontConfigFontOptions::cairo_font_options_substitute(FcPattern* pPattern) { ImplSVData* pSVData = ImplGetSVData(); const cairo_font_options_t* pFontOptions = pSVData->mpDefInst->GetCairoFontOptions(); if( !pFontOptions ) return; - cairo_ft_font_options_substitute(pFontOptions, static_cast<FcPattern*>(pPattern)); + cairo_ft_font_options_substitute(pFontOptions, pPattern); } -FontConfigFontOptions* GetFCFontOptions( const FontAttributes& rFontAttributes, int nSize) -{ - psp::FastPrintFontInfo aInfo; - - aInfo.m_aFamilyName = rFontAttributes.GetFamilyName(); - aInfo.m_eItalic = rFontAttributes.GetItalic(); - aInfo.m_eWeight = rFontAttributes.GetWeight(); - aInfo.m_eWidth = rFontAttributes.GetWidthType(); - - return psp::PrintFontManager::getFontOptions(aInfo, nSize, cairosubcallback); -} - -void -CairoTextRender::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nFallbackLevel ) +void CairoTextRender::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nFallbackLevel ) { if( nFallbackLevel >= MAX_FALLBACK ) return; |