[ot] Remove font funcs that do nothing
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 5 Nov 2015 04:47:42 +0000 (20:47 -0800)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 5 Nov 2015 04:47:42 +0000 (20:47 -0800)
src/hb-ot-font.cc

index e68217d..8d33300 100644 (file)
@@ -305,52 +305,6 @@ hb_ot_get_glyph_v_advance (hb_font_t *font HB_UNUSED,
 }
 
 static hb_bool_t
-hb_ot_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)
-{
-  /* We always work in the horizontal coordinates. */
-  return true;
-}
-
-static hb_bool_t
-hb_ot_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)
-{
-  /* TODO */
-  return false;
-}
-
-static hb_position_t
-hb_ot_get_glyph_h_kerning (hb_font_t *font,
-                          void *font_data,
-                          hb_codepoint_t left_glyph,
-                          hb_codepoint_t right_glyph,
-                          void *user_data HB_UNUSED)
-{
-  /* TODO */
-  return 0;
-}
-
-static hb_position_t
-hb_ot_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)
-{
-  /* OpenType doesn't have vertical-kerning other than GPOS. */
-  return 0;
-}
-
-static hb_bool_t
 hb_ot_get_glyph_extents (hb_font_t *font HB_UNUSED,
                         void *font_data,
                         hb_codepoint_t glyph,
@@ -366,41 +320,6 @@ hb_ot_get_glyph_extents (hb_font_t *font HB_UNUSED,
   return ret;
 }
 
-static hb_bool_t
-hb_ot_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)
-{
-  /* TODO */
-  return false;
-}
-
-static hb_bool_t
-hb_ot_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)
-{
-  /* TODO */
-  return false;
-}
-
-static hb_bool_t
-hb_ot_get_glyph_from_name (hb_font_t *font HB_UNUSED,
-                          void *font_data,
-                          const char *name, int len, /* -1 means nul-terminated */
-                          hb_codepoint_t *glyph,
-                          void *user_data HB_UNUSED)
-{
-  /* TODO */
-  return false;
-}
-
 
 static hb_font_funcs_t *static_ot_funcs = NULL;
 
@@ -425,14 +344,14 @@ retry:
     hb_font_funcs_set_glyph_func (funcs, hb_ot_get_glyph, NULL, NULL);
     hb_font_funcs_set_glyph_h_advance_func (funcs, hb_ot_get_glyph_h_advance, NULL, NULL);
     hb_font_funcs_set_glyph_v_advance_func (funcs, hb_ot_get_glyph_v_advance, NULL, NULL);
-    hb_font_funcs_set_glyph_h_origin_func (funcs, hb_ot_get_glyph_h_origin, NULL, NULL);
-    hb_font_funcs_set_glyph_v_origin_func (funcs, hb_ot_get_glyph_v_origin, NULL, NULL);
-    hb_font_funcs_set_glyph_h_kerning_func (funcs, hb_ot_get_glyph_h_kerning, NULL, NULL);
-    hb_font_funcs_set_glyph_v_kerning_func (funcs, hb_ot_get_glyph_v_kerning, NULL, NULL);
+    //hb_font_funcs_set_glyph_h_origin_func (funcs, hb_ot_get_glyph_h_origin, NULL, NULL);
+    //hb_font_funcs_set_glyph_v_origin_func (funcs, hb_ot_get_glyph_v_origin, NULL, NULL);
+    //hb_font_funcs_set_glyph_h_kerning_func (funcs, hb_ot_get_glyph_h_kerning, NULL, NULL); TODO
+    //hb_font_funcs_set_glyph_v_kerning_func (funcs, hb_ot_get_glyph_v_kerning, NULL, NULL);
     hb_font_funcs_set_glyph_extents_func (funcs, hb_ot_get_glyph_extents, NULL, NULL);
-    hb_font_funcs_set_glyph_contour_point_func (funcs, hb_ot_get_glyph_contour_point, NULL, NULL);
-    hb_font_funcs_set_glyph_name_func (funcs, hb_ot_get_glyph_name, NULL, NULL);
-    hb_font_funcs_set_glyph_from_name_func (funcs, hb_ot_get_glyph_from_name, NULL, NULL);
+    //hb_font_funcs_set_glyph_contour_point_func (funcs, hb_ot_get_glyph_contour_point, NULL, NULL); TODO
+    //hb_font_funcs_set_glyph_name_func (funcs, hb_ot_get_glyph_name, NULL, NULL); TODO
+    //hb_font_funcs_set_glyph_from_name_func (funcs, hb_ot_get_glyph_from_name, NULL, NULL); TODO
 
     hb_font_funcs_make_immutable (funcs);