--- /dev/null 2015-11-17 15:39:42.000000000 -0800 +++ new/src/java.desktop/share/native/libfontmanager/hb-jdk.h 2015-11-17 15:39:42.000000000 -0800 @@ -0,0 +1,48 @@ +#ifndef HB_JDK_H +#define HB_JDK_H + +#include "hb.h" +#include +#include + +# ifdef __cplusplus +extern "C" { +#endif + +typedef struct JDKFontInfo_Struct { + JNIEnv* env; + jobject font2D; + jobject fontStrike; + long nativeFont; + float matrix[4]; + float xPtSize; + float yPtSize; + jboolean aat; +} JDKFontInfo; + + +/* + * Note: + * + * Set face size on ft-face before creating hb-font from it. + * Otherwise hb-ft would NOT pick up the font size correctly. + */ + +hb_face_t * +hb_jdk_face_create(JDKFontInfo* jdkFontInfo, + hb_destroy_func_t destroy); +hb_font_t * +hb_jdk_font_create(JDKFontInfo* jdkFontInfo, + hb_destroy_func_t destroy); + + +/* Makes an hb_font_t use JDK internally to implement font functions. */ +void +hb_jdk_font_set_funcs(hb_font_t *font); + + +# ifdef __cplusplus +} +#endif + +#endif /* HB_JDK_H */