#include "jisx0208.h"
#endif
+extern int any2eucjp (char *, char *, unsigned int);
+
+/* Persistent font cache until explicitly cleared */
+/* Fonts can be used across multiple images */
+
+/* 2.0.16: thread safety (the font cache is shared) */
+gdMutexDeclare(gdFontCacheMutex);
+static gdCache_head_t *fontCache = NULL;
+static FT_Library library;
+
#define Tcl_UniChar int
#define TCL_UTF_MAX 3
static int gdTcl_UtfToUniChar (char *str, Tcl_UniChar * chPtr)
} else {
/* find antialised color */
tc_key.bgcolor = *pixel;
+ gdMutexLock(gdFontCacheMutex);
tc_elem = (tweencolor_t *) gdCacheGet(tc_cache, &tc_key);
*pixel = tc_elem->tweencolor;
+ gdMutexUnlock(gdFontCacheMutex);
}
}
}
return (!updown) ? (v1 < 0 ? ((v1 - 63) >> 6) : v1 >> 6) : (v1 > 0 ? ((v1 + 63) >> 6) : v1 >> 6);
}
-extern int any2eucjp (char *, char *, unsigned int);
-
-/* Persistent font cache until explicitly cleared */
-/* Fonts can be used across multiple images */
-
-/* 2.0.16: thread safety (the font cache is shared) */
-gdMutexDeclare(gdFontCacheMutex);
-static gdCache_head_t *fontCache = NULL;
-static FT_Library library;
-
void gdFontCacheShutdown()
{
if (fontCache) {