/usr/share/gtk-doc/html/harfbuzz
NameSizeModeActions
a-clustering-example-for-levels-0-and-1.html53070644editdlrm
aat-shaping.html23590644editdlrm
adding-text-to-the-buffer.html58000644editdlrm
annotation-glossary.html56440644editdlrm
api-index-0-9-2.html444470644editdlrm
api-index-0-9-5.html33390644editdlrm
api-index-0-9-7.html123060644editdlrm
api-index-0-9-8.html20880644editdlrm
api-index-0-9-10.html32000644editdlrm
api-index-0-9-11.html20700644editdlrm
api-index-0-9-20.html23030644editdlrm
api-index-0-9-22.html21150644editdlrm
api-index-0-9-28.html20620644editdlrm
api-index-0-9-30.html25250644editdlrm
api-index-0-9-31.html29320644editdlrm
api-index-0-9-38.html38220644editdlrm
api-index-0-9-39.html20580644editdlrm
api-index-0-9-41.html20670644editdlrm
api-index-0-9-42.html25870644editdlrm
api-index-1-0-5.html27370644editdlrm
api-index-1-1-2.html23740644editdlrm
api-index-1-1-3.html29570644editdlrm
api-index-1-2-3.html28720644editdlrm
api-index-1-3-3.html55360644editdlrm
api-index-1-4-0.html23470644editdlrm
api-index-1-4-2.html53690644editdlrm
api-index-1-4-3.html20290644editdlrm
api-index-1-5-0.html29000644editdlrm
api-index-1-6-0.html22660644editdlrm
api-index-1-7-5.html17010644editdlrm
api-index-1-7-7.html55500644editdlrm
api-index-1-8-0.html26620644editdlrm
api-index-1-8-1.html24850644editdlrm
api-index-1-8-5.html20880644editdlrm
api-index-1-8-6.html31870644editdlrm
api-index-1-9-0.html34600644editdlrm
api-index-2-0-0.html59260644editdlrm
api-index-2-1-0.html80690644editdlrm
api-index-2-2-0.html53260644editdlrm
api-index-2-3-0.html26500644editdlrm
api-index-2-4-0.html20870644editdlrm
api-index-2-5-0.html21080644editdlrm
api-index-2-6-0.html52400644editdlrm
api-index-2-7-3.html28240644editdlrm
api-index-full.html1403400644editdlrm
buffers-language-script-and-direction.html49510644editdlrm
building.html153460644editdlrm
ch01s03.html44950644editdlrm
ch03s02.html60780644editdlrm
ch03s03.html45800644editdlrm
ch12.html35570644editdlrm
ch13.html30780644editdlrm
ch14.html18760644editdlrm
ch15.html30440644editdlrm
clusters.html64990644editdlrm
complex-scripts.html30010644editdlrm
customizing-unicode-functions.html64000644editdlrm
deprecated-api-index.html62230644editdlrm
fonts-and-faces-custom-functions.html73980644editdlrm
fonts-and-faces-native-opentype.html51960644editdlrm
fonts-and-faces-variable.html53040644editdlrm
fonts-and-faces.html76710644editdlrm
getting-started.html50430644editdlrm
graphite-shaping.html23080644editdlrm
harfbuzz-hb-aat-layout.html1393450644editdlrm
harfbuzz-hb-blob.html359020644editdlrm
harfbuzz-hb-buffer.html1954910644editdlrm
harfbuzz-hb-common.html653230644editdlrm
harfbuzz-hb-coretext.html113710644editdlrm
harfbuzz-hb-deprecated.html253280644editdlrm
harfbuzz-hb-directwrite.html61550644editdlrm
harfbuzz-hb-face.html521000644editdlrm
harfbuzz-hb-font.html2626960644editdlrm
harfbuzz-hb-ft.html287190644editdlrm
harfbuzz-hb-gdi.html43100644editdlrm
harfbuzz-hb-glib.html100860644editdlrm
harfbuzz-hb-gobject.html29530644editdlrm
harfbuzz-hb-graphite2.html58280644editdlrm
harfbuzz-hb-icu.html79690644editdlrm
harfbuzz-hb-map.html291880644editdlrm
harfbuzz-hb-ot-color.html399490644editdlrm
harfbuzz-hb-ot-font.html46300644editdlrm
harfbuzz-hb-ot-layout.html1450880644editdlrm
harfbuzz-hb-ot-math.html528860644editdlrm
harfbuzz-hb-ot-meta.html102860644editdlrm
harfbuzz-hb-ot-metrics.html179270644editdlrm
harfbuzz-hb-ot-name.html196030644editdlrm
harfbuzz-hb-ot-shape.html62570644editdlrm
harfbuzz-hb-ot-var.html367080644editdlrm
harfbuzz-hb-set.html594230644editdlrm
harfbuzz-hb-shape-plan.html384120644editdlrm
harfbuzz-hb-shape.html117020644editdlrm
harfbuzz-hb-unicode.html1067010644editdlrm
harfbuzz-hb-uniscribe.html60990644editdlrm
harfbuzz-hb-version.html104150644editdlrm
harfbuzz.devhelp21794570644editdlrm
HarfBuzz.png62540644editdlrm
HarfBuzz.svg67450644editdlrm
home.png1690644editdlrm
index.html195660644editdlrm
install-harfbuzz.html37870644editdlrm
integration-coretext.html64830644editdlrm
integration-freetype.html92930644editdlrm
integration-icu.html41860644editdlrm
integration-python.html31810644editdlrm
integration-uniscribe.html67250644editdlrm
integration.html99360644editdlrm
left-insensitive.png3340644editdlrm
left.png1850644editdlrm
level-2.html70090644editdlrm
object-model-blobs.html29020644editdlrm
object-model-lifecycle.html49780644editdlrm
object-model-object-types.html41110644editdlrm
object-model-user-data.html32550644editdlrm
object-model.html39780644editdlrm
opentype-shaping-models.html44630644editdlrm
pt01.html94170644editdlrm
pt02.html126740644editdlrm
reordering-in-levels-0-and-1.html31020644editdlrm
right-insensitive.png2330644editdlrm
right.png1840644editdlrm
setting-buffer-properties.html78300644editdlrm
shaping-and-shape-plans.html81960644editdlrm
shaping-concepts.html38690644editdlrm
shaping-opentype-features.html66630644editdlrm
shaping-operations.html45370644editdlrm
shaping-plans-and-caching.html46410644editdlrm
shaping-shaper-selection.html34060644editdlrm
style.css116060644editdlrm
text-runs.html25330644editdlrm
the-distinction-between-levels-0-and-1.html48640644editdlrm
unicode-character-categories.html42040644editdlrm
up-insensitive.png2880644editdlrm
up.png1860644editdlrm
utilities-common-types-apis.html43650644editdlrm
utilities-ucdn.html26320644editdlrm
utilities.html92740644editdlrm
what-harfbuzz-doesnt-do.html55350644editdlrm
what-is-harfbuzz.html55030644editdlrm
why-do-i-need-a-shaping-engine.html81240644editdlrm
why-is-it-called-harfbuzz.html21710644editdlrm
working-with-harfbuzz-clusters.html100830644editdlrm
Edit: /usr/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-math.html (52886B)
hb-ot-math: HarfBuzz Manual

