[MATH] Move API from hb-ot-layout.h to hb-ot-math.h
authorBehdad Esfahbod <behdad@behdad.org>
Mon, 26 Sep 2016 19:57:14 +0000 (21:57 +0200)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 26 Sep 2016 19:57:14 +0000 (21:57 +0200)
src/hb-ot-layout.h
src/hb-ot-math.h
src/hb-ot.h

index b6fbd00..eb23d45 100644 (file)
@@ -33,7 +33,6 @@
 
 #include "hb.h"
 
-#include "hb-ot-math.h"
 #include "hb-ot-tag.h"
 
 HB_BEGIN_DECLS
@@ -43,7 +42,6 @@ HB_BEGIN_DECLS
 #define HB_OT_TAG_GSUB HB_TAG('G','S','U','B')
 #define HB_OT_TAG_GPOS HB_TAG('G','P','O','S')
 #define HB_OT_TAG_JSTF HB_TAG('J','S','T','F')
-#define HB_OT_TAG_MATH HB_TAG('M','A','T','H')
 
 
 /*
@@ -299,56 +297,6 @@ hb_ot_layout_get_size_params (hb_face_t    *face,
                              unsigned int *range_end          /* OUT.  May be NULL */);
 
 
-/*
- * MATH
- */
-
-HB_EXTERN hb_bool_t
-hb_ot_layout_has_math_data (hb_face_t *face);
-
-HB_EXTERN hb_position_t
-hb_ot_layout_get_math_constant (hb_font_t *font,
-                               hb_ot_math_constant_t constant);
-
-HB_EXTERN hb_position_t
-hb_ot_layout_get_math_italics_correction (hb_font_t *font,
-                                         hb_codepoint_t glyph);
-
-HB_EXTERN hb_position_t
-hb_ot_layout_get_math_top_accent_attachment (hb_font_t *font,
-                                            hb_codepoint_t glyph);
-
-HB_EXTERN hb_bool_t
-hb_ot_layout_is_math_extended_shape (hb_face_t *face,
-                                    hb_codepoint_t glyph);
-
-HB_EXTERN hb_position_t
-hb_ot_layout_get_math_kerning (hb_font_t *font,
-                              hb_codepoint_t glyph,
-                              hb_ot_math_kern_t kern,
-                              hb_position_t correction_height);
-
-HB_EXTERN unsigned int
-hb_ot_layout_get_math_glyph_variants (hb_font_t *font,
-                                     hb_codepoint_t glyph,
-                                     hb_direction_t direction,
-                                     unsigned int start_offset,
-                                     unsigned int *variants_count, /* IN/OUT */
-                                     hb_math_glyph_variant_t *variants /* OUT */);
-
-HB_EXTERN hb_position_t
-hb_ot_layout_get_math_min_connector_overlap (hb_font_t *font,
-                                            hb_direction_t direction);
-
-HB_EXTERN unsigned int
-hb_ot_layout_get_math_glyph_assembly (hb_font_t *font,
-                                     hb_codepoint_t glyph,
-                                     hb_direction_t direction,
-                                     unsigned int start_offset,
-                                     unsigned int *parts_count, /* IN/OUT */
-                                     hb_math_glyph_part_t *parts, /* OUT */
-                                     hb_position_t *italics_correction /* OUT */);
-
 HB_END_DECLS
 
 #endif /* HB_OT_LAYOUT_H */
index bf37975..5ff19fd 100644 (file)
 HB_BEGIN_DECLS
 
 
+/*
+ * MATH
+ */
+
+#define HB_OT_TAG_MATH HB_TAG('M','A','T','H')
+
+/* Types */
+
 typedef enum {
   HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN = 0,
   HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN = 1,
@@ -119,6 +127,54 @@ typedef struct hb_math_glyph_part_t {
   hb_math_glyph_part_flags_t flags;
 } hb_math_glyph_part_t;
 
+/* Methods */
+
+HB_EXTERN hb_bool_t
+hb_ot_layout_has_math_data (hb_face_t *face);
+
+HB_EXTERN hb_position_t
+hb_ot_layout_get_math_constant (hb_font_t *font,
+                               hb_ot_math_constant_t constant);
+
+HB_EXTERN hb_position_t
+hb_ot_layout_get_math_italics_correction (hb_font_t *font,
+                                         hb_codepoint_t glyph);
+
+HB_EXTERN hb_position_t
+hb_ot_layout_get_math_top_accent_attachment (hb_font_t *font,
+                                            hb_codepoint_t glyph);
+
+HB_EXTERN hb_bool_t
+hb_ot_layout_is_math_extended_shape (hb_face_t *face,
+                                    hb_codepoint_t glyph);
+
+HB_EXTERN hb_position_t
+hb_ot_layout_get_math_kerning (hb_font_t *font,
+                              hb_codepoint_t glyph,
+                              hb_ot_math_kern_t kern,
+                              hb_position_t correction_height);
+
+HB_EXTERN unsigned int
+hb_ot_layout_get_math_glyph_variants (hb_font_t *font,
+                                     hb_codepoint_t glyph,
+                                     hb_direction_t direction,
+                                     unsigned int start_offset,
+                                     unsigned int *variants_count, /* IN/OUT */
+                                     hb_math_glyph_variant_t *variants /* OUT */);
+
+HB_EXTERN hb_position_t
+hb_ot_layout_get_math_min_connector_overlap (hb_font_t *font,
+                                            hb_direction_t direction);
+
+HB_EXTERN unsigned int
+hb_ot_layout_get_math_glyph_assembly (hb_font_t *font,
+                                     hb_codepoint_t glyph,
+                                     hb_direction_t direction,
+                                     unsigned int start_offset,
+                                     unsigned int *parts_count, /* IN/OUT */
+                                     hb_math_glyph_part_t *parts, /* OUT */
+                                     hb_position_t *italics_correction /* OUT */);
+
 
 HB_END_DECLS
 
index 47c92a5..113e37b 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "hb-ot-font.h"
 #include "hb-ot-layout.h"
+#include "hb-ot-math.h"
 #include "hb-ot-tag.h"
 #include "hb-ot-shape.h"