changeset 4192:89ae1b941f13

RT-31420: native font rendering throws java.lang.UnsatisfiedLinkError on iOS
author Felipe Heidrich <felipe.heidrich@oracle.com>
date Fri, 05 Jul 2013 11:19:36 -0700
parents 21e5afedadfd
children acb54c554301 b3e19138d374
files buildSrc/ios.gradle modules/graphics/src/main/native-font/coretext.c modules/graphics/src/main/native-font/dfontdecoder.c
diffstat 3 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/buildSrc/ios.gradle	Fri Jul 05 10:54:43 2013 -0700
+++ b/buildSrc/ios.gradle	Fri Jul 05 11:19:36 2013 -0700
@@ -80,6 +80,7 @@
     "-static",
     "-framework", "Foundation",
     "-framework", "CoreGraphics",
+    "-framework", "CoreText",
     "-framework", "UIKit",
     "-framework", "QuartzCore",
     "-framework", "OpenGLES"].flatten()
--- a/modules/graphics/src/main/native-font/coretext.c	Fri Jul 05 10:54:43 2013 -0700
+++ b/modules/graphics/src/main/native-font/coretext.c	Fri Jul 05 11:19:36 2013 -0700
@@ -26,13 +26,20 @@
 #ifdef __APPLE__
 #include <TargetConditionals.h>
 
-#if TARGET_OS_MAC && !(TARGET_OS_IPHONE)
+#if TARGET_OS_MAC
 
 #include <jni.h>
 #include <com_sun_javafx_font_coretext_OS.h>
 
 #import <CoreFoundation/CoreFoundation.h>
+
+#if TARGET_OS_IPHONE
+#import <CoreGraphics/CoreGraphics.h>
+#import <CoreText/CoreText.h>
+#else
 #import <ApplicationServices/ApplicationServices.h>
+#endif
+
 
 #define OS_NATIVE(func) Java_com_sun_javafx_font_coretext_OS_##func
 
--- a/modules/graphics/src/main/native-font/dfontdecoder.c	Fri Jul 05 10:54:43 2013 -0700
+++ b/modules/graphics/src/main/native-font/dfontdecoder.c	Fri Jul 05 11:19:36 2013 -0700
@@ -26,13 +26,19 @@
 #ifdef __APPLE__
 #include <TargetConditionals.h>
 
-#if TARGET_OS_MAC && !(TARGET_OS_IPHONE)
+#if TARGET_OS_MAC
 
 #include <jni.h>
 #include <com_sun_javafx_font_DFontDecoder.h>
 
 #import <CoreFoundation/CoreFoundation.h>
+
+#if TARGET_OS_IPHONE
+#import <CoreGraphics/CoreGraphics.h>
+#import <CoreText/CoreText.h>
+#else
 #import <ApplicationServices/ApplicationServices.h>
+#endif
 
 
 JNIEXPORT jlong JNICALL Java_com_sun_javafx_font_DFontDecoder_createCTFont