Callbacks¶
| buffer_message_func_t(buffer, font, message, *user_data) | |
| destroy_func_t(*user_data) | |
| font_get_font_extents_func_t(font, font_data, extents, *user_data) | |
| font_get_glyph_advance_func_t(font, font_data, glyph, *user_data) | |
| font_get_glyph_advances_func_t(font, font_data, count, first_glyph, glyph_stride, first_advance, advance_stride, *user_data) | |
| font_get_glyph_contour_point_func_t(font, font_data, glyph, point_index, x, y, *user_data) | |
| font_get_glyph_extents_func_t(font, font_data, glyph, extents, *user_data) | |
| font_get_glyph_from_name_func_t(font, font_data, name, len, glyph, *user_data) | |
| font_get_glyph_func_t(font, font_data, unicode, variation_selector, glyph, *user_data) | |
| font_get_glyph_kerning_func_t(font, font_data, first_glyph, second_glyph, *user_data) | |
| font_get_glyph_name_func_t(font, font_data, glyph, name, size, *user_data) | |
| font_get_glyph_origin_func_t(font, font_data, glyph, x, y, *user_data) | |
| font_get_nominal_glyph_func_t(font, font_data, unicode, glyph, *user_data) | |
| font_get_nominal_glyphs_func_t(font, font_data, count, first_unicode, unicode_stride, first_glyph, glyph_stride, *user_data) | |
| font_get_variation_glyph_func_t(font, font_data, unicode, variation_selector, glyph, *user_data) | |
| reference_table_func_t(face, tag, *user_data) | |
| unicode_combining_class_func_t(ufuncs, unicode, *user_data) | |
| unicode_compose_func_t(ufuncs, a, b, *user_data) | |
| unicode_decompose_compatibility_func_t(ufuncs, u, decomposed, *user_data) | |
| unicode_decompose_func_t(ufuncs, ab, *user_data) | |
| unicode_eastasian_width_func_t(ufuncs, unicode, *user_data) | |
| unicode_general_category_func_t(ufuncs, unicode, *user_data) | |
| unicode_mirroring_func_t(ufuncs, unicode, *user_data) | |
| unicode_script_func_t(ufuncs, unicode, *user_data) | 
Details¶
- 
HarfBuzz.buffer_message_func_t(buffer, font, message, *user_data)¶
- Parameters: - buffer (HarfBuzz.buffer_t) –
- font (HarfBuzz.font_t) –
- message (str) –
- user_data (objectorNone) –
 - Return type: 