hb-ot-math

hb-ot-math — OpenType Math information

Includes

#include <hb-ot.h>

Description

Functions for fetching mathematics layout data from OpenType fonts.

HarfBuzz itself does not implement a math layout solution. The functions and types provided can be used by client programs to access the font data necessary for typesetting OpenType Math layout.

Functions

hb_ot_math_has_data ()

hb_bool_t
hb_ot_math_has_data (hb_face_t *face);

Tests whether a face has a MATH table.

Parameters

face

hb_face_t to test

 

Returns

true if the table is found, false otherwise

Since: 1.3.3


hb_ot_math_get_constant ()

hb_position_t
hb_ot_math_get_constant (hb_font_t *font,
                         hb_ot_math_constant_t constant);

Fetches the specified math constant. For most constants, the value returned is an hb_position_t.

However, if the requested constant is HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN, HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN or HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN, then the return value is an integer between 0 and 100 representing that percentage.

Parameters

font

hb_font_t to work upon

 

constant

hb_ot_math_constant_t the constant to retrieve

 

Returns

the requested constant or zero

Since: 1.3.3


hb_ot_math_get_glyph_italics_correction ()

hb_position_t
hb_ot_math_get_glyph_italics_correction
                               (hb_font_t *font,
                                hb_codepoint_t glyph);

