diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index d94cf703e..75d749293 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -426,10 +426,10 @@ Xhb_ot_layout_lookup_substitute hb-ot-math HB_OT_TAG_MATH HB_OT_MATH_SCRIPT -hb_math_glyph_part_flags_t -hb_math_glyph_part_t -hb_math_glyph_variant_t hb_ot_math_constant_t +hb_ot_math_glyph_part_flags_t +hb_ot_math_glyph_part_t +hb_ot_math_glyph_variant_t hb_ot_math_get_constant hb_ot_math_get_glyph_assembly hb_ot_math_get_glyph_italics_correction diff --git a/src/hb-ot-layout-math-table.hh b/src/hb-ot-layout-math-table.hh index efffd2b53..b52b1215d 100644 --- a/src/hb-ot-layout-math-table.hh +++ b/src/hb-ot-layout-math-table.hh @@ -453,7 +453,7 @@ struct MathGlyphPartRecord return_trace (c->check_struct (this)); } - inline void extract (hb_math_glyph_part_t &out, + inline void extract (hb_ot_math_glyph_part_t &out, int scale, hb_font_t *font) const { @@ -466,7 +466,7 @@ struct MathGlyphPartRecord ASSERT_STATIC ((unsigned int) HB_MATH_GLYPH_PART_FLAG_EXTENDER == (unsigned int) PartFlags::Extender); - out.flags = (hb_math_glyph_part_flags_t) + out.flags = (hb_ot_math_glyph_part_flags_t) (unsigned int) (partFlags & PartFlags::Defined); } @@ -504,7 +504,7 @@ struct MathGlyphAssembly hb_font_t *font, unsigned int start_offset, unsigned int *parts_count, /* IN/OUT */ - hb_math_glyph_part_t *parts /* OUT */, + hb_ot_math_glyph_part_t *parts /* OUT */, hb_position_t *italics_correction /* OUT */) const { if (parts_count) @@ -552,7 +552,7 @@ struct MathGlyphConstruction hb_font_t *font, unsigned int start_offset, unsigned int *variants_count, /* IN/OUT */ - hb_math_glyph_variant_t *variants /* OUT */) const + hb_ot_math_glyph_variant_t *variants /* OUT */) const { if (variants_count) { @@ -613,7 +613,7 @@ struct MathVariants hb_font_t *font, unsigned int start_offset, unsigned int *variants_count, /* IN/OUT */ - hb_math_glyph_variant_t *variants /* OUT */) const + hb_ot_math_glyph_variant_t *variants /* OUT */) const { return get_glyph_construction (glyph, direction, font) .get_variants (direction, font, start_offset, variants_count, variants); } @@ -622,7 +622,7 @@ struct MathVariants hb_font_t *font, unsigned int start_offset, unsigned int *parts_count, /* IN/OUT */ - hb_math_glyph_part_t *parts /* OUT */, + hb_ot_math_glyph_part_t *parts /* OUT */, hb_position_t *italics_correction /* OUT */) const { return get_glyph_construction (glyph, direction, font) .get_assembly () diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 210af505d..49c75b0be 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -1366,7 +1366,7 @@ hb_ot_math_get_glyph_kerning (hb_font_t *font, * This function tries to retrieve the MathGlyphConstruction for the specified * font, glyph and direction. Note that only the value of * #HB_DIRECTION_IS_HORIZONTAL is considered. It provides the corresponding list - * of size variants as an array of hb_math_glyph_variant_t structs. + * of size variants as an array of hb_ot_math_glyph_variant_t structs. * * Return value: the total number of size variants available or 0 * @@ -1378,7 +1378,7 @@ hb_ot_math_get_glyph_variants (hb_font_t *font, hb_direction_t direction, unsigned int start_offset, unsigned int *variants_count, /* IN/OUT */ - hb_math_glyph_variant_t *variants /* OUT */) + hb_ot_math_glyph_variant_t *variants /* OUT */) { const OT::MATH &math = _get_math (font->face); return math.get_math_variants().get_glyph_variants (glyph, direction, font, @@ -1425,7 +1425,7 @@ hb_ot_math_get_min_connector_overlap (hb_font_t *font, * This function tries to retrieve the GlyphAssembly for the specified font, * glyph and direction. Note that only the value of #HB_DIRECTION_IS_HORIZONTAL * is considered. It provides the information necessary to draw the glyph - * assembly as an array of #hb_math_glyph_part_t. + * assembly as an array of #hb_ot_math_glyph_part_t. * * Return value: the total number of parts in the glyph assembly * @@ -1437,7 +1437,7 @@ hb_ot_math_get_glyph_assembly (hb_font_t *font, hb_direction_t direction, unsigned int start_offset, unsigned int *parts_count, /* IN/OUT */ - hb_math_glyph_part_t *parts, /* OUT */ + hb_ot_math_glyph_part_t *parts, /* OUT */ hb_position_t *italics_correction /* OUT */) { const OT::MATH &math = _get_math (font->face); diff --git a/src/hb-ot-math.h b/src/hb-ot-math.h index 814e40424..e186fa989 100644 --- a/src/hb-ot-math.h +++ b/src/hb-ot-math.h @@ -113,22 +113,22 @@ typedef enum { HB_OT_MATH_KERN_BOTTOM_LEFT = 3 } hb_ot_math_kern_t; -typedef struct hb_math_glyph_variant_t { +typedef struct hb_ot_math_glyph_variant_t { hb_codepoint_t glyph; hb_position_t advance; -} hb_math_glyph_variant_t; +} hb_ot_math_glyph_variant_t; typedef enum { /*< flags >*/ HB_MATH_GLYPH_PART_FLAG_EXTENDER = 0x00000001u /* Extender glyph */ -} hb_math_glyph_part_flags_t; +} hb_ot_math_glyph_part_flags_t; -typedef struct hb_math_glyph_part_t { +typedef struct hb_ot_math_glyph_part_t { hb_codepoint_t glyph; hb_position_t start_connector_length; hb_position_t end_connector_length; hb_position_t full_advance; - hb_math_glyph_part_flags_t flags; -} hb_math_glyph_part_t; + hb_ot_math_glyph_part_flags_t flags; +} hb_ot_math_glyph_part_t; /* Methods */ @@ -163,7 +163,7 @@ hb_ot_math_get_glyph_variants (hb_font_t *font, hb_direction_t direction, unsigned int start_offset, unsigned int *variants_count, /* IN/OUT */ - hb_math_glyph_variant_t *variants /* OUT */); + hb_ot_math_glyph_variant_t *variants /* OUT */); HB_EXTERN hb_position_t hb_ot_math_get_min_connector_overlap (hb_font_t *font, @@ -175,7 +175,7 @@ hb_ot_math_get_glyph_assembly (hb_font_t *font, hb_direction_t direction, unsigned int start_offset, unsigned int *parts_count, /* IN/OUT */ - hb_math_glyph_part_t *parts, /* OUT */ + hb_ot_math_glyph_part_t *parts, /* OUT */ hb_position_t *italics_correction /* OUT */); diff --git a/test/api/test-ot-math.c b/test/api/test-ot-math.c index 4d6f67bcd..5f4ccb7fc 100644 --- a/test/api/test-ot-math.c +++ b/test/api/test-ot-math.c @@ -459,7 +459,7 @@ test_get_glyph_variants (void) NULL), ==, 0); g_assert(hb_font_get_glyph_from_name (hb_font, "arrowleft", -1, &glyph)); - hb_math_glyph_variant_t variants[20]; + hb_ot_math_glyph_variant_t variants[20]; unsigned variantsSize = sizeof (variants) / sizeof (variants[0]); unsigned int count; unsigned int offset = 0; @@ -586,7 +586,7 @@ test_get_glyph_assembly (void) NULL), ==, 0); g_assert(hb_font_get_glyph_from_name (hb_font, "arrowright", -1, &glyph)); - hb_math_glyph_part_t parts[20]; + hb_ot_math_glyph_part_t parts[20]; unsigned partsSize = sizeof (parts) / sizeof (parts[0]); unsigned int count; unsigned int offset = 0;