summaryrefslogtreecommitdiff
path: root/vcl/coretext/ctlayout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/coretext/ctlayout.cxx')
-rw-r--r--vcl/coretext/ctlayout.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/coretext/ctlayout.cxx b/vcl/coretext/ctlayout.cxx
index 0334cffe8a4b..18df73e55a82 100644
--- a/vcl/coretext/ctlayout.cxx
+++ b/vcl/coretext/ctlayout.cxx
@@ -293,6 +293,18 @@ int CTLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIDs, Point& rPos, int&
}
const PhysicalFontFace* pFallbackFont = NULL;
+ if( pFallbackFonts ) {
+ CFDictionaryRef pRunAttributes = CTRunGetAttributes( pGlyphRun );
+ CTFontRef pRunFont = (CTFontRef)CFDictionaryGetValue( pRunAttributes, kCTFontAttributeName );
+
+ CFDictionaryRef pAttributes = mpTextStyle->GetStyleDict();
+ CTFontRef pFont = (CTFontRef)CFDictionaryGetValue( pAttributes, kCTFontAttributeName );
+ if ( !CFEqual( pRunFont, pFont ) ) {
+ CTFontDescriptorRef pFontDesc = CTFontCopyFontDescriptor( pRunFont );
+ ImplDevFontAttributes rDevFontAttr = DevFontFromCTFontDescriptor( pFontDesc, NULL );
+ pFallbackFont = new CTFontData( rDevFontAttr, (sal_IntPtr)pFontDesc );
+ }
+ }
// get the details for each interesting glyph
// TODO: handle nLen>1