Fetches an italics-correction value (if one exists) for the specified glyph index.

Parameters

font

hb_font_t to work upon

 

glyph

The glyph index from which to retrieve the value

 

Returns

the italics correction of the glyph or zero

Since: 1.3.3


hb_ot_math_get_glyph_top_accent_attachment ()

hb_position_t
hb_ot_math_get_glyph_top_accent_attachment
                               (hb_font_t *font,
                                hb_codepoint_t glyph);

Fetches a top-accent-attachment value (if one exists) for the specified glyph index.

For any glyph that does not have a top-accent-attachment value - that is, a glyph not covered by the MathTopAccentAttachment table (or, when font has no MathTopAccentAttachment table or no MATH table, any glyph) - the function synthesizes a value, returning the position at one-half the glyph's advance width.

Parameters

font

hb_font_t to work upon

 

glyph

The glyph index from which to retrieve the value

 

Returns

the top accent attachment of the glyph or 0.5 * the advance width of glyph

Since: 1.3.3


hb_ot_math_get_glyph_kerning ()

hb_position_t
hb_ot_math_get_glyph_kerning (hb_font_t *font,
                              hb_codepoint_t glyph,
                              hb_ot_math_kern_t kern,
                              hb_position_t correction_height);

Fetches the math kerning (cut-ins) value for the specified font, glyph index, and kern .

If the MathKern table is found, the function examines it to find a height value that is greater or equal to correction_height . If such a height value is found, corresponding kerning value from the table is returned. If no such height value is found, the last kerning value is returned.

Parameters

font

hb_font_t to work upon

 

glyph

The glyph index from which to retrieve the value

 

kern

The hb_ot_math_kern_t from which to retrieve the value

 

correction_height

the correction height to use to determine the kerning.

 

Returns

requested kerning value or zero

Since: 1.3.3


hb_ot_math_is_glyph_extended_shape ()

hb_bool_t
hb_ot_math_is_glyph_extended_shape (hb_face_t *face,
                                    hb_codepoint_t glyph);

Tests whether the given glyph index is an extended shape in the face.

Parameters

face

hb_face_t to work upon

 

glyph

The glyph index to test

 

Returns

true if the glyph is an extended shape, false otherwise

Since: 1.3.3


hb_ot_math_get_glyph_variants ()

unsigned int
hb_ot_math_get_glyph_variants (hb_font_t *font,
                               hb_codepoint_t glyph,
                               hb_direction_t direction,
                               unsigned int start_offset,
                               unsigned int *variants_count,
                               hb_ot_math_glyph_variant_t *variants);

Fetches the MathGlyphConstruction for the specified font, glyph index, and direction. The corresponding list of size variants is returned as a list of hb_ot_math_glyph_variant_t structs.

The direction parameter is only used to select between horizontal or vertical directions for the construction. Even though all hb_direction_t values are accepted, only the result of HB_DIRECTION_IS_HORIZONTAL is considered.

Parameters

font

hb_font_t to work upon

 

glyph

The index of the glyph to stretch

 

direction

The direction of the stretching (horizontal or vertical)

 

start_offset

offset of the first variant to retrieve

 

variants_count

Input = the maximum number of variants to return; Output = the actual number of variants returned.

[inout]

variants

array of variants returned.

[out][array length=variants_count]

Returns

the total number of size variants available or zero

Since: 1.3.3


hb_ot_math_get_min_connector_overlap ()

hb_position_t
hb_ot_math_get_min_connector_overlap (hb_font_t *font,
                                      hb_direction_t direction);

Fetches the MathVariants table for the specified font and returns the minimum overlap of connecting glyphs that are required to draw a glyph assembly in the specified direction.

