summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-02-18 09:56:09 +0200
committerTor Lillqvist <tml@collabora.com>2014-02-18 09:56:41 +0200
commit4531a442454d81e140d720326f323cb5ad6ebfb5 (patch)
tree032090ac795d00ee3feb36c1384c67db8b4e070f /vcl
parent9c2b336b0e3bbbc4b73a81c0529cd45e273a0f38 (diff)
Fix iOS fallout from cda903f83831341f44833b94e7d38e598f5a7198
Change-Id: I48e418ff7d5a8bbf64bc6072b4ad2ef30cb24625
Diffstat (limited to 'vcl')
-rw-r--r--vcl/quartz/ctfonts.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 9c37c652f4c7..e5c3f5931149 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