208 |
208 |
209 synchronized long getUnitsPerEm() { |
209 synchronized long getUnitsPerEm() { |
210 return getUnitsPerEMNative(nativeScaler); |
210 return getUnitsPerEMNative(nativeScaler); |
211 } |
211 } |
212 |
212 |
213 long createScalerContext(double[] matrix, boolean fontType, |
213 long createScalerContext(double[] matrix, |
214 int aa, int fm, float boldness, float italic, |
214 int aa, int fm, float boldness, float italic, |
215 boolean disableHinting) { |
215 boolean disableHinting) { |
216 if (nativeScaler != 0L) { |
216 if (nativeScaler != 0L) { |
217 return createScalerContextNative(nativeScaler, matrix, |
217 return createScalerContextNative(nativeScaler, matrix, |
218 fontType, aa, fm, boldness, italic); |
218 aa, fm, boldness, italic); |
219 } |
219 } |
220 return NullFontScaler.getNullScalerContext(); |
220 return NullFontScaler.getNullScalerContext(); |
221 } |
221 } |
222 |
222 |
223 //Note: native methods can throw RuntimeException if processing fails |
223 //Note: native methods can throw RuntimeException if processing fails |
252 private native int getMissingGlyphCodeNative(long pScaler); |
252 private native int getMissingGlyphCodeNative(long pScaler); |
253 |
253 |
254 private native long getUnitsPerEMNative(long pScaler); |
254 private native long getUnitsPerEMNative(long pScaler); |
255 |
255 |
256 native long createScalerContextNative(long pScaler, double[] matrix, |
256 native long createScalerContextNative(long pScaler, double[] matrix, |
257 boolean fontType, int aa, int fm, float boldness, float italic); |
257 int aa, int fm, float boldness, float italic); |
258 |
258 |
259 /* Freetype scaler context does not contain any pointers that |
259 /* Freetype scaler context does not contain any pointers that |
260 has to be invalidated if native scaler is bad */ |
260 has to be invalidated if native scaler is bad */ |
261 void invalidateScalerContext(long pScalerContext) {} |
261 void invalidateScalerContext(long pScalerContext) {} |
262 } |
262 } |