The direction parameter is only used to select between horizontal or vertical directions for the construction. Even though all hb_direction_t values are accepted, only the result of HB_DIRECTION_IS_HORIZONTAL is considered.

Parameters

font

hb_font_t to work upon

 

direction

direction of the stretching (horizontal or vertical)

 

Returns

requested minimum connector overlap or zero

Since: 1.3.3


hb_ot_math_get_glyph_assembly ()

unsigned int
hb_ot_math_get_glyph_assembly (hb_font_t *font,
                               hb_codepoint_t glyph,
                               hb_direction_t direction,
                               unsigned int start_offset,
                               unsigned int *parts_count,
                               hb_ot_math_glyph_part_t *parts,
                               hb_position_t *italics_correction);

Fetches the GlyphAssembly for the specified font, glyph index, and direction. Returned are a list of hb_ot_math_glyph_part_t glyph parts that can be used to draw the glyph and an italics-correction value (if one is defined in the font).

The direction parameter is only used to select between horizontal or vertical directions for the construction. Even though all hb_direction_t values are accepted, only the result of HB_DIRECTION_IS_HORIZONTAL is considered.

Parameters

font

hb_font_t to work upon

 

glyph

The index of the glyph to stretch

 

direction

direction of the stretching (horizontal or vertical)

 

start_offset

offset of the first glyph part to retrieve

 

parts_count

Input = maximum number of glyph parts to return; Output = actual number of parts returned.

[inout]

parts

the glyph parts returned.

[out][array length=parts_count]

italics_correction

italics correction of the glyph assembly.

[out]

Returns

the total number of parts in the glyph assembly

Since: 1.3.3

Types and Values

HB_OT_TAG_MATH

#define HB_OT_TAG_MATH HB_TAG('M','A','T','H')

HB_OT_MATH_SCRIPT

#define HB_OT_MATH_SCRIPT HB_TAG('m','a','t','h')

enum hb_ot_math_constant_t

The 'MATH' table constants specified at https://docs.microsoft.com/en-us/typography/opentype/spec/math

Members

HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN

   

HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN

   

HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT

   

HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT

   

HB_OT_MATH_CONSTANT_MATH_LEADING

   

HB_OT_MATH_CONSTANT_AXIS_HEIGHT

   

HB_OT_MATH_CONSTANT_ACCENT_BASE_HEIGHT

   

HB_OT_MATH_CONSTANT_FLATTENED_ACCENT_BASE_HEIGHT

   

HB_OT_MATH_CONSTANT_SUBSCRIPT_SHIFT_DOWN

   

HB_OT_MATH_CONSTANT_SUBSCRIPT_TOP_MAX

   

HB_OT_MATH_CONSTANT_SUBSCRIPT_BASELINE_DROP_MIN

   

HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP

   

HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP_CRAMPED

   

HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MIN

   

HB_OT_MATH_CONSTANT_SUPERSCRIPT_BASELINE_DROP_MAX

   

HB_OT_MATH_CONSTANT_SUB_SUPERSCRIPT_GAP_MIN

   

HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT

   

HB_OT_MATH_CONSTANT_SPACE_AFTER_SCRIPT

   

HB_OT_MATH_CONSTANT_UPPER_LIMIT_GAP_MIN

   

HB_OT_MATH_CONSTANT_UPPER_LIMIT_BASELINE_RISE_MIN

   

HB_OT_MATH_CONSTANT_LOWER_LIMIT_GAP_MIN

   

HB_OT_MATH_CONSTANT_LOWER_LIMIT_BASELINE_DROP_MIN

   

HB_OT_MATH_CONSTANT_STACK_TOP_SHIFT_UP

   

HB_OT_MATH_CONSTANT_STACK_TOP_DISPLAY_STYLE_SHIFT_UP

   

HB_OT_MATH_CONSTANT_STACK_BOTTOM_SHIFT_DOWN

   

HB_OT_MATH_CONSTANT_STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN

   

HB_OT_MATH_CONSTANT_STACK_GAP_MIN

   

HB_OT_MATH_CONSTANT_STACK_DISPLAY_STYLE_GAP_MIN

   

