< prev index next >

src/java.desktop/unix/native/common/awt/fontpath.c

Print this page

        

*** 1010,1030 **** void* libfontconfig; jfieldID fcNameID, fcFirstFontID, fcAllFontsID, fcVersionID, fcCacheDirsID; jfieldID familyNameID, styleNameID, fullNameID, fontFileID; jmethodID fcFontCons; char* debugMinGlyphsStr = getenv("J2D_DEBUG_MIN_GLYPHS"); CHECK_NULL(fcInfoObj); CHECK_NULL(fcCompFontArray); ! jclass fcInfoClass = (*env)->FindClass(env, "sun/font/FontConfigManager$FontConfigInfo"); CHECK_NULL(fcInfoClass); ! jclass fcCompFontClass = (*env)->FindClass(env, "sun/font/FontConfigManager$FcCompFont"); CHECK_NULL(fcCompFontClass); ! jclass fcFontClass = (*env)->FindClass(env, "sun/font/FontConfigManager$FontConfigFont"); CHECK_NULL(fcFontClass); CHECK_NULL(fcVersionID = (*env)->GetFieldID(env, fcInfoClass, "fcVersion", "I")); --- 1010,1033 ---- void* libfontconfig; jfieldID fcNameID, fcFirstFontID, fcAllFontsID, fcVersionID, fcCacheDirsID; jfieldID familyNameID, styleNameID, fullNameID, fontFileID; jmethodID fcFontCons; char* debugMinGlyphsStr = getenv("J2D_DEBUG_MIN_GLYPHS"); + jclass fcInfoClass; + jclass fcCompFontClass; + jclass fcFontClass; CHECK_NULL(fcInfoObj); CHECK_NULL(fcCompFontArray); ! fcInfoClass = (*env)->FindClass(env, "sun/font/FontConfigManager$FontConfigInfo"); CHECK_NULL(fcInfoClass); ! fcCompFontClass = (*env)->FindClass(env, "sun/font/FontConfigManager$FcCompFont"); CHECK_NULL(fcCompFontClass); ! fcFontClass = (*env)->FindClass(env, "sun/font/FontConfigManager$FontConfigFont"); CHECK_NULL(fcFontClass); CHECK_NULL(fcVersionID = (*env)->GetFieldID(env, fcInfoClass, "fcVersion", "I"));
*** 1144,1154 **** for (i=0; i<arrlen; i++) { FcFontSet* fontset; int fn, j, fontCount, nfonts; unsigned int minGlyphs; FcChar8 **family, **styleStr, **fullname, **file; ! jarray fcFontArr; fcCompFontObj = (*env)->GetObjectArrayElement(env, fcCompFontArray, i); fcNameStr = (jstring)((*env)->GetObjectField(env, fcCompFontObj, fcNameID)); fcName = (*env)->GetStringUTFChars(env, fcNameStr, 0); --- 1147,1158 ---- for (i=0; i<arrlen; i++) { FcFontSet* fontset; int fn, j, fontCount, nfonts; unsigned int minGlyphs; FcChar8 **family, **styleStr, **fullname, **file; ! jarray fcFontArr = NULL; ! FcCharSet *unionCharset = NULL; fcCompFontObj = (*env)->GetObjectArrayElement(env, fcCompFontArray, i); fcNameStr = (jstring)((*env)->GetObjectField(env, fcCompFontObj, fcNameID)); fcName = (*env)->GetStringUTFChars(env, fcNameStr, 0);
*** 1216,1226 **** sscanf(debugMinGlyphsStr, "%5d", &val); if (val >= 0 && val <= 65536) { minGlyphs = val; } } ! FcCharSet *unionCharset = NULL; for (j=0; j<nfonts; j++) { FcPattern *fontPattern = fontset->fonts[j]; FcChar8 *fontformat; FcCharSet *charset = NULL; --- 1220,1230 ---- sscanf(debugMinGlyphsStr, "%5d", &val); if (val >= 0 && val <= 65536) { minGlyphs = val; } } ! for (j=0; j<nfonts; j++) { FcPattern *fontPattern = fontset->fonts[j]; FcChar8 *fontformat; FcCharSet *charset = NULL;
< prev index next >