181 isFakeItalic = other.isFakeItalic; 182 } 183 184 public CFont createItalicVariant() { 185 CFont font = new CFont(this, familyName); 186 font.nativeFontName = fullName; 187 font.fullName = 188 fullName + (style == Font.BOLD ? "" : "-") + "Italic-Derived"; 189 font.style |= Font.ITALIC; 190 font.isFakeItalic = true; 191 return font; 192 } 193 194 protected synchronized long getNativeFontPtr() { 195 if (nativeFontPtr == 0L) { 196 nativeFontPtr = createNativeFont(nativeFontName, style); 197 } 198 return nativeFontPtr; 199 } 200 201 static native void getCascadeList(long nativeFontPtr, ArrayList<String> listOfString); 202 203 private CompositeFont createCompositeFont() { 204 ArrayList<String> listOfString = new ArrayList<String>(); 205 getCascadeList(nativeFontPtr, listOfString); 206 207 FontManager fm = FontManagerFactory.getInstance(); 208 int numFonts = 1 + listOfString.size(); 209 PhysicalFont[] fonts = new PhysicalFont[numFonts]; 210 fonts[0] = this; 211 int idx = 1; 212 for (String s : listOfString) { 213 if (s.equals(".AppleSymbolsFB")) { 214 // Don't know why we get the weird name above .. replace. 215 s = "AppleSymbols"; 216 } 217 Font2D f2d = fm.findFont2D(s, Font.PLAIN, FontManager.NO_FALLBACK); 218 if (f2d == null || f2d == this) { 219 continue; 220 } | 181 isFakeItalic = other.isFakeItalic; 182 } 183 184 public CFont createItalicVariant() { 185 CFont font = new CFont(this, familyName); 186 font.nativeFontName = fullName; 187 font.fullName = 188 fullName + (style == Font.BOLD ? "" : "-") + "Italic-Derived"; 189 font.style |= Font.ITALIC; 190 font.isFakeItalic = true; 191 return font; 192 } 193 194 protected synchronized long getNativeFontPtr() { 195 if (nativeFontPtr == 0L) { 196 nativeFontPtr = createNativeFont(nativeFontName, style); 197 } 198 return nativeFontPtr; 199 } 200 201 private native long getCGFontPtrNative(long ptr); 202 203 // This digs the CGFont out of the AWTFont. 204 protected synchronized long getPlatformNativeFontPtr() { 205 return getCGFontPtrNative(getNativeFontPtr()); 206 } 207 208 static native void getCascadeList(long nativeFontPtr, ArrayList<String> listOfString); 209 210 private CompositeFont createCompositeFont() { 211 ArrayList<String> listOfString = new ArrayList<String>(); 212 getCascadeList(nativeFontPtr, listOfString); 213 214 FontManager fm = FontManagerFactory.getInstance(); 215 int numFonts = 1 + listOfString.size(); 216 PhysicalFont[] fonts = new PhysicalFont[numFonts]; 217 fonts[0] = this; 218 int idx = 1; 219 for (String s : listOfString) { 220 if (s.equals(".AppleSymbolsFB")) { 221 // Don't know why we get the weird name above .. replace. 222 s = "AppleSymbols"; 223 } 224 Font2D f2d = fm.findFont2D(s, Font.PLAIN, FontManager.NO_FALLBACK); 225 if (f2d == null || f2d == this) { 226 continue; 227 } |