HB_OT_MATH_CONSTANT_STRETCH_STACK_TOP_SHIFT_UP

   

HB_OT_MATH_CONSTANT_STRETCH_STACK_BOTTOM_SHIFT_DOWN

   

HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_ABOVE_MIN

   

HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_BELOW_MIN

   

HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_SHIFT_UP

   

HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP

   

HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_SHIFT_DOWN

   

HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN

   

HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_GAP_MIN

   

HB_OT_MATH_CONSTANT_FRACTION_NUM_DISPLAY_STYLE_GAP_MIN

   

HB_OT_MATH_CONSTANT_FRACTION_RULE_THICKNESS

   

HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_GAP_MIN

   

HB_OT_MATH_CONSTANT_FRACTION_DENOM_DISPLAY_STYLE_GAP_MIN

   

HB_OT_MATH_CONSTANT_SKEWED_FRACTION_HORIZONTAL_GAP

   

HB_OT_MATH_CONSTANT_SKEWED_FRACTION_VERTICAL_GAP

   

HB_OT_MATH_CONSTANT_OVERBAR_VERTICAL_GAP

   

HB_OT_MATH_CONSTANT_OVERBAR_RULE_THICKNESS

   

HB_OT_MATH_CONSTANT_OVERBAR_EXTRA_ASCENDER

   

HB_OT_MATH_CONSTANT_UNDERBAR_VERTICAL_GAP

   

HB_OT_MATH_CONSTANT_UNDERBAR_RULE_THICKNESS

   

HB_OT_MATH_CONSTANT_UNDERBAR_EXTRA_DESCENDER

   

HB_OT_MATH_CONSTANT_RADICAL_VERTICAL_GAP

   

HB_OT_MATH_CONSTANT_RADICAL_DISPLAY_STYLE_VERTICAL_GAP

   

HB_OT_MATH_CONSTANT_RADICAL_RULE_THICKNESS

   

HB_OT_MATH_CONSTANT_RADICAL_EXTRA_ASCENDER

   

HB_OT_MATH_CONSTANT_RADICAL_KERN_BEFORE_DEGREE

   

HB_OT_MATH_CONSTANT_RADICAL_KERN_AFTER_DEGREE

   

HB_OT_MATH_CONSTANT_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT

   

Since: 1.3.3


enum hb_ot_math_kern_t

The math kerning-table types defined for the four corners of a glyph.

Members

HB_OT_MATH_KERN_TOP_RIGHT

   

HB_OT_MATH_KERN_TOP_LEFT

   

HB_OT_MATH_KERN_BOTTOM_RIGHT

   

HB_OT_MATH_KERN_BOTTOM_LEFT

   

Since: 1.3.3


hb_ot_math_glyph_variant_t

typedef struct {
  hb_codepoint_t glyph;
  hb_position_t advance;
} hb_ot_math_glyph_variant_t;

Data type to hold math-variant information for a glyph.

Members

hb_codepoint_t glyph;

The glyph index of the variant

 

hb_position_t advance;

The advance width of the variant

 

Since: 1.3.3


enum hb_ot_math_glyph_part_flags_t

Flags for math glyph parts.

Members

HB_OT_MATH_GLYPH_PART_FLAG_EXTENDER

   

Since: 1.3.3


hb_ot_math_glyph_part_t

typedef struct {
  hb_codepoint_t glyph;
  hb_position_t start_connector_length;
  hb_position_t end_connector_length;
  hb_position_t full_advance;
  hb_ot_math_glyph_part_flags_t flags;
} hb_ot_math_glyph_part_t;

Data type to hold information for a "part" component of a math-variant glyph. Large variants for stretchable math glyphs (such as parentheses) can be constructed on the fly from parts.

Members

hb_codepoint_t glyph;

The glyph index of the variant part

 

hb_position_t start_connector_length;

The length of the connector on the starting side of the variant part

 

hb_position_t end_connector_length;

The length of the connector on the ending side of the variant part

 

hb_position_t full_advance;

The total advance of the part

 

hb_ot_math_glyph_part_flags_t flags;

hb_ot_math_glyph_part_flags_t flags for the part

 

Since: 1.3.3