[config] Don't compile math API if HB_NO_MATH
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
This commit is contained in:
parent
737436d3f8
commit
da51a2cb0e
|
@ -24,6 +24,10 @@
|
||||||
* Igalia Author(s): Frédéric Wang
|
* Igalia Author(s): Frédéric Wang
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "hb.hh"
|
||||||
|
|
||||||
|
#ifndef HB_NO_MATH
|
||||||
|
|
||||||
#include "hb-open-type.hh"
|
#include "hb-open-type.hh"
|
||||||
|
|
||||||
#include "hb-ot-face.hh"
|
#include "hb-ot-face.hh"
|
||||||
|
@ -62,10 +66,6 @@
|
||||||
hb_bool_t
|
hb_bool_t
|
||||||
hb_ot_math_has_data (hb_face_t *face)
|
hb_ot_math_has_data (hb_face_t *face)
|
||||||
{
|
{
|
||||||
#ifdef HB_NO_MATH
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return face->table.MATH->has_data ();
|
return face->table.MATH->has_data ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,10 +90,6 @@ hb_position_t
|
||||||
hb_ot_math_get_constant (hb_font_t *font,
|
hb_ot_math_get_constant (hb_font_t *font,
|
||||||
hb_ot_math_constant_t constant)
|
hb_ot_math_constant_t constant)
|
||||||
{
|
{
|
||||||
#ifdef HB_NO_MATH
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return font->face->table.MATH->get_constant(constant, font);
|
return font->face->table.MATH->get_constant(constant, font);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,10 +109,6 @@ hb_position_t
|
||||||
hb_ot_math_get_glyph_italics_correction (hb_font_t *font,
|
hb_ot_math_get_glyph_italics_correction (hb_font_t *font,
|
||||||
hb_codepoint_t glyph)
|
hb_codepoint_t glyph)
|
||||||
{
|
{
|
||||||
#ifdef HB_NO_MATH
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return font->face->table.MATH->get_glyph_info().get_italics_correction (glyph, font);
|
return font->face->table.MATH->get_glyph_info().get_italics_correction (glyph, font);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,10 +135,6 @@ hb_position_t
|
||||||
hb_ot_math_get_glyph_top_accent_attachment (hb_font_t *font,
|
hb_ot_math_get_glyph_top_accent_attachment (hb_font_t *font,
|
||||||
hb_codepoint_t glyph)
|
hb_codepoint_t glyph)
|
||||||
{
|
{
|
||||||
#ifdef HB_NO_MATH
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return font->face->table.MATH->get_glyph_info().get_top_accent_attachment (glyph, font);
|
return font->face->table.MATH->get_glyph_info().get_top_accent_attachment (glyph, font);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,10 +153,6 @@ hb_bool_t
|
||||||
hb_ot_math_is_glyph_extended_shape (hb_face_t *face,
|
hb_ot_math_is_glyph_extended_shape (hb_face_t *face,
|
||||||
hb_codepoint_t glyph)
|
hb_codepoint_t glyph)
|
||||||
{
|
{
|
||||||
#ifdef HB_NO_MATH
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return face->table.MATH->get_glyph_info().is_extended_shape (glyph);
|
return face->table.MATH->get_glyph_info().is_extended_shape (glyph);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,10 +181,6 @@ hb_ot_math_get_glyph_kerning (hb_font_t *font,
|
||||||
hb_ot_math_kern_t kern,
|
hb_ot_math_kern_t kern,
|
||||||
hb_position_t correction_height)
|
hb_position_t correction_height)
|
||||||
{
|
{
|
||||||
#ifdef HB_NO_MATH
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return font->face->table.MATH->get_glyph_info().get_kerning (glyph,
|
return font->face->table.MATH->get_glyph_info().get_kerning (glyph,
|
||||||
kern,
|
kern,
|
||||||
correction_height,
|
correction_height,
|
||||||
|
@ -238,12 +218,6 @@ hb_ot_math_get_glyph_variants (hb_font_t *font,
|
||||||
unsigned int *variants_count, /* IN/OUT */
|
unsigned int *variants_count, /* IN/OUT */
|
||||||
hb_ot_math_glyph_variant_t *variants /* OUT */)
|
hb_ot_math_glyph_variant_t *variants /* OUT */)
|
||||||
{
|
{
|
||||||
#ifdef HB_NO_MATH
|
|
||||||
if (variants_count)
|
|
||||||
*variants_count = 0;
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return font->face->table.MATH->get_variants().get_glyph_variants (glyph, direction, font,
|
return font->face->table.MATH->get_variants().get_glyph_variants (glyph, direction, font,
|
||||||
start_offset,
|
start_offset,
|
||||||
variants_count,
|
variants_count,
|
||||||
|
@ -272,10 +246,6 @@ hb_position_t
|
||||||
hb_ot_math_get_min_connector_overlap (hb_font_t *font,
|
hb_ot_math_get_min_connector_overlap (hb_font_t *font,
|
||||||
hb_direction_t direction)
|
hb_direction_t direction)
|
||||||
{
|
{
|
||||||
#ifdef HB_NO_MATH
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return font->face->table.MATH->get_variants().get_min_connector_overlap (direction, font);
|
return font->face->table.MATH->get_variants().get_min_connector_overlap (direction, font);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,12 +283,6 @@ hb_ot_math_get_glyph_assembly (hb_font_t *font,
|
||||||
hb_ot_math_glyph_part_t *parts, /* OUT */
|
hb_ot_math_glyph_part_t *parts, /* OUT */
|
||||||
hb_position_t *italics_correction /* OUT */)
|
hb_position_t *italics_correction /* OUT */)
|
||||||
{
|
{
|
||||||
#ifdef HB_NO_MATH
|
|
||||||
if (parts_count)
|
|
||||||
*parts_count = 0;
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return font->face->table.MATH->get_variants().get_glyph_parts (glyph,
|
return font->face->table.MATH->get_variants().get_glyph_parts (glyph,
|
||||||
direction,
|
direction,
|
||||||
font,
|
font,
|
||||||
|
@ -327,3 +291,6 @@ hb_ot_math_get_glyph_assembly (hb_font_t *font,
|
||||||
parts,
|
parts,
|
||||||
italics_correction);
|
italics_correction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue