27 #ifndef HB_OT_MATH_TABLE_HH
28 #define HB_OT_MATH_TABLE_HH
47 auto *
out =
c->embed (
this);
75 auto *
out =
c->start_embed (
this);
84 memcpy (
m,
minHeight, HBUINT16::static_size * 2);
100 for (
unsigned int i = 0;
i <
count;
i++)
204 const hb_set_t &glyphset = *
c->plan->_glyphset_mathed;
205 const hb_map_t &glyph_map = *
c->plan->glyph_map;
207 auto *
out =
c->serializer->start_embed (*
this);
212 | hb_filter (glyphset, hb_first)
213 | hb_filter (serialize_math_record_array (
c->serializer,
out->italicsCorrection,
this), hb_second)
216 | hb_sink (new_coverage)
219 out->coverage.serialize_serialize (
c->serializer, new_coverage.
iter ());
257 const hb_set_t &glyphset = *
c->plan->_glyphset_mathed;
258 const hb_map_t &glyph_map = *
c->plan->glyph_map;
260 auto *
out =
c->serializer->start_embed (*
this);
265 | hb_filter (glyphset, hb_first)
266 | hb_filter (serialize_math_record_array (
c->serializer,
out->topAccentAttachment,
this), hb_second)
269 | hb_sink (new_coverage)
272 out->topAccentCoverage.serialize_serialize (
c->serializer, new_coverage.
iter ());
289 return font->get_glyph_h_advance (glyph) / 2;
312 auto *
out =
c->start_embed (
this);
318 for (
unsigned i = 0;
i <
count;
i++)
329 for (
unsigned int i = 0;
i <
count;
i++)
346 int sign =
font->y_scale < 0 ? -1 : +1;
360 unsigned int half =
count / 2;
362 if (sign *
height < sign * correction_height)
373 unsigned int *entries_count,
384 unsigned int end = hb_min (
start + *entries_count, entriesCount);
387 for (
unsigned int i = 0;
i < *entries_count;
i++) {
392 max_height = INT32_MAX;
425 auto *
out =
c->embed (
this);
429 for (
unsigned i = 0;
i <
count;
i++)
440 for (
unsigned int i = 0;
i <
count;
i++)
450 const void *
base)
const
459 unsigned int *entries_count,
462 const void *
base)
const
466 if (entries_count) *entries_count = 0;
489 const hb_set_t &glyphset = *
c->plan->_glyphset_mathed;
490 const hb_map_t &glyph_map = *
c->plan->glyph_map;
492 auto *
out =
c->serializer->start_embed (*
this);
497 | hb_filter (glyphset, hb_first)
498 | hb_filter (serialize_math_record_array (
c->serializer,
out->mathKernInfoRecords,
this), hb_second)
501 | hb_sink (new_coverage)
504 out->mathKernCoverage.serialize_serialize (
c->serializer, new_coverage.
iter ());
528 unsigned int *entries_count,
564 auto *
out =
c->serializer->embed (*
this);
570 const hb_set_t &glyphset = *
c->plan->_glyphset_mathed;
571 const hb_map_t &glyph_map = *
c->plan->glyph_map;
575 | hb_filter (glyphset)
576 | hb_map_retains_sorting (glyph_map)
579 if (
it)
out->extendedShapeCoverage.serialize_serialize (
c->serializer,
it);
580 else out->extendedShapeCoverage = 0;
616 unsigned int *entries_count,
657 auto *
out =
c->serializer->embed (
this);
660 const hb_map_t& glyph_map = *
c->plan->glyph_map;
700 auto *
out =
c->serializer->embed (
this);
703 const hb_map_t& glyph_map = *
c->plan->glyph_map;
760 auto *
out =
c->serializer->start_embed (*
this);
782 unsigned int *parts_count,
791 _.first.extract (
_.second, mult,
font);
794 if (italics_correction)
803 _.closure_glyphs (variant_glyphs);
826 auto *
out =
c->serializer->start_embed (*
this);
852 unsigned int *variants_count,
859 hb_array (variants, *variants_count)))
860 _.second = {
_.first.variantGlyph,
font->em_mult (
_.first.advanceMeasurement, mult)};
870 _.closure_glyphs (variant_glyphs);
896 | hb_filter (glyph_set, hb_first)
907 | hb_filter (glyph_set, hb_first)
923 if (!coverage)
return;
925 for (
const auto _ : (
this+coverage).
iter ())
927 if (
i >= end_index)
return;
928 if (glyphset.
has (
_))
930 unsigned new_gid = glyph_map.
get (
_);
931 new_coverage.
push (new_gid);
941 const hb_set_t &glyphset = *
c->plan->_glyphset_mathed;
942 const hb_map_t &glyph_map = *
c->plan->glyph_map;
944 auto *
out =
c->serializer->start_embed (*
this);
967 if (new_vert_coverage)
968 out->vertGlyphCoverage.serialize_serialize (
c->serializer, new_vert_coverage.
iter ());
970 if (new_hori_coverage)
971 out->horizGlyphCoverage.serialize_serialize (
c->serializer, new_hori_coverage.
iter ());
979 for (
unsigned int i = 0;
i <
count;
i++)
1002 unsigned int *variants_count,
1011 unsigned int *parts_count,
1018 italics_correction); }
1031 unsigned int index = (
this+coverage).get_coverage (glyph);
1095 auto *
out =
c->serializer->embed (*
this);
small capitals from c petite p scientific i
[1]
hb_array_t< T > hb_array(T *array, unsigned int length)
#define TRACE_SERIALIZE(this)
#define TRACE_SANITIZE(this)
#define return_trace(RET)
#define TRACE_SUBSET(this)
void const void *obj HB_UNUSED
auto it hb_map(hb_second)) template< typename Type > inline hb_array_t< Type > operator()(hb_array_t< Type > array
HB_EXTERN unsigned int start_offset
@ HB_SERIALIZE_ERROR_INT_OVERFLOW
void hb_set_union(hb_set_t *set, const hb_set_t *other)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
EGLOutputLayerEXT EGLint EGLAttrib value
GLint GLsizei GLsizei height
GLenum GLenum GLsizei count
GLsizei GLenum const void * indices
#define HB_DIRECTION_IS_VERTICAL(dir)
hb_ot_math_glyph_part_flags_t
@ HB_OT_MATH_GLYPH_PART_FLAG_EXTENDER
@ HB_OT_MATH_CONSTANT_SUBSCRIPT_TOP_MAX
@ HB_OT_MATH_CONSTANT_FLATTENED_ACCENT_BASE_HEIGHT
@ HB_OT_MATH_CONSTANT_ACCENT_BASE_HEIGHT
@ HB_OT_MATH_CONSTANT_SPACE_AFTER_SCRIPT
@ HB_OT_MATH_CONSTANT_RADICAL_EXTRA_ASCENDER
@ HB_OT_MATH_CONSTANT_UPPER_LIMIT_BASELINE_RISE_MIN
@ HB_OT_MATH_CONSTANT_STRETCH_STACK_TOP_SHIFT_UP
@ HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP_CRAMPED
@ HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_SHIFT_UP
@ HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP
@ HB_OT_MATH_CONSTANT_AXIS_HEIGHT
@ HB_OT_MATH_CONSTANT_FRACTION_NUM_DISPLAY_STYLE_GAP_MIN
@ HB_OT_MATH_CONSTANT_UPPER_LIMIT_GAP_MIN
@ HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_GAP_MIN
@ HB_OT_MATH_CONSTANT_UNDERBAR_VERTICAL_GAP
@ HB_OT_MATH_CONSTANT_STACK_TOP_SHIFT_UP
@ HB_OT_MATH_CONSTANT_STRETCH_STACK_BOTTOM_SHIFT_DOWN
@ HB_OT_MATH_CONSTANT_STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN
@ HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN
@ HB_OT_MATH_CONSTANT_SKEWED_FRACTION_HORIZONTAL_GAP
@ HB_OT_MATH_CONSTANT_STACK_TOP_DISPLAY_STYLE_SHIFT_UP
@ HB_OT_MATH_CONSTANT_RADICAL_RULE_THICKNESS
@ HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_ABOVE_MIN
@ HB_OT_MATH_CONSTANT_MATH_LEADING
@ HB_OT_MATH_CONSTANT_SKEWED_FRACTION_VERTICAL_GAP
@ HB_OT_MATH_CONSTANT_RADICAL_KERN_AFTER_DEGREE
@ HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_BELOW_MIN
@ HB_OT_MATH_CONSTANT_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT
@ HB_OT_MATH_CONSTANT_LOWER_LIMIT_BASELINE_DROP_MIN
@ HB_OT_MATH_CONSTANT_RADICAL_DISPLAY_STYLE_VERTICAL_GAP
@ HB_OT_MATH_CONSTANT_FRACTION_RULE_THICKNESS
@ HB_OT_MATH_CONSTANT_UNDERBAR_RULE_THICKNESS
@ HB_OT_MATH_CONSTANT_STACK_DISPLAY_STYLE_GAP_MIN
@ HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN
@ HB_OT_MATH_CONSTANT_UNDERBAR_EXTRA_DESCENDER
@ HB_OT_MATH_CONSTANT_SUB_SUPERSCRIPT_GAP_MIN
@ HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN
@ HB_OT_MATH_CONSTANT_LOWER_LIMIT_GAP_MIN
@ HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT
@ HB_OT_MATH_CONSTANT_FRACTION_DENOM_DISPLAY_STYLE_GAP_MIN
@ HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP
@ HB_OT_MATH_CONSTANT_OVERBAR_RULE_THICKNESS
@ HB_OT_MATH_CONSTANT_RADICAL_KERN_BEFORE_DEGREE
@ HB_OT_MATH_CONSTANT_SUBSCRIPT_BASELINE_DROP_MIN
@ HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT
@ HB_OT_MATH_CONSTANT_RADICAL_VERTICAL_GAP
@ HB_OT_MATH_CONSTANT_SUPERSCRIPT_BASELINE_DROP_MAX
@ HB_OT_MATH_CONSTANT_STACK_BOTTOM_SHIFT_DOWN
@ HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_GAP_MIN
@ HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_SHIFT_DOWN
@ HB_OT_MATH_CONSTANT_OVERBAR_EXTRA_ASCENDER
@ HB_OT_MATH_CONSTANT_OVERBAR_VERTICAL_GAP
@ HB_OT_MATH_CONSTANT_STACK_GAP_MIN
@ HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MIN
@ HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT
@ HB_OT_MATH_CONSTANT_SUBSCRIPT_SHIFT_DOWN
QTextStream out(stdout)
[7]
bool sanitize(hb_sanitize_context_t *c) const
bool subset(hb_subset_context_t *c) const
void closure_glyphs(hb_set_t *glyph_set) const
Offset16To< MathVariants > mathVariants
bool sanitize(hb_sanitize_context_t *c) const
const MathGlyphInfo & get_glyph_info() const
Offset16To< MathConstants > mathConstants
hb_position_t get_constant(hb_ot_math_constant_t constant, hb_font_t *font) const
Offset16To< MathGlyphInfo > mathGlyphInfo
static constexpr hb_tag_t tableTag
const MathVariants & get_variants() const
MathConstants * copy(hb_serialize_context_t *c) const
hb_position_t get_value(hb_ot_math_constant_t constant, hb_font_t *font) const
bool sanitize_math_value_records(hb_sanitize_context_t *c) const
bool sanitize(hb_sanitize_context_t *c) const
MathValueRecord mathValueRecords[51]
HBINT16 percentScaleDown[2]
HBINT16 radicalDegreeBottomRaisePercent
unsigned int get_parts(hb_direction_t direction, hb_font_t *font, unsigned int start_offset, unsigned int *parts_count, hb_ot_math_glyph_part_t *parts, hb_position_t *italics_correction) const
bool subset(hb_subset_context_t *c) const
MathValueRecord italicsCorrection
void closure_glyphs(hb_set_t *variant_glyphs) const
bool sanitize(hb_sanitize_context_t *c) const
Array16Of< MathGlyphPartRecord > partRecords
DEFINE_SIZE_ARRAY(6, partRecords)
unsigned int get_variants(hb_direction_t direction, hb_font_t *font, unsigned int start_offset, unsigned int *variants_count, hb_ot_math_glyph_variant_t *variants) const
void closure_glyphs(hb_set_t *variant_glyphs) const
bool subset(hb_subset_context_t *c) const
bool sanitize(hb_sanitize_context_t *c) const
Offset16To< MathGlyphAssembly > glyphAssembly
DEFINE_SIZE_ARRAY(4, mathGlyphVariantRecord)
Array16Of< MathGlyphVariantRecord > mathGlyphVariantRecord
const MathGlyphAssembly & get_assembly() const
Offset16To< MathTopAccentAttachment > mathTopAccentAttachment
bool is_extended_shape(hb_codepoint_t glyph) const
hb_position_t get_kerning(hb_codepoint_t glyph, hb_ot_math_kern_t kern, hb_position_t correction_height, hb_font_t *font) const
bool sanitize(hb_sanitize_context_t *c) const
hb_position_t get_top_accent_attachment(hb_codepoint_t glyph, hb_font_t *font) const
Offset16To< MathKernInfo > mathKernInfo
hb_position_t get_kernings(hb_codepoint_t glyph, hb_ot_math_kern_t kern, unsigned int start_offset, unsigned int *entries_count, hb_ot_math_kern_entry_t *kern_entries, hb_font_t *font) const
hb_position_t get_italics_correction(hb_codepoint_t glyph, hb_font_t *font) const
Offset16To< Coverage > extendedShapeCoverage
bool subset(hb_subset_context_t *c) const
Offset16To< MathItalicsCorrectionInfo > mathItalicsCorrectionInfo
bool subset(hb_subset_context_t *c) const
HBUINT16 startConnectorLength
HBUINT16 endConnectorLength
void closure_glyphs(hb_set_t *variant_glyphs) const
void extract(hb_ot_math_glyph_part_t &out, int64_t mult, hb_font_t *font) const
bool sanitize(hb_sanitize_context_t *c) const
void closure_glyphs(hb_set_t *variant_glyphs) const
bool sanitize(hb_sanitize_context_t *c) const
bool subset(hb_subset_context_t *c) const
HBUINT16 advanceMeasurement
bool subset(hb_subset_context_t *c) const
bool sanitize(hb_sanitize_context_t *c) const
DEFINE_SIZE_ARRAY(4, italicsCorrection)
hb_position_t get_value(hb_codepoint_t glyph, hb_font_t *font) const
Array16Of< MathValueRecord > italicsCorrection
Offset16To< Coverage > coverage
bool sanitize_math_value_records(hb_sanitize_context_t *c) const
MathKern * copy(hb_serialize_context_t *c) const
unsigned int get_entries(unsigned int start_offset, unsigned int *entries_count, hb_ot_math_kern_entry_t *kern_entries, hb_font_t *font) const
bool sanitize(hb_sanitize_context_t *c) const
hb_position_t get_value(hb_position_t correction_height, hb_font_t *font) const
UnsizedArrayOf< MathValueRecord > mathValueRecordsZ
DEFINE_SIZE_ARRAY(2, mathValueRecordsZ)
bool subset(hb_subset_context_t *c) const
Array16Of< MathKernInfoRecord > mathKernInfoRecords
hb_position_t get_kerning(hb_codepoint_t glyph, hb_ot_math_kern_t kern, hb_position_t correction_height, hb_font_t *font) const
unsigned int get_kernings(hb_codepoint_t glyph, hb_ot_math_kern_t kern, unsigned int start_offset, unsigned int *entries_count, hb_ot_math_kern_entry_t *kern_entries, hb_font_t *font) const
bool sanitize(hb_sanitize_context_t *c) const
DEFINE_SIZE_ARRAY(4, mathKernInfoRecords)
Offset16To< Coverage > mathKernCoverage
bool sanitize(hb_sanitize_context_t *c, const void *base) const
MathKernInfoRecord * copy(hb_serialize_context_t *c, const void *base) const
hb_position_t get_kerning(hb_ot_math_kern_t kern, hb_position_t correction_height, hb_font_t *font, const void *base) const
unsigned int get_kernings(hb_ot_math_kern_t kern, unsigned int start_offset, unsigned int *entries_count, hb_ot_math_kern_entry_t *kern_entries, hb_font_t *font, const void *base) const
Offset16To< MathKern > mathKern[4]
Offset16To< Coverage > topAccentCoverage
Array16Of< MathValueRecord > topAccentAttachment
hb_position_t get_value(hb_codepoint_t glyph, hb_font_t *font) const
bool subset(hb_subset_context_t *c) const
bool sanitize(hb_sanitize_context_t *c) const
DEFINE_SIZE_ARRAY(2+2, topAccentAttachment)
Offset16To< Device > deviceTable
hb_position_t get_y_value(hb_font_t *font, const void *base) const
MathValueRecord * copy(hb_serialize_context_t *c, const void *base) const
hb_position_t get_x_value(hb_font_t *font, const void *base) const
bool sanitize(hb_sanitize_context_t *c, const void *base) const
Offset16To< Coverage > horizGlyphCoverage
Offset16To< Coverage > vertGlyphCoverage
void closure_glyphs(const hb_set_t *glyph_set, hb_set_t *variant_glyphs) const
void collect_coverage_and_indices(hb_sorted_vector_t< hb_codepoint_t > &new_coverage, const Offset16To< Coverage > &coverage, unsigned i, unsigned end_index, hb_set_t &indices, const hb_set_t &glyphset, const hb_map_t &glyph_map) const
unsigned int get_glyph_parts(hb_codepoint_t glyph, hb_direction_t direction, hb_font_t *font, unsigned int start_offset, unsigned int *parts_count, hb_ot_math_glyph_part_t *parts, hb_position_t *italics_correction) const
bool subset(hb_subset_context_t *c) const
UnsizedArrayOf< Offset16To< MathGlyphConstruction > > glyphConstruction
bool sanitize(hb_sanitize_context_t *c) const
unsigned int get_glyph_variants(hb_codepoint_t glyph, hb_direction_t direction, hb_font_t *font, unsigned int start_offset, unsigned int *variants_count, hb_ot_math_glyph_variant_t *variants) const
hb_position_t get_min_connector_overlap(hb_direction_t direction, hb_font_t *font) const
bool sanitize_offsets(hb_sanitize_context_t *c) const
HBUINT16 minConnectorOverlap
DEFINE_SIZE_ARRAY(10, glyphConstruction)
hb_array_t sub_array(unsigned int start_offset=0, unsigned int *seg_count=nullptr) const
bool has(hb_codepoint_t k) const
void add(hb_codepoint_t g)