[Indic] Ra is a consonant too
[framework/uifw/harfbuzz.git] / src / hb-font-private.hh
index f60ce97..dd71b67 100644 (file)
@@ -41,6 +41,18 @@ HB_BEGIN_DECLS
  * hb_font_funcs_t
  */
 
+#define HB_FONT_FUNCS_IMPLEMENT_CALLBACKS \
+  HB_FONT_FUNC_IMPLEMENT (glyph) \
+  HB_FONT_FUNC_IMPLEMENT (glyph_h_advance) \
+  HB_FONT_FUNC_IMPLEMENT (glyph_v_advance) \
+  HB_FONT_FUNC_IMPLEMENT (glyph_h_origin) \
+  HB_FONT_FUNC_IMPLEMENT (glyph_v_origin) \
+  HB_FONT_FUNC_IMPLEMENT (glyph_h_kerning) \
+  HB_FONT_FUNC_IMPLEMENT (glyph_v_kerning) \
+  HB_FONT_FUNC_IMPLEMENT (glyph_extents) \
+  HB_FONT_FUNC_IMPLEMENT (glyph_contour_point) \
+  /* ^--- Add new callbacks here */
+
 struct _hb_font_funcs_t {
   hb_object_header_t header;
 
@@ -49,27 +61,21 @@ struct _hb_font_funcs_t {
   /* Don't access these directly.  Call hb_font_get_*() instead. */
 
   struct {
-    hb_font_get_contour_point_func_t   contour_point;
-    hb_font_get_glyph_advance_func_t   glyph_advance;
-    hb_font_get_glyph_extents_func_t   glyph_extents;
-    hb_font_get_glyph_func_t           glyph;
-    hb_font_get_kerning_func_t         kerning;
+#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_func_t name;
+    HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
   } get;
 
   struct {
-    void                               *contour_point;
-    void                               *glyph_advance;
-    void                               *glyph_extents;
-    void                               *glyph;
-    void                               *kerning;
+#define HB_FONT_FUNC_IMPLEMENT(name) void *name;
+    HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
   } user_data;
 
   struct {
-    hb_destroy_func_t                  contour_point;
-    hb_destroy_func_t                  glyph_advance;
-    hb_destroy_func_t                  glyph_extents;
-    hb_destroy_func_t                  glyph;
-    hb_destroy_func_t                  kerning;
+#define HB_FONT_FUNC_IMPLEMENT(name) hb_destroy_func_t name;
+    HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
   } destroy;
 };
 
@@ -81,6 +87,8 @@ struct _hb_font_funcs_t {
 struct _hb_face_t {
   hb_object_header_t header;
 
+  hb_bool_t immutable;
+
   hb_get_table_func_t  get_table;
   void                *user_data;
   hb_destroy_func_t    destroy;
@@ -130,10 +138,10 @@ struct _hb_font_t {
     return v;
   }
   inline hb_position_t parent_scale_x_position (hb_position_t v) {
-    return parent_scale_x_distance (v); /* We don't have translation right now */
+    return parent_scale_x_distance (v);
   }
   inline hb_position_t parent_scale_y_position (hb_position_t v) {
-    return parent_scale_y_distance (v); /* We don't have translation right now */
+    return parent_scale_y_distance (v);
   }
 
   inline void parent_scale_distance (hb_position_t *x, hb_position_t *y) {