summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-11-19 04:05:47 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-11-19 04:05:47 +0000
commita0f9dd8213083d3021d12beceb451325ee8fce30 (patch)
treec3de2c62a20cf8b71dbe6d968f463e8c5b76fc26 /Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc
parenta34ffc9669bd1c626c01adc0292ee625b3ad16de (diff)
harfbuzz-2.1.3
git-svn-id: svn://tug.org/texlive/trunk@49193 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc53
1 files changed, 21 insertions, 32 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc
index 3fb720b20f7..bd31bf565ab 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc
@@ -40,14 +40,6 @@
**/
-static inline const OT::MATH&
-_get_math (hb_face_t *face)
-{
- if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::MATH);
- hb_ot_face_data_t * data = hb_ot_face_data (face);
- return *(data->MATH);
-}
-
/*
* OT::MATH
*/
@@ -66,7 +58,7 @@ _get_math (hb_face_t *face)
hb_bool_t
hb_ot_math_has_data (hb_face_t *face)
{
- return _get_math (face).has_data ();
+ return face->table.MATH->has_data ();
}
/**
@@ -88,8 +80,7 @@ hb_position_t
hb_ot_math_get_constant (hb_font_t *font,
hb_ot_math_constant_t constant)
{
- const OT::MATH &math = _get_math (font->face);
- return math.get_constant(constant, font);
+ return font->face->table.MATH->get_constant(constant, font);
}
/**
@@ -105,8 +96,7 @@ hb_position_t
hb_ot_math_get_glyph_italics_correction (hb_font_t *font,
hb_codepoint_t glyph)
{
- const OT::MATH &math = _get_math (font->face);
- return math.get_math_glyph_info().get_italics_correction (glyph, font);
+ return font->face->table.MATH->get_glyph_info().get_italics_correction (glyph, font);
}
/**
@@ -122,8 +112,7 @@ hb_position_t
hb_ot_math_get_glyph_top_accent_attachment (hb_font_t *font,
hb_codepoint_t glyph)
{
- const OT::MATH &math = _get_math (font->face);
- return math.get_math_glyph_info().get_top_accent_attachment (glyph, font);
+ return font->face->table.MATH->get_glyph_info().get_top_accent_attachment (glyph, font);
}
/**
@@ -139,8 +128,7 @@ hb_bool_t
hb_ot_math_is_glyph_extended_shape (hb_face_t *face,
hb_codepoint_t glyph)
{
- const OT::MATH &math = _get_math (face);
- return math.get_math_glyph_info().is_extended_shape (glyph);
+ return face->table.MATH->get_glyph_info().is_extended_shape (glyph);
}
/**
@@ -166,8 +154,10 @@ hb_ot_math_get_glyph_kerning (hb_font_t *font,
hb_ot_math_kern_t kern,
hb_position_t correction_height)
{
- const OT::MATH &math = _get_math (font->face);
- return math.get_math_glyph_info().get_kerning (glyph, kern, correction_height, font);
+ return font->face->table.MATH->get_glyph_info().get_kerning (glyph,
+ kern,
+ correction_height,
+ font);
}
/**
@@ -197,11 +187,10 @@ hb_ot_math_get_glyph_variants (hb_font_t *font,
unsigned int *variants_count, /* IN/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,
- start_offset,
- variants_count,
- variants);
+ return font->face->table.MATH->get_variants().get_glyph_variants (glyph, direction, font,
+ start_offset,
+ variants_count,
+ variants);
}
/**
@@ -222,8 +211,7 @@ hb_position_t
hb_ot_math_get_min_connector_overlap (hb_font_t *font,
hb_direction_t direction)
{
- const OT::MATH &math = _get_math (font->face);
- return math.get_math_variants().get_min_connector_overlap (direction, font);
+ return font->face->table.MATH->get_variants().get_min_connector_overlap (direction, font);
}
/**
@@ -255,10 +243,11 @@ hb_ot_math_get_glyph_assembly (hb_font_t *font,
hb_ot_math_glyph_part_t *parts, /* OUT */
hb_position_t *italics_correction /* OUT */)
{
- const OT::MATH &math = _get_math (font->face);
- return math.get_math_variants().get_glyph_parts (glyph, direction, font,
- start_offset,
- parts_count,
- parts,
- italics_correction);
+ return font->face->table.MATH->get_variants().get_glyph_parts (glyph,
+ direction,
+ font,
+ start_offset,
+ parts_count,
+ parts,
+ italics_correction);
}