- buffer (
- 
HarfBuzz.font_get_font_extents_func_t(font, font_data, extents, *user_data)¶
- Parameters: - font (HarfBuzz.font_t) –
- font_data (objectorNone) –
- extents (HarfBuzz.font_extents_t) –
- user_data (objectorNone) –
 - Return type: 
- font (
- 
HarfBuzz.font_get_glyph_advance_func_t(font, font_data, glyph, *user_data)¶
- Parameters: - Return type: - A virtual method for the - HarfBuzz.font_funcs_tof an- HarfBuzz.font_tobject.- This method should retrieve the advance for a specified glyph. The method must return an #hb_position_t. 
- 
HarfBuzz.font_get_glyph_advances_func_t(font, font_data, count, first_glyph, glyph_stride, first_advance, advance_stride, *user_data)¶
- Parameters: - A virtual method for the - HarfBuzz.font_funcs_tof an- HarfBuzz.font_tobject.- This method should retrieve the advances for a sequence of glyphs. 
- 
HarfBuzz.font_get_glyph_contour_point_func_t(font, font_data, glyph, point_index, x, y, *user_data)¶
- Parameters: - Return type: - A virtual method for the - HarfBuzz.font_funcs_tof an- HarfBuzz.font_tobject.- This method should retrieve the (X,Y) coordinates (in font units) for a specified contour point in a glyph. Each coordinate must be returned as an #hb_position_t output parameter. 
- 
HarfBuzz.font_get_glyph_extents_func_t(font, font_data, glyph, extents, *user_data)¶
- Parameters: - font (HarfBuzz.font_t) –
- font_data (objectorNone) –
- glyph (int) –
- extents (HarfBuzz.glyph_extents_t) –
- user_data (objectorNone) –
 - Return type: - A virtual method for the - HarfBuzz.font_funcs_tof an- HarfBuzz.font_tobject.- This method should retrieve the extents for a specified glyph. Extents must be returned in an #hb_glyph_extents output parameter. 
- font (
- 
HarfBuzz.font_get_glyph_from_name_func_t(font, font_data, name, len, glyph, *user_data)¶
- Parameters: - Return type: - A virtual method for the - HarfBuzz.font_funcs_tof an- HarfBuzz.font_tobject.- This method should retrieve the glyph ID that corresponds to a glyph-name string. 
- 
HarfBuzz.font_get_glyph_func_t(font, font_data, unicode, variation_selector, glyph, *user_data)¶
- Parameters: - Return type: 
- 
HarfBuzz.font_get_glyph_kerning_func_t(font, font_data, first_glyph, second_glyph, *user_data)¶
- Parameters: - Return type: 
- 
HarfBuzz.font_get_glyph_name_func_t(font, font_data, glyph, name, size, *user_data)¶
- Parameters: - Return type: - A virtual method for the - HarfBuzz.font_funcs_tof an- HarfBuzz.font_tobject.- This method should retrieve the glyph name that corresponds to a glyph ID. The name should be returned in a string output parameter. 
- 
HarfBuzz.font_get_glyph_origin_func_t(font, font_data, glyph, x, y, *user_data)¶
- Parameters: - Return type: - A virtual method for the - HarfBuzz.font_funcs_tof an- HarfBuzz.font_tobject.- This method should retrieve the (X,Y) coordinates (in font units) of the origin for a glyph. Each coordinate must be returned in an #hb_position_t output parameter. 
- 
HarfBuzz.font_get_nominal_glyph_func_t(font, font_data, unicode, glyph, *user_data)¶
- Parameters: - Return type: - A virtual method for the - HarfBuzz.font_funcs_tof an- HarfBuzz.font_tobject.- This method should retrieve the nominal glyph ID for a specified Unicode code point. Glyph IDs must be returned in a #hb_codepoint_t output parameter. 
- 
HarfBuzz.font_get_nominal_glyphs_func_t(font, font_data, count, first_unicode, unicode_stride, first_glyph, glyph_stride, *user_data)¶
- Parameters: - Return type: - A virtual method for the - HarfBuzz.font_funcs_tof an- HarfBuzz.font_tobject.- This method should retrieve the nominal glyph IDs for a sequence of Unicode code points. Glyph IDs must be returned in a #hb_codepoint_t output parameter. 
- 
HarfBuzz.font_get_variation_glyph_func_t(font, font_data, unicode, variation_selector, glyph, *user_data)¶
- Parameters: - Return type: - A virtual method for the - HarfBuzz.font_funcs_tof an- HarfBuzz.font_tobject.- This method should retrieve the glyph ID for a specified Unicode code point followed by a specified Variation Selector code point. Glyph IDs must be returned in a #hb_codepoint_t output parameter. 
- 
HarfBuzz.reference_table_func_t(face, tag, *user_data)¶
- Parameters: - face (HarfBuzz.face_t) –
- tag (int) –
- user_data (objectorNone) –
 - Return type: 
- face (
- 
HarfBuzz.unicode_combining_class_func_t(ufuncs, unicode, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – A Unicode-functions structure
- unicode (int) – The code point to query
- user_data (objectorNone) – User data pointer passed by the caller
 - Returns: - The - HarfBuzz.unicode_combining_class_tof unicode- Return type: - A virtual method for the - HarfBuzz.unicode_funcs_tstructure.- This method should retrieve the Canonical Combining Class (ccc) property for a specified Unicode code point. 
- ufuncs (
- 
HarfBuzz.unicode_compose_func_t(ufuncs, a, b, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – A Unicode-functions structure
- a (int) – The first code point to compose
- b (int) – The second code point to compose
- user_data (objectorNone) – user data pointer passed by the caller
 - Returns: - True is a,`b` composed, false otherwise - ab: - The composed code point - Return type: - A virtual method for the - HarfBuzz.unicode_funcs_tstructure.- This method should compose a sequence of two input Unicode code points by canonical equivalence, returning the composed code point in a #hb_codepoint_t output parameter (if successful). The method must return an #hb_bool_t indicating the success of the composition. 
- ufuncs (
- 
HarfBuzz.unicode_decompose_compatibility_func_t(ufuncs, u, decomposed, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – a Unicode function structure
- u (int) – codepoint to decompose
- decomposed (int) – address of codepoint array (of lengthHarfBuzz.UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into
- user_data (objectorNone) – user data pointer as passed toHarfBuzz.unicode_funcs_set_decompose_compatibility_func()
 - Returns: - number of codepoints in the full compatibility decomposition of u, or 0 if no decomposition available. - Return type: - Fully decompose u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to decomposed. The complete length of the decomposition will be returned. - If u has no compatibility decomposition, zero should be returned. - The Unicode standard guarantees that a buffer of length - HarfBuzz.UNICODE_MAX_DECOMPOSITION_LENcodepoints will always be sufficient for any compatibility decomposition plus an terminating value of 0. Consequently, decompose must be allocated by the caller to be at least this length. Implementations of this function type must ensure that they do not write past the provided array.- Deprecated since version 2.0.0. 
- ufuncs (
- 
HarfBuzz.unicode_decompose_func_t(ufuncs, ab, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – A Unicode-functions structure
- ab (int) – The code point to decompose
- user_data (objectorNone) – user data pointer passed by the caller
 - Returns: - True if ab decomposed, false otherwise - a: - The first decomposed code point - b: - The second decomposed code point - Return type: - A virtual method for the - HarfBuzz.unicode_funcs_tstructure.- This method should decompose an input Unicode code point, returning the two decomposed code points in #hb_codepoint_t output parameters (if successful). The method must return an #hb_bool_t indicating the success of the composition. 
- ufuncs (
- 
HarfBuzz.unicode_eastasian_width_func_t(ufuncs, unicode, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) –
- unicode (int) –
- user_data (objectorNone) –
 - Return type: - Deprecated since version 2.0.0. 
- ufuncs (
- 
HarfBuzz.unicode_general_category_func_t(ufuncs, unicode, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – A Unicode-functions structure
- unicode (int) – The code point to query
- user_data (objectorNone) – User data pointer passed by the caller
 - Returns: - The - HarfBuzz.unicode_general_category_tof unicode- Return type: - A virtual method for the - HarfBuzz.unicode_funcs_tstructure.- This method should retrieve the General Category property for a specified Unicode code point. 
- ufuncs (
- 
HarfBuzz.unicode_mirroring_func_t(ufuncs, unicode, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – A Unicode-functions structure
- unicode (int) – The code point to query
- user_data (objectorNone) – User data pointer passed by the caller
 - Returns: - The #hb_codepoint_t of the Mirroring Glyph for unicode - Return type: - A virtual method for the - HarfBuzz.unicode_funcs_tstructure.- This method should retrieve the Bi-Directional Mirroring Glyph code point for a specified Unicode code point. - Note: If a code point does not have a specified Bi-Directional Mirroring Glyph defined, the method should return the original code point. 
- ufuncs (
- 
HarfBuzz.unicode_script_func_t(ufuncs, unicode, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – A Unicode-functions structure
- unicode (int) – The code point to query
- user_data (objectorNone) – User data pointer passed by the caller
 - Returns: - The - HarfBuzz.script_tof unicode- Return type: - A virtual method for the - HarfBuzz.unicode_funcs_tstructure.- This method should retrieve the Script property for a specified Unicode code point. 
- ufuncs (