提交 46cc4a3a 编写于 作者: B Behdad Esfahbod

[MATH] Rename hb_math_*_t types to hb_ot_math_*_t

With this, I believe MATH table API is not ready to be merged.
上级 db5ebcf1
......@@ -426,10 +426,10 @@ Xhb_ot_layout_lookup_substitute
<FILE>hb-ot-math</FILE>
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
......
......@@ -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 ()
......
......@@ -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);
......
......@@ -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 */);
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册