25 26 /* 27 * These routines are used for display string with multi font. 28 */ 29 30 #ifdef HEADLESS 31 #error This file should not be included in headless library 32 #endif 33 34 #include <stdlib.h> 35 #include <string.h> 36 #include <math.h> 37 #include <ctype.h> 38 #include <jni.h> 39 #include <jni_util.h> 40 #include <jvm.h> 41 #include "awt_Font.h" 42 #include "awt_p.h" 43 #include "multi_font.h" 44 45 extern XFontStruct *loadFont(Display *, char *, int32_t); 46 47 extern struct FontIDs fontIDs; 48 extern struct PlatformFontIDs platformFontIDs; 49 extern struct XFontPeerIDs xFontPeerIDs; 50 51 /* 52 * make string with str + string representation of num 53 * This string is used as tag string of Motif Compound String and FontList. 54 */ 55 static void 56 makeTag(char *str, int32_t num, char *buf) 57 { 58 int32_t len = strlen(str); 59 60 strcpy(buf, str); 61 buf[len] = '0' + num % 100; 62 buf[len + 1] = '\0'; 63 } 64 | 25 26 /* 27 * These routines are used for display string with multi font. 28 */ 29 30 #ifdef HEADLESS 31 #error This file should not be included in headless library 32 #endif 33 34 #include <stdlib.h> 35 #include <string.h> 36 #include <math.h> 37 #include <ctype.h> 38 #include <jni.h> 39 #include <jni_util.h> 40 #include <jvm.h> 41 #include "awt_Font.h" 42 #include "awt_p.h" 43 #include "multi_font.h" 44 45 #ifndef FONT_DEBUG 46 #define FONT_DEBUG 0 47 #endif 48 49 extern XFontStruct *loadFont(Display *, char *, int32_t); 50 51 extern struct FontIDs fontIDs; 52 extern struct PlatformFontIDs platformFontIDs; 53 extern struct XFontPeerIDs xFontPeerIDs; 54 55 /* 56 * make string with str + string representation of num 57 * This string is used as tag string of Motif Compound String and FontList. 58 */ 59 static void 60 makeTag(char *str, int32_t num, char *buf) 61 { 62 int32_t len = strlen(str); 63 64 strcpy(buf, str); 65 buf[len] = '0' + num % 100; 66 buf[len + 1] = '\0'; 67 } 68 |