< prev index next >

src/solaris/native/sun/awt/fontpath.c

Print this page
rev 13458 : 8170681: Remove fontconfig header files from JDK source tree
Reviewed-by: serb, erikj


 554         free(x11dirs);
 555     }
 556 
 557     return path;
 558 }
 559 
 560 JNIEXPORT jstring JNICALL Java_sun_awt_FcFontManager_getFontPathNative
 561 (JNIEnv *env, jobject thiz, jboolean noType1, jboolean isX11) {
 562     jstring ret;
 563     static char *ptr = NULL; /* retain result across calls */
 564 
 565     if (ptr == NULL) {
 566         ptr = getPlatformFontPathChars(env, noType1, isX11);
 567     }
 568     ret = (*env)->NewStringUTF(env, ptr);
 569     return ret;
 570 }
 571 
 572 #include <dlfcn.h>
 573 
 574 #include "fontconfig.h"
 575 
 576 
 577 static void* openFontConfig() {
 578 
 579     char *homeEnv;
 580     static char *homeEnvStr = "HOME="; /* must be static */
 581     void* libfontconfig = NULL;
 582 #ifdef __solaris__
 583 #define SYSINFOBUFSZ 8
 584     char sysinfobuf[SYSINFOBUFSZ];
 585 #endif
 586 
 587     /* Private workaround to not use fontconfig library.
 588      * May be useful during testing/debugging
 589      */
 590     char *useFC = getenv("USE_J2D_FONTCONFIG");
 591     if (useFC != NULL && !strcmp(useFC, "no")) {
 592         return NULL;
 593     }
 594 




 554         free(x11dirs);
 555     }
 556 
 557     return path;
 558 }
 559 
 560 JNIEXPORT jstring JNICALL Java_sun_awt_FcFontManager_getFontPathNative
 561 (JNIEnv *env, jobject thiz, jboolean noType1, jboolean isX11) {
 562     jstring ret;
 563     static char *ptr = NULL; /* retain result across calls */
 564 
 565     if (ptr == NULL) {
 566         ptr = getPlatformFontPathChars(env, noType1, isX11);
 567     }
 568     ret = (*env)->NewStringUTF(env, ptr);
 569     return ret;
 570 }
 571 
 572 #include <dlfcn.h>
 573 
 574 #include <fontconfig/fontconfig.h>
 575 
 576 
 577 static void* openFontConfig() {
 578 
 579     char *homeEnv;
 580     static char *homeEnvStr = "HOME="; /* must be static */
 581     void* libfontconfig = NULL;
 582 #ifdef __solaris__
 583 #define SYSINFOBUFSZ 8
 584     char sysinfobuf[SYSINFOBUFSZ];
 585 #endif
 586 
 587     /* Private workaround to not use fontconfig library.
 588      * May be useful during testing/debugging
 589      */
 590     char *useFC = getenv("USE_J2D_FONTCONFIG");
 591     if (useFC != NULL && !strcmp(useFC, "no")) {
 592         return NULL;
 593     }
 594 


< prev index next >