< prev index next >

src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc

Print this page

        

@@ -40,14 +40,14 @@
 #endif
 
 
 static hb_bool_t
 hb_jdk_get_nominal_glyph (hb_font_t *font HB_UNUSED,
-                          void *font_data,
-                          hb_codepoint_t unicode,
-                          hb_codepoint_t *glyph,
-                          void *user_data HB_UNUSED)
+                          void *font_data,
+                          hb_codepoint_t unicode,
+                          hb_codepoint_t *glyph,
+                          void *user_data HB_UNUSED)
 {
 
     JDKFontInfo *jdkFontInfo = (JDKFontInfo*)font_data;
     JNIEnv* env = jdkFontInfo->env;
     jobject font2D = jdkFontInfo->font2D;

@@ -63,22 +63,22 @@
     return (*glyph != 0);
 }
 
 static hb_bool_t
 hb_jdk_get_variation_glyph (hb_font_t *font HB_UNUSED,
-                 void *font_data,
-                 hb_codepoint_t unicode,
-                 hb_codepoint_t variation_selector,
-                 hb_codepoint_t *glyph,
-                 void *user_data HB_UNUSED)
+                 void *font_data,
+                 hb_codepoint_t unicode,
+                 hb_codepoint_t variation_selector,
+                 hb_codepoint_t *glyph,
+                 void *user_data HB_UNUSED)
 {
 
     JDKFontInfo *jdkFontInfo = (JDKFontInfo*)font_data;
     JNIEnv* env = jdkFontInfo->env;
     jobject font2D = jdkFontInfo->font2D;
     *glyph = (hb_codepoint_t)env->CallIntMethod(
-              font2D, sunFontIDs.f2dCharToVariationGlyphMID, 
+              font2D, sunFontIDs.f2dCharToVariationGlyphMID,
               unicode, variation_selector);
     if (env->ExceptionOccurred())
     {
         env->ExceptionClear();
     }

@@ -88,13 +88,13 @@
     return (*glyph != 0);
 }
 
 static hb_position_t
 hb_jdk_get_glyph_h_advance (hb_font_t *font HB_UNUSED,
-                           void *font_data,
-                           hb_codepoint_t glyph,
-                           void *user_data HB_UNUSED)
+                           void *font_data,
+                           hb_codepoint_t glyph,
+                           void *user_data HB_UNUSED)
 {
 
     float fadv = 0.0f;
     if ((glyph & 0xfffe) == 0xfffe) {
         return 0; // JDK uses this glyph code.

@@ -116,13 +116,13 @@
     return HBFloatToFixed(fadv);
 }
 
 static hb_position_t
 hb_jdk_get_glyph_v_advance (hb_font_t *font HB_UNUSED,
-                           void *font_data,
-                           hb_codepoint_t glyph,
-                           void *user_data HB_UNUSED)
+                           void *font_data,
+                           hb_codepoint_t glyph,
+                           void *user_data HB_UNUSED)
 {
 
     float fadv = 0.0f;
     if ((glyph & 0xfffe) == 0xfffe) {
         return 0; // JDK uses this glyph code.

@@ -144,37 +144,37 @@
 
 }
 
 static hb_bool_t
 hb_jdk_get_glyph_h_origin (hb_font_t *font HB_UNUSED,
-                          void *font_data HB_UNUSED,
-                          hb_codepoint_t glyph HB_UNUSED,
-                          hb_position_t *x HB_UNUSED,
-                          hb_position_t *y HB_UNUSED,
-                          void *user_data HB_UNUSED)
+                          void *font_data HB_UNUSED,
+                          hb_codepoint_t glyph HB_UNUSED,
+                          hb_position_t *x HB_UNUSED,
+                          hb_position_t *y HB_UNUSED,
+                          void *user_data HB_UNUSED)
 {
   /* We always work in the horizontal coordinates. */
   return true;
 }
 
 static hb_bool_t
 hb_jdk_get_glyph_v_origin (hb_font_t *font HB_UNUSED,
-                          void *font_data,
-                          hb_codepoint_t glyph,
-                          hb_position_t *x,
-                          hb_position_t *y,
-                          void *user_data HB_UNUSED)
+                          void *font_data,
+                          hb_codepoint_t glyph,
+                          hb_position_t *x,
+                          hb_position_t *y,
+                          void *user_data HB_UNUSED)
 {
   return false;
 }
 
 static hb_position_t
 hb_jdk_get_glyph_h_kerning (hb_font_t *font,
-                           void *font_data,
-                           hb_codepoint_t lejdk_glyph,
-                           hb_codepoint_t right_glyph,
-                           void *user_data HB_UNUSED)
+                           void *font_data,
+                           hb_codepoint_t lejdk_glyph,
+                           hb_codepoint_t right_glyph,
+                           void *user_data HB_UNUSED)
 {
   /* Not implemented. This seems to be in the HB API
    * as a way to fall back to Freetype's kerning support
    * which could be based on some on-the fly glyph analysis.
    * But more likely it reads the kern table. That is easy

@@ -187,38 +187,38 @@
   return 0;
 }
 
 static hb_position_t
 hb_jdk_get_glyph_v_kerning (hb_font_t *font HB_UNUSED,
-                           void *font_data HB_UNUSED,
-                           hb_codepoint_t top_glyph HB_UNUSED,
-                           hb_codepoint_t bottom_glyph HB_UNUSED,
-                           void *user_data HB_UNUSED)
+                           void *font_data HB_UNUSED,
+                           hb_codepoint_t top_glyph HB_UNUSED,
+                           hb_codepoint_t bottom_glyph HB_UNUSED,
+                           void *user_data HB_UNUSED)
 {
   /* OpenType doesn't have vertical-kerning other than GPOS. */
   return 0;
 }
 
 static hb_bool_t
 hb_jdk_get_glyph_extents (hb_font_t *font HB_UNUSED,
-                         void *font_data,
-                         hb_codepoint_t glyph,
-                         hb_glyph_extents_t *extents,
-                         void *user_data HB_UNUSED)
+                         void *font_data,
+                         hb_codepoint_t glyph,
+                         hb_glyph_extents_t *extents,
+                         void *user_data HB_UNUSED)
 {
   /* TODO */
   return false;
 }
 
 static hb_bool_t
 hb_jdk_get_glyph_contour_point (hb_font_t *font HB_UNUSED,
-                               void *font_data,
-                               hb_codepoint_t glyph,
-                               unsigned int point_index,
-                               hb_position_t *x,
-                               hb_position_t *y,
-                               void *user_data HB_UNUSED)
+                               void *font_data,
+                               hb_codepoint_t glyph,
+                               unsigned int point_index,
+                               hb_position_t *x,
+                               hb_position_t *y,
+                               void *user_data HB_UNUSED)
 {
     if ((glyph & 0xfffe) == 0xfffe) {
         *x = 0; *y = 0;
         return true;
     }

@@ -241,24 +241,24 @@
   return true;
 }
 
 static hb_bool_t
 hb_jdk_get_glyph_name (hb_font_t *font HB_UNUSED,
-                      void *font_data,
-                      hb_codepoint_t glyph,
-                      char *name, unsigned int size,
-                      void *user_data HB_UNUSED)
+                      void *font_data,
+                      hb_codepoint_t glyph,
+                      char *name, unsigned int size,
+                      void *user_data HB_UNUSED)
 {
   return false;
 }
 
 static hb_bool_t
 hb_jdk_get_glyph_from_name (hb_font_t *font HB_UNUSED,
-                           void *font_data,
-                           const char *name, int len,
-                           hb_codepoint_t *glyph,
-                           void *user_data HB_UNUSED)
+                           void *font_data,
+                           const char *name, int len,
+                           hb_codepoint_t *glyph,
+                           void *user_data HB_UNUSED)
 {
   return false;
 }
 
 // remind : can we initialise this from the code we call
< prev index next >