1 /* 2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 #ifndef SunFontIDIncludesDefined 27 #define SunFontIDIncludesDefined 28 29 #include "jni.h" 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 typedef struct FontManagerNativeIDs { 36 37 /* sun/font/Font2D methods */ 38 jmethodID getMapperMID; 39 jmethodID getTableBytesMID; 40 jmethodID canDisplayMID; 41 jmethodID f2dCharToGlyphMID; 42 jmethodID f2dCharsToGlyphsMID; 43 44 /* sun/font/CharToGlyphMapper methods */ 45 jmethodID charToGlyphMID; 46 jmethodID charsToGlyphsMID; 47 48 /* sun/font/PhysicalStrike methods */ 49 jmethodID getGlyphMetricsMID; 50 jmethodID getGlyphPointMID; 51 jmethodID adjustPointMID; 52 jfieldID pScalerContextFID; 53 54 /* java/awt/geom/Rectangle2D.Float */ 55 jclass rect2DFloatClass; 56 jmethodID rect2DFloatCtr; 57 jmethodID rect2DFloatCtr4; 58 jfieldID rectF2DX, rectF2DY, rectF2DWidth, rectF2DHeight; 59 60 /* java/awt/geom/Point2D.Float */ 61 jclass pt2DFloatClass; 62 jmethodID pt2DFloatCtr; 63 jfieldID xFID, yFID; 64 65 /* java/awt/geom/GeneralPath */ 66 jclass gpClass; 67 jmethodID gpCtr; 68 jmethodID gpCtrEmpty; 69 70 /* sun/font/StrikeMetrics */ 71 jclass strikeMetricsClass; 72 jmethodID strikeMetricsCtr; 73 74 /* sun/font/TrueTypeFont */ 75 jmethodID ttReadBlockMID; 76 jmethodID ttReadBytesMID; 77 78 /* sun/font/Type1Font */ 79 jmethodID readFileMID; 80 81 /* sun/font/GlyphList */ 82 jfieldID glyphListX, glyphListY, glyphListLen, 83 glyphImages, glyphListUsePos, glyphListPos, lcdRGBOrder, lcdSubPixPos; 84 } FontManagerNativeIDs; 85 86 /* Note: we share variable in the context of fontmanager lib 87 but we need access method to use it from separate rasterizer lib */ 88 extern FontManagerNativeIDs sunFontIDs; 89 JNIEXPORT FontManagerNativeIDs getSunFontIDs(JNIEnv* env); 90 91 #ifdef __cplusplus 92 } 93 #endif 94 95 #endif