[Libreoffice-commits] core.git: vcl/quartz

Tor Lillqvist tml at collabora.com
Tue Feb 18 08:56:58 CET 2014


 vcl/quartz/ctfonts.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 4531a442454d81e140d720326f323cb5ad6ebfb5
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Feb 18 09:56:09 2014 +0200

    Fix iOS fallout from cda903f83831341f44833b94e7d38e598f5a7198
    
    Change-Id: I48e418ff7d5a8bbf64bc6072b4ad2ef30cb24625

diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 9c37c65..e5c3f5931 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -305,6 +305,7 @@ ImplDevFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool
     rDFA.mbSubsettable = true;
 
     // get font name
+#ifdef MACOSX
     const OUString aUILang = Application::GetSettings().GetUILanguageTag().getLanguage();
     CFStringRef pUILang = CFStringCreateWithCharacters( kCFAllocatorDefault, aUILang.getStr(), aUILang.getLength() );
     CFStringRef pLang = NULL;
@@ -314,6 +315,13 @@ ImplDevFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool
         CFRelease( pFamilyName );
         pFamilyName = (CFStringRef)CTFontDescriptorCopyAttribute( pFD, kCTFontFamilyNameAttribute );
     }
+#else
+    // No "Application" on iOS. And it is unclear whether this code
+    // snippet will actually ever get invoked on iOS anyway. So just
+    // use the old code that uses a non-localized font name.
+    CFStringRef pFamilyName = (CFStringRef)CTFontDescriptorCopyAttribute( pFD, kCTFontFamilyNameAttribute );
+#endif
+
     rDFA.SetFamilyName( GetOUString( pFamilyName ) );
 
     // get font style


More information about the Libreoffice-commits mailing list