Functions¶
Details¶
- 
HarfBuzz.blob_copy_writable_or_fail(blob)¶
- Parameters: - blob ( - HarfBuzz.blob_t) – A blob.- Returns: - The new blob, or nullptr if allocation failed - Return type: - HarfBuzz.blob_t- Makes a writable copy of blob. - New in version 1.8.0. 
- 
HarfBuzz.blob_create_from_file(file_name)¶
- Parameters: - file_name ( - str) – A font filename- Returns: - An - HarfBuzz.blob_tpointer with the content of the file- Return type: - HarfBuzz.blob_t- Creates a new blob containing the data from the specified binary font file. - New in version 1.7.7. 
- 
HarfBuzz.blob_create_sub_blob(parent, offset, length)¶
- Parameters: - parent (HarfBuzz.blob_t) – Parent blob.
- offset (int) – Start offset of sub-blob within parent, in bytes.
- length (int) – Length of sub-blob.
 - Returns: - New blob, or the empty blob if something failed or if length is zero or offset is beyond the end of parent’s data. Destroy with hb_blob_destroy(). - Return type: - Returns a blob that represents a range of bytes in parent. The new blob is always created with - HarfBuzz.memory_mode_t.READONLY, meaning that it will never modify data in the parent blob. The parent data is not expected to be modified, and will result in undefined behavior if it is.- Makes parent immutable. - New in version 0.9.2. 
- parent (
- 
HarfBuzz.blob_get_data(blob)¶
- Parameters: - blob ( - HarfBuzz.blob_t) – a blob.- Returns: - the byte data of blob. - Return type: - [ - str]- Fetches the data from a blob. - New in version 0.9.2. 
- 
HarfBuzz.blob_get_data_writable(blob)¶
- Parameters: - blob ( - HarfBuzz.blob_t) – a blob.- Returns: - Writable blob data, or - Noneif failed.- Return type: - [ - str]- Tries to make blob data writable (possibly copying it) and return pointer to data. - Fails if blob has been made immutable, or if memory allocation fails. - New in version 0.9.2. 
- 
HarfBuzz.blob_get_empty()¶
- Returns: - The empty blob. - Return type: - HarfBuzz.blob_t- Returns the singleton empty blob. - See TODO:link object types for more information. - New in version 0.9.2. 
- 
HarfBuzz.blob_get_length(blob)¶
- Parameters: - blob ( - HarfBuzz.blob_t) – a blob.- Returns: - the length of blob data in bytes. - Return type: - int- Fetches the length of a blob’s data. - New in version 0.9.2. 
- 
HarfBuzz.blob_is_immutable(blob)¶
- Parameters: - blob ( - HarfBuzz.blob_t) – a blob.- Returns: - %true if blob is immutable, false otherwise - Return type: - int- Tests whether a blob is immutable. - New in version 0.9.2. 
- 
HarfBuzz.blob_make_immutable(blob)¶
- Parameters: - blob ( - HarfBuzz.blob_t) – a blob- Makes a blob immutable. - New in version 0.9.2. 
- 
HarfBuzz.buffer_add(buffer, codepoint, cluster)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- codepoint (int) – A Unicode code point.
- cluster (int) – The cluster value of codepoint.
 - Appends a character with the Unicode value of codepoint to buffer, and gives it the initial cluster value of cluster. Clusters can be any thing the client wants, they are usually used to refer to the index of the character in the input text stream and are output in HarfBuzz.glyph_info_t.cluster field. - This function does not check the validity of codepoint, it is up to the caller to ensure it is a valid Unicode code point. - New in version 0.9.7. 
- buffer (
- 
HarfBuzz.buffer_add_codepoints(buffer, text, item_offset, item_length)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – aHarfBuzz.buffer_tto append characters to.
- text ([int]) – an array of Unicode code points to append.
- item_offset (int) – the offset of the first code point to add to the buffer.
- item_length (int) – the number of code points to add to the buffer, or -1 for the end of text (assuming it isNoneterminated).
 - Appends characters from text array to buffer. The item_offset is the position of the first character from text that will be appended, and item_length is the number of character. When shaping part of a larger text (e.g. a run of text from a paragraph), instead of passing just the substring corresponding to the run, it is preferable to pass the whole paragraph and specify the run start and length as item_offset and item_length, respectively, to give HarfBuzz the full context to be able, for example, to do cross-run Arabic shaping or properly handle combining marks at stat of run. - This function does not check the validity of text, it is up to the caller to ensure it contains a valid Unicode code points. - New in version 0.9.31. 
- buffer (
- 
HarfBuzz.buffer_add_latin1(buffer, text, item_offset, item_length)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- text (bytes) – an array of UTF-8 characters to append
- item_offset (int) – the offset of the first character to add to the buffer
- item_length (int) – the number of characters to add to the buffer, or -1 for the end of text (assuming it isNoneterminated)
 - Similar to - HarfBuzz.buffer_add_codepoints(), but allows only access to first 256 Unicode code points that can fit in 8-bit strings.- Has nothing to do with non-Unicode Latin-1 encoding. - New in version 0.9.39. 
- buffer (
- 
HarfBuzz.buffer_add_utf16(buffer, text, item_offset, item_length)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- text ([int]) – An array of UTF-16 characters to append
- item_offset (int) – The offset of the first character to add to the buffer
- item_length (int) – The number of characters to add to the buffer, or -1 for the end of text (assuming it isNoneterminated)
 - See - HarfBuzz.buffer_add_codepoints().- Replaces invalid UTF-16 characters with the buffer replacement code point, see - HarfBuzz.buffer_set_replacement_codepoint().- New in version 0.9.2. 
- buffer (
- 
HarfBuzz.buffer_add_utf32(buffer, text, item_offset, item_length)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- text ([int]) – An array of UTF-32 characters to append
- item_offset (int) – The offset of the first character to add to the buffer
- item_length (int) – The number of characters to add to the buffer, or -1 for the end of text (assuming it isNoneterminated)
 - See - HarfBuzz.buffer_add_codepoints().- Replaces invalid UTF-32 characters with the buffer replacement code point, see - HarfBuzz.buffer_set_replacement_codepoint().- New in version 0.9.2. 
- buffer (
- 
HarfBuzz.buffer_add_utf8(buffer, text, item_offset, item_length)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- text (bytes) – An array of UTF-8 characters to append.
- item_offset (int) – The offset of the first character to add to the buffer.
- item_length (int) – The number of characters to add to the buffer, or -1 for the end of text (assuming it isNoneterminated).
 - See - HarfBuzz.buffer_add_codepoints().- Replaces invalid UTF-8 characters with the buffer replacement code point, see - HarfBuzz.buffer_set_replacement_codepoint().- New in version 0.9.2. 
- buffer (
- 
HarfBuzz.buffer_allocation_successful(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - %true if buffer memory allocation succeeded, %false otherwise. - Return type: - int- Check if allocating memory for the buffer succeeded. - New in version 0.9.2. 
- 
HarfBuzz.buffer_append(buffer, source, start, end)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- source (HarfBuzz.buffer_t) – sourceHarfBuzz.buffer_t
- start (int) – start index into source buffer to copy. Use 0 to copy from start of buffer.
- end (int) – end index into source buffer to copy. Use HB_FEATURE_GLOBAL_END to copy to end of buffer.
 - Append (part of) contents of another buffer to this buffer. - New in version 1.5.0. 
- buffer (
- 
HarfBuzz.buffer_clear_contents(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Similar to - HarfBuzz.buffer_reset(), but does not clear the Unicode functions and the replacement code point.- New in version 0.9.11. 
- 
HarfBuzz.buffer_create()¶
- Returns: - A newly allocated - HarfBuzz.buffer_twith a reference count of 1. The initial reference count should be released with hb_buffer_destroy() when you are done using the- HarfBuzz.buffer_t. This function never returns- None. If memory cannot be allocated, a special- HarfBuzz.buffer_tobject will be returned on which- HarfBuzz.buffer_allocation_successful() returns %false.- Return type: - HarfBuzz.buffer_t- Creates a new - HarfBuzz.buffer_twith all properties to defaults.- New in version 0.9.2. 
- 
HarfBuzz.buffer_deserialize_glyphs(buffer, buf, font, format)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – anHarfBuzz.buffer_tbuffer.
- buf ([str]) –
- font (HarfBuzz.font_t) –
- format (HarfBuzz.buffer_serialize_format_t) –
 - Return type: - New in version 0.9.7. 
- buffer (
- 
HarfBuzz.buffer_deserialize_unicode(buffer, buf, format)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – anHarfBuzz.buffer_tbuffer.
- buf ([str]) –
- format (HarfBuzz.buffer_serialize_format_t) –
 - Return type: - New in version 2.7.3. 
- buffer (
- 
HarfBuzz.buffer_diff(buffer, reference, dottedcircle_glyph, position_fuzz)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – a buffer.
- reference (HarfBuzz.buffer_t) – other buffer to compare to.
- dottedcircle_glyph (int) – glyph id of U+25CC DOTTED CIRCLE, or (hb_codepont_t) -1.
- position_fuzz (int) – allowed absolute difference in position values.
 - Return type: - If dottedcircle_glyph is (hb_codepoint_t) -1 then - HarfBuzz.buffer_diff_flags_t.DOTTED_CIRCLE_PRESENTand- HarfBuzz.buffer_diff_flags_t.NOTDEF_PRESENTare never returned. This should be used by most callers if just comparing two buffers is needed.- New in version 1.5.0. 
- buffer (
- 
HarfBuzz.buffer_get_cluster_level(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The cluster level of buffer - Return type: - HarfBuzz.buffer_cluster_level_t- Fetches the cluster level of a buffer. The - HarfBuzz.buffer_cluster_level_tdictates one aspect of how HarfBuzz will treat non-base characters during shaping.- New in version 0.9.42. 
- 
HarfBuzz.buffer_get_content_type(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The type of buffer contents - Return type: - HarfBuzz.buffer_content_type_t- Fetches the type of buffer contents. Buffers are either empty, contain characters (before shaping), or contain glyphs (the result of shaping). - New in version 0.9.5. 
- 
HarfBuzz.buffer_get_direction(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The direction of the buffer. - Return type: - HarfBuzz.direction_t- See - HarfBuzz.buffer_set_direction()- New in version 0.9.2. 
- 
HarfBuzz.buffer_get_empty()¶
- Returns: - The empty buffer - Return type: - HarfBuzz.buffer_t- Fetches an empty - HarfBuzz.buffer_t.- New in version 0.9.2. 
- 
HarfBuzz.buffer_get_flags(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The buffer flags - Return type: - HarfBuzz.buffer_flags_t- Fetches the - HarfBuzz.buffer_flags_tof buffer.- New in version 0.9.7. 
- 
HarfBuzz.buffer_get_glyph_infos(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The buffer glyph information array. The value valid as long as buffer has not been modified. - Return type: - [ - HarfBuzz.glyph_info_t]- Returns buffer glyph information array. Returned pointer is valid as long as buffer contents are not modified. - New in version 0.9.2. 
- 
HarfBuzz.buffer_get_glyph_positions(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The buffer glyph position array. The value valid as long as buffer has not been modified. - Return type: - [ - HarfBuzz.glyph_position_t]- Returns buffer glyph position array. Returned pointer is valid as long as buffer contents are not modified. - New in version 0.9.2. 
- 
HarfBuzz.buffer_get_invisible_glyph(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The buffer invisible #hb_codepoint_t - Return type: - int- See - HarfBuzz.buffer_set_invisible_glyph().- New in version 2.0.0. 
- 
HarfBuzz.buffer_get_language(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The - HarfBuzz.language_tof the buffer. Must not be freed by the caller.- Return type: - HarfBuzz.language_t- See - HarfBuzz.buffer_set_language().- New in version 0.9.2. 
- 
HarfBuzz.buffer_get_length(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The buffer length. The value valid as long as buffer has not been modified. - Return type: - int- Returns the number of items in the buffer. - New in version 0.9.2. 
- 
HarfBuzz.buffer_get_replacement_codepoint(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The buffer replacement #hb_codepoint_t - Return type: - int- Fetches the #hb_codepoint_t that replaces invalid entries for a given encoding when adding text to buffer. - New in version 0.9.31. 
- 
HarfBuzz.buffer_get_script(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The - HarfBuzz.script_tof the buffer- Return type: - HarfBuzz.script_t- Fetches the script of buffer. - New in version 0.9.2. 
- 
HarfBuzz.buffer_get_segment_properties(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The output - HarfBuzz.segment_properties_t- Return type: - props: - HarfBuzz.segment_properties_t- Sets props to the - HarfBuzz.segment_properties_tof buffer.- New in version 0.9.7. 
- 
HarfBuzz.buffer_get_unicode_funcs(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Returns: - The Unicode-functions structure - Return type: - HarfBuzz.unicode_funcs_t- Fetches the Unicode-functions structure of a buffer. - New in version 0.9.2. 
- 
HarfBuzz.buffer_guess_segment_properties(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Sets unset buffer segment properties based on buffer Unicode contents. If buffer is not empty, it must have content type - HarfBuzz.buffer_content_type_t.UNICODE.- If buffer script is not set (ie. is - HarfBuzz.script_t.INVALID), it will be set to the Unicode script of the first character in the buffer that has a script other than- HarfBuzz.script_t.COMMON,- HarfBuzz.script_t.INHERITED, and- HarfBuzz.script_t.UNKNOWN.- Next, if buffer direction is not set (ie. is - HarfBuzz.direction_t.INVALID), it will be set to the natural horizontal direction of the buffer script as returned by- HarfBuzz.script_get_horizontal_direction(). If- HarfBuzz.script_get_horizontal_direction() returns- HarfBuzz.direction_t.INVALID, then- HarfBuzz.direction_t.LTRis used.- Finally, if buffer language is not set (ie. is - HarfBuzz.LANGUAGE_INVALID), it will be set to the process’s default language as returned by- HarfBuzz.language_get_default(). This may change in the future by taking buffer script into consideration when choosing a language. Note that- HarfBuzz.language_get_default() is NOT threadsafe the first time it is called. See documentation for that function for details.- New in version 0.9.7. 
- 
HarfBuzz.buffer_has_positions(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – an- HarfBuzz.buffer_t.- Returns: - %true if the buffer has position array, %false otherwise. - Return type: - int- Returns whether buffer has glyph position data. A buffer gains position data when - HarfBuzz.buffer_get_glyph_positions() is called on it, and cleared of position data when- HarfBuzz.buffer_clear_contents() is called.- New in version 2.7.3. 
- 
HarfBuzz.buffer_normalize_glyphs(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Reorders a glyph buffer to have canonical in-cluster glyph order / position. The resulting clusters should behave identical to pre-reordering clusters. - This has nothing to do with Unicode normalization. - New in version 0.9.2. 
- 
HarfBuzz.buffer_pre_allocate(buffer, size)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- size (int) – Number of items to pre allocate.
 - Returns: - %true if buffer memory allocation succeeded, %false otherwise - Return type: - Pre allocates memory for buffer to fit at least size number of items. - New in version 0.9.2. 
- buffer (
- 
HarfBuzz.buffer_reset(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Resets the buffer to its initial status, as if it was just newly created with - HarfBuzz.buffer_create().- New in version 0.9.2. 
- 
HarfBuzz.buffer_reverse(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Reverses buffer contents. - New in version 0.9.2. 
- 
HarfBuzz.buffer_reverse_clusters(buffer)¶
- Parameters: - buffer ( - HarfBuzz.buffer_t) – An- HarfBuzz.buffer_t- Reverses buffer clusters. That is, the buffer contents are reversed, then each cluster (consecutive items having the same cluster number) are reversed again. - New in version 0.9.2. 
- 
HarfBuzz.buffer_reverse_range(buffer, start, end)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- start (int) – start index
- end (int) – end index
 - Reverses buffer contents between start and end. - New in version 0.9.41. 
- buffer (
- 
HarfBuzz.buffer_serialize(buffer, start, end, font, format, flags)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – anHarfBuzz.buffer_tbuffer.
- start (int) – the first item in buffer to serialize.
- end (int) – the last item in buffer to serialize.
- font (HarfBuzz.font_torNone) – theHarfBuzz.font_tused to shape this buffer, needed to read glyph names and extents. IfNone, and empty font will be used.
- format (HarfBuzz.buffer_serialize_format_t) – theHarfBuzz.buffer_serialize_format_tto use for formatting the output.
- flags (HarfBuzz.buffer_serialize_flags_t) – theHarfBuzz.buffer_serialize_flags_tthat control what glyph properties to serialize.
 - Returns: - The number of serialized items. - buf: - output string to write serialized buffer into. - buf_consumed: - if not - None, will be set to the number of byes written into buf.- Return type: - Serializes buffer into a textual representation of its content, whether Unicode codepoints or glyph identifiers and positioning information. This is useful for showing the contents of the buffer, for example during debugging. See the documentation of - HarfBuzz.buffer_serialize_unicode() and- HarfBuzz.buffer_serialize_glyphs() for a description of the output format.- New in version 2.7.3. 
- buffer (
- 
HarfBuzz.buffer_serialize_format_from_string(str)¶
- Parameters: - str ( - bytes) – a string to parse- Returns: - The parsed - HarfBuzz.buffer_serialize_format_t.- Return type: - HarfBuzz.buffer_serialize_format_t- Parses a string into an - HarfBuzz.buffer_serialize_format_t. Does not check if str is a valid buffer serialization format, use- HarfBuzz.buffer_serialize_list_formats() to get the list of supported formats.- New in version 0.9.7. 
- 
HarfBuzz.buffer_serialize_format_to_string(format)¶
- Parameters: - format ( - HarfBuzz.buffer_serialize_format_t) – an- HarfBuzz.buffer_serialize_format_tto convert.- Returns: - A - Noneterminated string corresponding to format. Should not be freed.- Return type: - str- Converts format to the string corresponding it, or - Noneif it is not a valid- HarfBuzz.buffer_serialize_format_t.- New in version 0.9.7. 
- 
HarfBuzz.buffer_serialize_glyphs(buffer, start, end, font, format, flags)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – anHarfBuzz.buffer_tbuffer.
- start (int) – the first item in buffer to serialize.
- end (int) – the last item in buffer to serialize.
- font (HarfBuzz.font_torNone) – theHarfBuzz.font_tused to shape this buffer, needed to read glyph names and extents. IfNone, and empty font will be used.
- format (HarfBuzz.buffer_serialize_format_t) – theHarfBuzz.buffer_serialize_format_tto use for formatting the output.
- flags (HarfBuzz.buffer_serialize_flags_t) – theHarfBuzz.buffer_serialize_flags_tthat control what glyph properties to serialize.
 - Returns: - The number of serialized items. - buf: - output string to write serialized buffer into. - buf_consumed: - if not - None, will be set to the number of byes written into buf.- Return type: - Serializes buffer into a textual representation of its glyph content, useful for showing the contents of the buffer, for example during debugging. There are currently two supported serialization formats: - text
 - A human-readable, plain text format. The serialized glyphs will look something like: - `` [uni0651=0@518,0+0|uni0628=0+1897] `` - The serialized glyphs are delimited with [and].
- Glyphs are separated with |
- Each glyph starts with glyph name, or glyph index if
HarfBuzz.buffer_serialize_flags_t.NO_GLYPH_NAMESflag is set. Then,- If HarfBuzz.buffer_serialize_flags_t.NO_CLUSTERSis not set,=then HarfBuzz.glyph_info_t.cluster.
- If HarfBuzz.buffer_serialize_flags_t.NO_POSITIONSis not set, theHarfBuzz.glyph_position_tin the format:- If both HarfBuzz.glyph_position_t.x_offset and HarfBuzz.glyph_position_t.y_offset are not 0, @x_offset,y_offset. Then,
- +x_advance, then- ,y_advanceif HarfBuzz.glyph_position_t.y_advance is not 0. Then,
 
- If both HarfBuzz.glyph_position_t.x_offset and HarfBuzz.glyph_position_t.y_offset are not 0, 
- If HarfBuzz.buffer_serialize_flags_t.GLYPH_EXTENTSis set, theHarfBuzz.glyph_extents_tin the format<x_bearing,y_bearing,width,height>
 
- If 
 - json
 - A machine-readable, structured format. The serialized glyphs will look something like: - `` [{“g”:”uni0651”,”cl”:0,”dx”:518,”dy”:0,”ax”:0,”ay”:0}, {“g”:”uni0628”,”cl”:0,”dx”:0,”dy”:0,”ax”:1897,”ay”:0}] `` - Each glyph is a JSON object, with the following properties: - g: the glyph name or glyph index if- HarfBuzz.buffer_serialize_flags_t.NO_GLYPH_NAMESflag is set.
- cl: HarfBuzz.glyph_info_t.cluster if- HarfBuzz.buffer_serialize_flags_t.NO_CLUSTERSis not set.
- dx,``dy``,``ax``,``ay``: HarfBuzz.glyph_position_t.x_offset, HarfBuzz.glyph_position_t.y_offset, HarfBuzz.glyph_position_t.x_advance and HarfBuzz.glyph_position_t.y_advance respectively, if- HarfBuzz.buffer_serialize_flags_t.NO_POSITIONSis not set.
- xb,``yb``,``w``,``h``: HarfBuzz.glyph_extents_t.x_bearing, HarfBuzz.glyph_extents_t.y_bearing, HarfBuzz.glyph_extents_t.width and HarfBuzz.glyph_extents_t.height respectively if- HarfBuzz.buffer_serialize_flags_t.GLYPH_EXTENTSis set.
 - New in version 0.9.7. 
- buffer (
- 
HarfBuzz.buffer_serialize_list_formats()¶
- Returns: - A string array of buffer serialization formats. Should not be freed. - Return type: - [ - str]- Returns a list of supported buffer serialization formats. - New in version 0.9.7. 
- 
HarfBuzz.buffer_serialize_unicode(buffer, start, end, format, flags)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – anHarfBuzz.buffer_tbuffer.
- start (int) – the first item in buffer to serialize.
- end (int) – the last item in buffer to serialize.
- format (HarfBuzz.buffer_serialize_format_t) – theHarfBuzz.buffer_serialize_format_tto use for formatting the output.
- flags (HarfBuzz.buffer_serialize_flags_t) –
 - Returns: - The number of serialized items. - buf: - output string to write serialized buffer into. - buf_consumed: - if not - None, will be set to the number of byes written into buf.- Return type: - Serializes buffer into a textual representation of its content, when the buffer contains Unicode codepoints (i.e., before shaping). This is useful for showing the contents of the buffer, for example during debugging. There are currently two supported serialization formats: - text
 - A human-readable, plain text format. The serialized codepoints will look something like: - `` <U+0651=0|U+0628=1> `` - Glyphs are separated with |
- Unicode codepoints are expressed as zero-padded four (or more)
digit hexadecimal numbers preceded by U+
- If HarfBuzz.buffer_serialize_flags_t.NO_CLUSTERSis not set, the cluster will be indicated with a=then HarfBuzz.glyph_info_t.cluster.
 - json
 - A machine-readable, structured format. The serialized codepoints will be a list of objects with the following properties: - u: the Unicode codepoint as a decimal integer
- cl: HarfBuzz.glyph_info_t.cluster if- HarfBuzz.buffer_serialize_flags_t.NO_CLUSTERSis not set.
 - For example: - `` [{u:1617,cl:0},{u:1576,cl:1}] `` - New in version 2.7.3. 
- buffer (
- 
HarfBuzz.buffer_set_cluster_level(buffer, cluster_level)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- cluster_level (HarfBuzz.buffer_cluster_level_t) – The cluster level to set on the buffer
 - Sets the cluster level of a buffer. The - HarfBuzz.buffer_cluster_level_tdictates one aspect of how HarfBuzz will treat non-base characters during shaping.- New in version 0.9.42. 
- buffer (
- 
HarfBuzz.buffer_set_content_type(buffer, content_type)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- content_type (HarfBuzz.buffer_content_type_t) – The type of buffer contents to set
 - Sets the type of buffer contents. Buffers are either empty, contain characters (before shaping), or contain glyphs (the result of shaping). - New in version 0.9.5. 
- buffer (
- 
HarfBuzz.buffer_set_direction(buffer, direction)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- direction (HarfBuzz.direction_t) – theHarfBuzz.direction_tof the buffer
 - Set the text flow direction of the buffer. No shaping can happen without setting buffer direction, and it controls the visual direction for the output glyphs; for RTL direction the glyphs will be reversed. Many layout features depend on the proper setting of the direction, for example, reversing RTL text before shaping, then shaping with LTR direction is not the same as keeping the text in logical order and shaping with RTL direction. - New in version 0.9.2. 
- buffer (
- 
HarfBuzz.buffer_set_flags(buffer, flags)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- flags (HarfBuzz.buffer_flags_t) – The buffer flags to set
 - Sets buffer flags to flags. See - HarfBuzz.buffer_flags_t.- New in version 0.9.7. 
- buffer (
- 
HarfBuzz.buffer_set_invisible_glyph(buffer, invisible)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- invisible (int) – the invisible #hb_codepoint_t
 - Sets the #hb_codepoint_t that replaces invisible characters in the shaping result. If set to zero (default), the glyph for the U+0020 SPACE character is used. Otherwise, this value is used verbatim. - New in version 2.0.0. 
- buffer (
- 
HarfBuzz.buffer_set_language(buffer, language)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- language (HarfBuzz.language_t) – AnHarfBuzz.language_tto set
 - Sets the language of buffer to language. - Languages are crucial for selecting which OpenType feature to apply to the buffer which can result in applying language-specific behaviour. Languages are orthogonal to the scripts, and though they are related, they are different concepts and should not be confused with each other. - Use - HarfBuzz.language_from_string() to convert from BCP 47 language tags to- HarfBuzz.language_t.- New in version 0.9.2. 
- buffer (
- 
HarfBuzz.buffer_set_length(buffer, length)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- length (int) – The new length of buffer
 - Returns: - %true if buffer memory allocation succeeded, %false otherwise. - Return type: - Similar to - HarfBuzz.buffer_pre_allocate(), but clears any new items added at the end.- New in version 0.9.2. 
- buffer (
- 
HarfBuzz.buffer_set_message_func(buffer, func, *user_data)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- func (HarfBuzz.buffer_message_func_t) –
- user_data (objectorNone) –
 - New in version 1.1.3. 
- buffer (
- 
HarfBuzz.buffer_set_replacement_codepoint(buffer, replacement)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- replacement (int) – the replacement #hb_codepoint_t
 - Sets the #hb_codepoint_t that replaces invalid entries for a given encoding when adding text to buffer. - Default is - HarfBuzz.BUFFER_REPLACEMENT_CODEPOINT_DEFAULT.- New in version 0.9.31. 
- buffer (
- 
HarfBuzz.buffer_set_script(buffer, script)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- script (HarfBuzz.script_t) – AnHarfBuzz.script_tto set.
 - Sets the script of buffer to script. - Script is crucial for choosing the proper shaping behaviour for scripts that require it (e.g. Arabic) and the which OpenType features defined in the font to be applied. - You can pass one of the predefined - HarfBuzz.script_tvalues, or use- HarfBuzz.script_from_string() or- HarfBuzz.script_from_iso15924_tag() to get the corresponding script from an ISO 15924 script tag.- New in version 0.9.2. 
- buffer (
- 
HarfBuzz.buffer_set_segment_properties(buffer, props)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- props (HarfBuzz.segment_properties_t) – AnHarfBuzz.segment_properties_tto use
 - Sets the segment properties of the buffer, a shortcut for calling - HarfBuzz.buffer_set_direction(),- HarfBuzz.buffer_set_script() and- HarfBuzz.buffer_set_language() individually.- New in version 0.9.7. 
- buffer (
- 
HarfBuzz.buffer_set_unicode_funcs(buffer, unicode_funcs)¶
- Parameters: - buffer (HarfBuzz.buffer_t) – AnHarfBuzz.buffer_t
- unicode_funcs (HarfBuzz.unicode_funcs_t) – The Unicode-functions structure
 - Sets the Unicode-functions structure of a buffer to unicode_funcs. - New in version 0.9.2. 
- buffer (
- 
HarfBuzz.color_get_alpha(color)¶
- Parameters: - color ( - int) –- Returns: - Alpha channel value of the given color - Return type: - int- color: a #hb_color_t we are interested in its channels. - New in version 2.1.0. 
- 
HarfBuzz.color_get_blue(color)¶
- Parameters: - color ( - int) –- Returns: - Blue channel value of the given color - Return type: - int- color: a #hb_color_t we are interested in its channels. - New in version 2.1.0. 
- 
HarfBuzz.color_get_green(color)¶
- Parameters: - color ( - int) –- Returns: - Green channel value of the given color - Return type: - int- color: a #hb_color_t we are interested in its channels. - New in version 2.1.0. 
- 
HarfBuzz.color_get_red(color)¶
- Parameters: - color ( - int) –- Returns: - Red channel value of the given color - Return type: - int- color: a #hb_color_t we are interested in its channels. - New in version 2.1.0. 
- 
HarfBuzz.direction_from_string(str)¶
- Parameters: - str ( - bytes) – String to convert- Returns: - The - HarfBuzz.direction_tmatching str- Return type: - HarfBuzz.direction_t- Converts a string to an - HarfBuzz.direction_t.- Matching is loose and applies only to the first letter. For examples, “LTR” and “left-to-right” will both return - HarfBuzz.direction_t.LTR.- Unmatched strings will return - HarfBuzz.direction_t.INVALID.- New in version 0.9.2. 
- 
HarfBuzz.direction_to_string(direction)¶
- Parameters: - direction ( - HarfBuzz.direction_t) – The- HarfBuzz.direction_tto convert- Returns: - The string corresponding to direction - Return type: - str- Converts an - HarfBuzz.direction_tto a string.- New in version 0.9.2. 
- 
HarfBuzz.face_builder_add_table(face, tag, blob)¶
- Parameters: - face (HarfBuzz.face_t) – A face object created withHarfBuzz.face_builder_create()
- tag (int) – The #hb_tag_t of the table to add
- blob (HarfBuzz.blob_t) – The blob containing the table data to add
 - Return type: - Add table for tag with data provided by blob to the face. face must be created using - HarfBuzz.face_builder_create().- New in version 1.9.0. 
- face (
- 
HarfBuzz.face_builder_create()¶
- Returns: - New face. - Return type: - HarfBuzz.face_t- Creates a - HarfBuzz.face_tthat can be used with- HarfBuzz.face_builder_add_table(). After tables are added to the face, it can be compiled to a binary font file by calling- HarfBuzz.face_reference_blob().- New in version 1.9.0. 
- 
HarfBuzz.face_collect_unicodes(face, out)¶
- Parameters: - face (HarfBuzz.face_t) – A face object
- out (HarfBuzz.set_t) – The set to add Unicode characters to
 - Collects all of the Unicode characters covered by face and adds them to the - HarfBuzz.set_tset out.- New in version 1.9.0. 
- face (
- 
HarfBuzz.face_collect_variation_selectors(face, out)¶
- Parameters: - face (HarfBuzz.face_t) – A face object
- out (HarfBuzz.set_t) – The set to add Variation Selector characters to
 - Collects all Unicode “Variation Selector” characters covered by face and adds them to the - HarfBuzz.set_tset out.- New in version 1.9.0. 
- face (
- 
HarfBuzz.face_collect_variation_unicodes(face, variation_selector, out)¶
- Parameters: - face (HarfBuzz.face_t) – A face object
- variation_selector (int) – The Variation Selector to query
- out (HarfBuzz.set_t) – The set to add Unicode characters to
 - Collects all Unicode characters for variation_selector covered by face and adds them to the - HarfBuzz.set_tset out.- New in version 1.9.0. 
- face (
- 
HarfBuzz.face_count(blob)¶
- Parameters: - blob ( - HarfBuzz.blob_t) – a blob.- Returns: - Number of faces in blob - Return type: - int- Fetches the number of faces in a blob. - New in version 1.7.7. 
- 
HarfBuzz.face_create(blob, index)¶
- Parameters: - blob (HarfBuzz.blob_t) –HarfBuzz.blob_tto work upon
- index (int) – The index of the face within blob
 - Returns: - The new face object - Return type: - Constructs a new face object from the specified blob and a face index into that blob. This is used for blobs of file formats such as Dfont and TTC that can contain more than one face. - New in version 0.9.2. 
- blob (
- 
HarfBuzz.face_create_for_tables(reference_table_func, *user_data)¶
- Parameters: - reference_table_func (HarfBuzz.reference_table_func_t) – Table-referencing function
- user_data (objectorNone) – A pointer to the user data
 - Returns: - The new face object - Return type: - Variant of - HarfBuzz.face_create(), built for those cases where it is more convenient to provide data for individual tables instead of the whole font data. With the caveat that- HarfBuzz.face_get_table_tags() does not currently work with faces created this way.- Creates a new face object from the specified user_data and reference_table_func, with the destroy callback. - New in version 0.9.2. 
- reference_table_func (
- 
HarfBuzz.face_get_empty()¶
- Returns: - The empty face object - Return type: - HarfBuzz.face_t- Fetches the singleton empty face object. - New in version 0.9.2. 
- 
HarfBuzz.face_get_glyph_count(face)¶
- Parameters: - face ( - HarfBuzz.face_t) – A face object- Returns: - The glyph-count value of face - Return type: - int- Fetches the glyph-count value of the specified face object. - New in version 0.9.7. 
- 
HarfBuzz.face_get_index(face)¶
- Parameters: - face ( - HarfBuzz.face_t) – A face object- Returns: - The index of face. - Return type: - int- Fetches the face-index corresponding to the given face. - Note: face indices within a collection are zero-based. - New in version 0.9.2. 
- Parameters: - face (HarfBuzz.face_t) – A face object
- start_offset (int) – The index of first table tag to retrieve
 - Returns: - Total number of tables, or zero if it is not possible to list - table_tags: - The array of table tags found - Return type: - Fetches a list of all table tags for a face, if possible. The list returned will begin at the offset provided - New in version 1.6.0. 
- face (
- 
HarfBuzz.face_get_upem(face)¶
- Parameters: - face ( - HarfBuzz.face_t) – A face object- Returns: - The upem value of face - Return type: - int- Fetches the units-per-em (upem) value of the specified face object. - New in version 0.9.2. 
- 
HarfBuzz.face_is_immutable(face)¶
- Parameters: - face ( - HarfBuzz.face_t) – A face object- Returns: - True is face is immutable, false otherwise - Return type: - int- Tests whether the given face object is immutable. - New in version 0.9.2. 
- 
HarfBuzz.face_make_immutable(face)¶
- Parameters: - face ( - HarfBuzz.face_t) – A face object- Makes the given face object immutable. - New in version 0.9.2. 
- 
HarfBuzz.face_reference_blob(face)¶
- Parameters: - face ( - HarfBuzz.face_t) – A face object- Returns: - A pointer to the blob for face - Return type: - HarfBuzz.blob_t- Fetches a pointer to the binary blob that contains the specified face. Returns an empty blob if referencing face data is not possible. - New in version 0.9.2. 
- 
HarfBuzz.face_reference_table(face, tag)¶
- Parameters: - face (HarfBuzz.face_t) – A face object
- tag (int) – The #hb_tag_t of the table to query
 - Returns: - A pointer to the tag table within face - Return type: - Fetches a reference to the specified table within the specified face. - New in version 0.9.2. 
- face (
- 
HarfBuzz.face_set_glyph_count(face, glyph_count)¶
- Parameters: - face (HarfBuzz.face_t) – A face object
- glyph_count (int) – The glyph-count value to assign
 - Sets the glyph count for a face object to the specified value. - New in version 0.9.7. 
- face (
- 
HarfBuzz.face_set_index(face, index)¶
- Parameters: - face (HarfBuzz.face_t) – A face object
- index (int) – The index to assign
 - Assigns the specified face-index to face. Fails if the face is immutable. - Note: face indices within a collection are zero-based. - New in version 0.9.2. 
- face (
- 
HarfBuzz.face_set_upem(face, upem)¶
- Parameters: - face (HarfBuzz.face_t) – A face object
- upem (int) – The units-per-em value to assign
 - Sets the units-per-em (upem) for a face object to the specified value. - New in version 0.9.2. 
- face (
- 
HarfBuzz.feature_from_string(str)¶
- Parameters: - str ( - bytes) – a string to parse- Returns: - %true if str is successfully parsed, %false otherwise - feature: - the - HarfBuzz.feature_tto initialize with the parsed values- Return type: - ( - int, feature:- HarfBuzz.feature_t)- Parses a string into a - HarfBuzz.feature_t.- The format for specifying feature strings follows. All valid CSS font-feature-settings values other than ‘normal’ and the global values are also accepted, though not documented below. CSS string escapes are not supported. - The range indices refer to the positions between Unicode characters. The position before the first character is always 0. - The format is Python-esque. Here is how it all works: - Syntax Value Start End - Setting value: kern 1 0 ∞ Turn feature on +kern 1 0 ∞ Turn feature on -kern 0 0 ∞ Turn feature off kern=0 0 0 ∞ Turn feature off kern=1 1 0 ∞ Turn feature on aalt=2 2 0 ∞ Choose 2nd alternate Setting index: kern[] 1 0 ∞ Turn feature on kern[:] 1 0 ∞ Turn feature on kern[5:] 1 5 ∞ Turn feature on, partial kern[:5] 1 0 5 Turn feature on, partial kern[3:5] 1 3 5 Turn feature on, range kern[3] 1 3 3+1 Turn feature on, single - strMixing it all: aalt[3:5]=2 2 3 5 Turn 2nd alternate on for range- New in version 0.9.5. 
- 
HarfBuzz.feature_to_string(feature)¶
- Parameters: - feature ( - HarfBuzz.feature_t) – an- HarfBuzz.feature_tto convert- Returns: - output string - Return type: - buf: [ - str]- Converts a - HarfBuzz.feature_tinto a- None-terminated string in the format understood by- HarfBuzz.feature_from_string(). The client in responsible for allocating big enough size for buf, 128 bytes is more than enough.- New in version 0.9.5. 
- 
HarfBuzz.font_add_glyph_origin_for_direction(font, glyph, direction, x, y)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
- direction (HarfBuzz.direction_t) – The direction of the text segment
- x (int) – Input = The original X coordinate Output = The X coordinate plus the X-coordinate of the origin
- y (int) – Input = The original Y coordinate Output = The Y coordinate plus the Y-coordinate of the origin
 - Returns: - x: - Input = The original X coordinate Output = The X coordinate plus the X-coordinate of the origin - y: - Input = The original Y coordinate Output = The Y coordinate plus the Y-coordinate of the origin - Return type: - Adds the origin coordinates to an (X,Y) point coordinate, in the specified glyph ID in the specified font. - Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of direction. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_create(face)¶
- Parameters: - face ( - HarfBuzz.face_t) – a face.- Returns: - The new font object - Return type: - HarfBuzz.font_t- Constructs a new font object from the specified face. - New in version 0.9.2. 
- 
HarfBuzz.font_create_sub_font(parent)¶
- Parameters: - parent ( - HarfBuzz.font_t) – The parent font object- Returns: - The new sub-font font object - Return type: - HarfBuzz.font_t- Constructs a sub-font font object from the specified parent font, replicating the parent’s properties. - New in version 0.9.2. 
- 
HarfBuzz.font_funcs_create()¶
- Returns: - The font-functions structure - Return type: - HarfBuzz.font_funcs_t- Creates a new - HarfBuzz.font_funcs_tstructure of font functions.- New in version 0.9.2. 
- 
HarfBuzz.font_funcs_get_empty()¶
- Returns: - The font-functions structure - Return type: - HarfBuzz.font_funcs_t- Fetches an empty font-functions structure. - New in version 0.9.2. 
- 
HarfBuzz.font_funcs_is_immutable(ffuncs)¶
- Parameters: - ffuncs ( - HarfBuzz.font_funcs_t) – The font-functions structure- Returns: - %true if ffuncs is immutable, false otherwise - Return type: - int- Tests whether a font-functions structure is immutable. - New in version 0.9.2. 
- 
HarfBuzz.font_funcs_make_immutable(ffuncs)¶
- Parameters: - ffuncs ( - HarfBuzz.font_funcs_t) – The font-functions structure- Makes a font-functions structure immutable. - New in version 0.9.2. 
- 
HarfBuzz.font_funcs_set_font_h_extents_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_font_extents_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for #hb_font_get_font_h_extents_func_t. - New in version 1.1.2. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_font_v_extents_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_font_extents_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for #hb_font_get_font_v_extents_func_t. - New in version 1.1.2. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_contour_point_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_glyph_contour_point_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.font_get_glyph_contour_point_func_t.- New in version 0.9.2. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_extents_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_glyph_extents_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.font_get_glyph_extents_func_t.- New in version 0.9.2. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_from_name_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_glyph_from_name_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.font_get_glyph_from_name_func_t.- New in version 0.9.2. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – The font-functions structure
- func (HarfBuzz.font_get_glyph_func_t) – callback function
- user_data (objectorNone) – data to pass to func
 - Deprecated. Use - HarfBuzz.font_funcs_set_nominal_glyph_func() and- HarfBuzz.font_funcs_set_variation_glyph_func() instead.- New in version 0.9.2. - Deprecated since version 1.2.3. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_h_advance_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_glyph_advance_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for #hb_font_get_glyph_h_advance_func_t. - New in version 0.9.2. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_h_advances_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_glyph_advances_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for #hb_font_get_glyph_h_advances_func_t. - New in version 1.8.6. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_h_kerning_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – font functions.
- func (HarfBuzz.font_get_glyph_kerning_func_t) –
- user_data (objectorNone) –
 - New in version 0.9.2. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_h_origin_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_glyph_origin_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for #hb_font_get_glyph_h_origin_func_t. - New in version 0.9.2. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_name_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_glyph_name_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.font_get_glyph_name_func_t.- New in version 0.9.2. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_v_advance_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_glyph_advance_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for #hb_font_get_glyph_v_advance_func_t. - New in version 0.9.2. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_v_advances_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_glyph_advances_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for #hb_font_get_glyph_v_advances_func_t. - New in version 1.8.6. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_v_kerning_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – font functions.
- func (HarfBuzz.font_get_glyph_kerning_func_t) –
- user_data (objectorNone) –
 - New in version 0.9.2. - Deprecated since version 2.0.0. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_glyph_v_origin_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_glyph_origin_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for #hb_font_get_glyph_v_origin_func_t. - New in version 0.9.2. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_nominal_glyph_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_nominal_glyph_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.font_get_nominal_glyph_func_t.- New in version 1.2.3. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_nominal_glyphs_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_nominal_glyphs_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.font_get_nominal_glyphs_func_t.- New in version 2.0.0. 
- ffuncs (
- 
HarfBuzz.font_funcs_set_variation_glyph_func(ffuncs, func, *user_data)¶
- Parameters: - ffuncs (HarfBuzz.font_funcs_t) – A font-function structure
- func (HarfBuzz.font_get_variation_glyph_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.font_get_variation_glyph_func_t.- New in version 1.2.3. 
- ffuncs (
- 
HarfBuzz.font_get_empty()¶
- Returns: - The empty font object - Return type: - HarfBuzz.font_t- Fetches the empty font object. - New in version 0.9.2. 
- 
HarfBuzz.font_get_extents_for_direction(font, direction)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- direction (HarfBuzz.direction_t) – The direction of the text segment
 - Returns: - The - HarfBuzz.glyph_extents_tretrieved- Return type: - extents: - HarfBuzz.font_extents_t- Fetches the extents for a font in a text segment of the specified direction. - Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of direction. - New in version 1.1.3. 
- font (
- 
HarfBuzz.font_get_face(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- HarfBuzz.font_tto work upon- Returns: - The - HarfBuzz.face_tvalue- Return type: - HarfBuzz.face_t- Fetches the face associated with the specified font object. - New in version 0.9.2. 
- 
HarfBuzz.font_get_glyph(font, unicode, variation_selector)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- unicode (int) – The Unicode code point to query
- variation_selector (int) – A variation-selector code point
 - Returns: - %true if data found, false otherwise - glyph: - The glyph ID retrieved - Return type: - Fetches the glyph ID for a Unicode code point in the specified font, with an optional variation selector. - If variation_selector is 0, calls - HarfBuzz.font_get_nominal_glyph(); otherwise calls- HarfBuzz.font_get_variation_glyph().- New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_advance_for_direction(font, glyph, direction)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
- direction (HarfBuzz.direction_t) – The direction of the text segment
 - Returns: - x: - The horizontal advance retrieved - y: - The vertical advance retrieved - Return type: - Fetches the advance for a glyph ID from the specified font, in a text segment of the specified direction. - Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of direction. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_advances_for_direction(font, direction, count, first_glyph, glyph_stride)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- direction (HarfBuzz.direction_t) – The direction of the text segment
- count (int) – The number of glyph IDs in the sequence queried
- first_glyph (int) – The first glyph ID to query
- glyph_stride (int) – The stride between successive glyph IDs
 - Returns: - first_advance: - The first advance retrieved - advance_stride: - The stride between successive advances - Return type: - Fetches the advances for a sequence of glyph IDs in the specified font, in a text segment of the specified direction. - Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of direction. - New in version 1.8.6. 
- font (
- 
HarfBuzz.font_get_glyph_contour_point(font, glyph, point_index)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
- point_index (int) – The contour-point index to query
 - Returns: - %true if data found, false otherwise - x: - The X value retrieved for the contour point - y: - The Y value retrieved for the contour point - Return type: - Fetches the (x,y) coordinates of a specified contour-point index in the specified glyph, within the specified font. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_contour_point_for_origin(font, glyph, point_index, direction)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
- point_index (int) – The contour-point index to query
- direction (HarfBuzz.direction_t) – The direction of the text segment
 - Returns: - %true if data found, false otherwise - x: - The X value retrieved for the contour point - y: - The Y value retrieved for the contour point - Return type: - Fetches the (X,Y) coordinates of a specified contour-point index in the specified glyph ID in the specified font, with respect to the origin in a text segment in the specified direction. - Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of direction. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_extents(font, glyph)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
 - Returns: - %true if data found, false otherwise - extents: - The - HarfBuzz.glyph_extents_tretrieved- Return type: - ( - int, extents:- HarfBuzz.glyph_extents_t)- Fetches the - HarfBuzz.glyph_extents_tdata for a glyph ID in the specified font.- New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_extents_for_origin(font, glyph, direction)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
- direction (HarfBuzz.direction_t) – The direction of the text segment
 - Returns: - %true if data found, false otherwise - extents: - The - HarfBuzz.glyph_extents_tretrieved- Return type: - ( - int, extents:- HarfBuzz.glyph_extents_t)- Fetches the - HarfBuzz.glyph_extents_tdata for a glyph ID in the specified font, with respect to the origin in a text segment in the specified direction.- Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of direction. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_from_name(font, name)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- name ([str]) – The name string to query
 - Returns: - %true if data found, false otherwise - glyph: - The glyph ID retrieved - Return type: - Fetches the glyph ID that corresponds to a name string in the specified font. - Note: len == -1 means the name string is null-terminated. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_h_advance(font, glyph)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
 - Returns: - The advance of glyph within font - Return type: - Fetches the advance for a glyph ID in the specified font, for horizontal text segments. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_h_advances(font, count, first_glyph, glyph_stride)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- count (int) – The number of glyph IDs in the sequence queried
- first_glyph (int) – The first glyph ID to query
- glyph_stride (int) – The stride between successive glyph IDs
 - Returns: - first_advance: - The first advance retrieved - advance_stride: - The stride between successive advances - Return type: - Fetches the advances for a sequence of glyph IDs in the specified font, for horizontal text segments. - New in version 1.8.6. 
- font (
- 
HarfBuzz.font_get_glyph_h_kerning(font, left_glyph, right_glyph)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- left_glyph (int) – The glyph ID of the left glyph in the glyph pair
- right_glyph (int) – The glyph ID of the right glyph in the glyph pair
 - Returns: - The kerning adjustment value - Return type: - Fetches the kerning-adjustment value for a glyph-pair in the specified font, in horizontal text segments. - It handles legacy kerning only (as returned by the corresponding - HarfBuzz.font_funcs_tfunction).- New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_h_origin(font, glyph)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
 - Returns: - %true if data found, false otherwise - x: - The X coordinate of the origin - y: - The Y coordinate of the origin - Return type: - Fetches the (X,Y) coordinates of the origin for a glyph ID in the specified font, for horizontal text segments. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_kerning_for_direction(font, first_glyph, second_glyph, direction)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- first_glyph (int) – The glyph ID of the first glyph in the glyph pair to query
- second_glyph (int) – The glyph ID of the second glyph in the glyph pair to query
- direction (HarfBuzz.direction_t) – The direction of the text segment
 - Returns: - x: - The horizontal kerning-adjustment value retrieved - y: - The vertical kerning-adjustment value retrieved - Return type: - Fetches the kerning-adjustment value for a glyph-pair in the specified font. - Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of direction. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_name(font, glyph)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
 - Returns: - %true if data found, zero otherwise - name: - Name string retrieved for the glyph ID - Return type: - Fetches the glyph-name string for a glyph ID in the specified font. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_origin_for_direction(font, glyph, direction)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
- direction (HarfBuzz.direction_t) – The direction of the text segment
 - Returns: - x: - The X coordinate retrieved for the origin - y: - The Y coordinate retrieved for the origin - Return type: - Fetches the (X,Y) coordinates of the origin for a glyph in the specified font. - Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of direction. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_v_advance(font, glyph)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
 - Returns: - The advance of glyph within font - Return type: - Fetches the advance for a glyph ID in the specified font, for vertical text segments. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_glyph_v_advances(font, count, first_glyph, glyph_stride)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- count (int) – The number of glyph IDs in the sequence queried
- first_glyph (int) – The first glyph ID to query
- glyph_stride (int) – The stride between successive glyph IDs
 - Returns: - first_advance: - The first advance retrieved - advance_stride: - The stride between successive advances - Return type: - Fetches the advances for a sequence of glyph IDs in the specified font, for vertical text segments. - New in version 1.8.6. 
- font (
- 
HarfBuzz.font_get_glyph_v_kerning(font, top_glyph, bottom_glyph)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- top_glyph (int) – The glyph ID of the top glyph in the glyph pair
- bottom_glyph (int) – The glyph ID of the bottom glyph in the glyph pair
 - Returns: - The kerning adjustment value - Return type: - Fetches the kerning-adjustment value for a glyph-pair in the specified font, in vertical text segments. - It handles legacy kerning only (as returned by the corresponding - HarfBuzz.font_funcs_tfunction).- New in version 0.9.2. - Deprecated since version 2.0.0. 
- font (
- 
HarfBuzz.font_get_glyph_v_origin(font, glyph)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
 - Returns: - %true if data found, false otherwise - x: - The X coordinate of the origin - y: - The Y coordinate of the origin - Return type: - Fetches the (X,Y) coordinates of the origin for a glyph ID in the specified font, for vertical text segments. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_get_h_extents(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- HarfBuzz.font_tto work upon- Returns: - %true if data found, false otherwise - extents: - The font extents retrieved - Return type: - ( - int, extents:- HarfBuzz.font_extents_t)- Fetches the extents for a specified font, in horizontal text segments. - New in version 1.1.3. 
- 
HarfBuzz.font_get_nominal_glyph(font, unicode)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- unicode (int) – The Unicode code point to query
 - Returns: - %true if data found, false otherwise - glyph: - The glyph ID retrieved - Return type: - Fetches the nominal glyph ID for a Unicode code point in the specified font. - This version of the function should not be used to fetch glyph IDs for code points modified by variation selectors. For variation-selector support, user - HarfBuzz.font_get_variation_glyph() or use- HarfBuzz.font_get_glyph().- New in version 1.2.3. 
- font (
- 
HarfBuzz.font_get_nominal_glyphs(font, count, first_unicode, unicode_stride, first_glyph, glyph_stride)¶
- Parameters: - Return type: - New in version 2.6.3. 
- 
HarfBuzz.font_get_parent(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- HarfBuzz.font_tto work upon- Returns: - The parent font object - Return type: - HarfBuzz.font_t- Fetches the parent font of font. - New in version 0.9.2. 
- 
HarfBuzz.font_get_ppem(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- HarfBuzz.font_tto work upon- Returns: - x_ppem: - Horizontal ppem value - y_ppem: - Vertical ppem value - Return type: - (x_ppem: - int, y_ppem:- int)- Fetches the horizontal and vertical points-per-em (ppem) of a font. - New in version 0.9.2. 
- 
HarfBuzz.font_get_ptem(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- HarfBuzz.font_tto work upon- Returns: - Point size. A value of zero means “not set.” - Return type: - float- Fetches the “point size” of a font. Used in CoreText to implement optical sizing. - New in version 0.9.2. 
- 
HarfBuzz.font_get_scale(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- HarfBuzz.font_tto work upon- Returns: - x_scale: - Horizontal scale value - y_scale: - Vertical scale value - Return type: - (x_scale: - int, y_scale:- int)- Fetches the horizontal and vertical scale of a font. - New in version 0.9.2. 
- 
HarfBuzz.font_get_v_extents(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- HarfBuzz.font_tto work upon- Returns: - %true if data found, false otherwise - extents: - The font extents retrieved - Return type: - ( - int, extents:- HarfBuzz.font_extents_t)- Fetches the extents for a specified font, in vertical text segments. - New in version 1.1.3. 
- 
HarfBuzz.font_get_var_coords_normalized(font, length)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- length (int) – Number of coordinates retrieved
 - Return type: - Fetches the list of normalized variation coordinates currently set on a font. - Return value is valid as long as variation coordinates of the font are not modified. - New in version 1.4.2. 
- font (
- 
HarfBuzz.font_get_variation_glyph(font, unicode, variation_selector)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- unicode (int) – The Unicode code point to query
- variation_selector (int) – The variation-selector code point to query
 - Returns: - %true if data found, false otherwise - glyph: - The glyph ID retrieved - Return type: - Fetches the glyph ID for a Unicode code point when followed by by the specified variation-selector code point, in the specified font. - New in version 1.2.3. 
- font (
- 
HarfBuzz.font_glyph_from_string(font, s)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- s (bytes) – string to query
 - Returns: - %true if data found, false otherwise - glyph: - The glyph ID corresponding to the string requested - Return type: - Fetches the glyph ID from font that matches the specified string. Strings of the format - gidDDDor- uniUUUUare parsed automatically.- Note: len == -1 means the string is null-terminated. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_glyph_to_string(font, glyph)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
 - Returns: - The string containing the glyph name - Return type: - s: [ - str]- Fetches the name of the specified glyph ID in font and returns it in string s. - If the glyph ID has no name in font, a string of the form - gidDDDis generated, with- DDDbeing the glyph ID.- New in version 0.9.2. 
- font (
- 
HarfBuzz.font_is_immutable(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- HarfBuzz.font_tto work upon- Returns: - %true if font is immutable, false otherwise - Return type: - int- Tests whether a font object is immutable. - New in version 0.9.2. 
- 
HarfBuzz.font_make_immutable(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- HarfBuzz.font_tto work upon- Makes font immutable. - New in version 0.9.2. 
- 
HarfBuzz.font_set_face(font, face)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- face (HarfBuzz.face_t) – TheHarfBuzz.face_tto assign
 - Sets face as the font-face value of font. - New in version 1.4.3. 
- font (
- 
HarfBuzz.font_set_funcs(font, klass, font_data, destroy)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- klass (HarfBuzz.font_funcs_t) –
- font_data (objectorNone) – Data to attach to font
- destroy (HarfBuzz.destroy_func_t) – The function to call when font_data is not needed anymore
 - Replaces the font-functions structure attached to a font, updating the font’s user-data with font-data and the destroy callback. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_set_funcs_data(font, font_data, destroy)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- font_data (objectorNone) – Data to attach to font
- destroy (HarfBuzz.destroy_func_t) – The function to call when font_data is not needed anymore
 - Replaces the user data attached to a font, updating the font’s destroy callback. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_set_parent(font, parent)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- parent (HarfBuzz.font_t) – The parent font object to assign
 - Sets the parent font of font. - New in version 1.0.5. 
- font (
- 
HarfBuzz.font_set_ppem(font, x_ppem, y_ppem)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- x_ppem (int) – Horizontal ppem value to assign
- y_ppem (int) – Vertical ppem value to assign
 - Sets the horizontal and vertical pixels-per-em (ppem) of a font. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_set_ptem(font, ptem)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- ptem (float) – font size in points.
 - Sets the “point size” of a font. Set to zero to unset. Used in CoreText to implement optical sizing. - Note: There are 72 points in an inch. - New in version 1.6.0. 
- font (
- 
HarfBuzz.font_set_scale(font, x_scale, y_scale)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- x_scale (int) – Horizontal scale value to assign
- y_scale (int) – Vertical scale value to assign
 - Sets the horizontal and vertical scale of a font. - New in version 0.9.2. 
- font (
- 
HarfBuzz.font_set_var_coords_design(font, coords)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- coords ([float]) – Array of variation coordinates to apply
 - Applies a list of variation coordinates (in design-space units) to a font. - New in version 1.4.2. 
- font (
- 
HarfBuzz.font_set_var_coords_normalized(font, coords)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- coords ([int]) – Array of variation coordinates to apply
 - Applies a list of variation coordinates (in normalized units) to a font. - Note: Coordinates should be normalized to 2.14. - New in version 1.4.2. 
- font (
- 
HarfBuzz.font_set_var_named_instance(font, instance_index)¶
- Parameters: - font (HarfBuzz.font_t) – a font.
- instance_index (int) – named instance index.
 - Sets design coords of a font from a named instance index. - New in version 2.6.0. 
- font (
- 
HarfBuzz.font_set_variations(font, variations)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- variations ([HarfBuzz.variation_t]) – Array of variation settings to apply
 - Applies a list of font-variation settings to a font. - New in version 1.4.2. 
- font (
- 
HarfBuzz.font_subtract_glyph_origin_for_direction(font, glyph, direction, x, y)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph ID to query
- direction (HarfBuzz.direction_t) – The direction of the text segment
- x (int) – Input = The original X coordinate Output = The X coordinate minus the X-coordinate of the origin
- y (int) – Input = The original Y coordinate Output = The Y coordinate minus the Y-coordinate of the origin
 - Returns: - x: - Input = The original X coordinate Output = The X coordinate minus the X-coordinate of the origin - y: - Input = The original Y coordinate Output = The Y coordinate minus the Y-coordinate of the origin - Return type: - Subtracts the origin coordinates from an (X,Y) point coordinate, in the specified glyph ID in the specified font. - Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of direction. - New in version 0.9.2. 
- font (
- 
HarfBuzz.ft_font_changed(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –
- 
HarfBuzz.ft_font_get_load_flags(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- HarfBuzz.font_tto work upon- Returns: - FT_Load_Glyph flags found - Return type: - int- Fetches the FT_Load_Glyph load flags of the specified - HarfBuzz.font_t.- For more information, see https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_load_xxx - New in version 1.0.5. 
- 
HarfBuzz.ft_font_set_funcs(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- HarfBuzz.font_tto work upon- Configures the font-functions structure of the specified - HarfBuzz.font_tfont object to use FreeType font functions.- In particular, you can use this function to configure an existing - HarfBuzz.face_tface object for use with FreeType font functions even if that- HarfBuzz.face_tface object was initially created with- HarfBuzz.face_create(), and therefore was not initially configured to use FreeType font functions.- An - HarfBuzz.face_tface object created with hb_ft_face_create() is preconfigured for FreeType font functions and does not require this function to be used.- Note: Internally, this function creates an FT_Face. - New in version 1.0.5. 
- 
HarfBuzz.ft_font_set_load_flags(font, load_flags)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- load_flags (int) – The FreeType load flags to set
 - Sets the FT_Load_Glyph load flags for the specified - HarfBuzz.font_t.- For more information, see https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_load_xxx - New in version 1.0.5. 
- font (
- 
HarfBuzz.ft_font_unlock_face(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- New in version 2.6.5. 
- 
HarfBuzz.glib_blob_create(gbytes)¶
- Parameters: - gbytes ( - GLib.Bytes) – the- GLib.Bytesstructure to work upon- Returns: - the new - HarfBuzz.blob_tblob object- Return type: - HarfBuzz.blob_t- Creates an - HarfBuzz.blob_tblob from the specified- GLib.Bytesdata structure.- New in version 0.9.38. 
- 
HarfBuzz.glib_get_unicode_funcs()¶
- Returns: - a pointer to the - HarfBuzz.unicode_funcs_tUnicode-functions structure- Return type: - HarfBuzz.unicode_funcs_t- Fetches a Unicode-functions structure that is populated with the appropriate GLib function for each method. - New in version 0.9.38. 
- 
HarfBuzz.glib_script_from_script(script)¶
- Parameters: - script ( - HarfBuzz.script_t) – The- HarfBuzz.script_tto query- Returns: - the - GLib.UnicodeScriptidentifier found- Return type: - GLib.UnicodeScript- Fetches the - GLib.UnicodeScriptidentifier that corresponds to the specified- HarfBuzz.script_tscript.- New in version 0.9.38. 
- 
HarfBuzz.glib_script_to_script(script)¶
- Parameters: - script ( - GLib.UnicodeScript) – The- GLib.UnicodeScriptidentifier to query- Returns: - the - HarfBuzz.script_tscript found- Return type: - HarfBuzz.script_t- Fetches the - HarfBuzz.script_tscript that corresponds to the specified- GLib.UnicodeScriptidentifier.- New in version 0.9.38. 
- 
HarfBuzz.glyph_info_get_glyph_flags(info)¶
- Parameters: - info ( - HarfBuzz.glyph_info_t) – a- HarfBuzz.glyph_info_t- Returns: - The - HarfBuzz.glyph_flags_tencoded within info- Return type: - HarfBuzz.glyph_flags_t- Returns glyph flags encoded within a - HarfBuzz.glyph_info_t.- New in version 1.5.0. 
- 
HarfBuzz.language_from_string(str)¶
- Parameters: - str ( - bytes) – a string representing a BCP 47 language tag- Returns: - The - HarfBuzz.language_tcorresponding to the BCP 47 language tag.- Return type: - HarfBuzz.language_t- Converts str representing a BCP 47 language tag to the corresponding - HarfBuzz.language_t.- New in version 0.9.2. 
- 
HarfBuzz.language_get_default()¶
- Returns: - The default language of the locale as an - HarfBuzz.language_t- Return type: - HarfBuzz.language_t- Fetch the default language from current locale. - Note that the first time this function is called, it calls “setlocale (LC_CTYPE, nullptr)” to fetch current locale. The underlying setlocale function is, in many implementations, NOT threadsafe. To avoid problems, call this function once before multiple threads can call it. This function is only used from - HarfBuzz.buffer_guess_segment_properties() by HarfBuzz itself.- New in version 0.9.2. 
- 
HarfBuzz.language_to_string(language)¶
- Parameters: - language ( - HarfBuzz.language_t) – The- HarfBuzz.language_tto convert- Returns: - A - None-terminated string representing the language. Must not be freed by the caller.- Return type: - str- Converts an - HarfBuzz.language_tto a string.- New in version 0.9.2. 
- 
HarfBuzz.map_allocation_successful(map)¶
- Parameters: - map ( - HarfBuzz.map_t) – A map- Returns: - %true if allocation succeeded, false otherwise - Return type: - int- Tests whether memory allocation for a set was successful. - New in version 1.7.7. 
- 
HarfBuzz.map_clear(map)¶
- Parameters: - map ( - HarfBuzz.map_t) – A map- Clears out the contents of map. - New in version 1.7.7. 
- 
HarfBuzz.map_create()¶
- Returns: - The new - HarfBuzz.map_t- Return type: - HarfBuzz.map_t- Creates a new, initially empty map. - New in version 1.7.7. 
- 
HarfBuzz.map_del(map, key)¶
- Parameters: - map (HarfBuzz.map_t) – A map
- key (int) – The key to delete
 - Removes key and its stored value from map. - New in version 1.7.7. 
- map (
- 
HarfBuzz.map_get(map, key)¶
- Parameters: - map (HarfBuzz.map_t) – A map
- key (int) – The key to query
 - Return type: - Fetches the value stored for key in map. - New in version 1.7.7. 
- map (
- 
HarfBuzz.map_get_empty()¶
- Returns: - The empty - HarfBuzz.map_t- Return type: - HarfBuzz.map_t- Fetches the singleton empty - HarfBuzz.map_t.- New in version 1.7.7. 
- 
HarfBuzz.map_get_population(map)¶
- Parameters: - map ( - HarfBuzz.map_t) – A map- Returns: - The population of map - Return type: - int- Returns the number of key-value pairs in the map. - New in version 1.7.7. 
- 
HarfBuzz.map_has(map, key)¶
- Parameters: - map (HarfBuzz.map_t) – A map
- key (int) – The key to query
 - Returns: - %true if key is found in map, false otherwise - Return type: - Tests whether key is an element of map. - New in version 1.7.7. 
- map (
- 
HarfBuzz.map_is_empty(map)¶
- Parameters: - map ( - HarfBuzz.map_t) – A map- Returns: - %true if map is empty - Return type: - int- Tests whether map is empty (contains no elements). - New in version 1.7.7. 
- 
HarfBuzz.map_set(map, key, value)¶
- Parameters: - map (HarfBuzz.map_t) – A map
- key (int) – The key to store in the map
- value (int) – The value to store for key
 - Stores key:value in the map. - New in version 1.7.7. 
- map (
- 
HarfBuzz.ot_color_glyph_get_layers(face, glyph, start_offset)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- glyph (int) – The glyph index to query
- start_offset (int) – offset of the first layer to retrieve
 - Returns: - Total number of layers available for the glyph index queried - layers: - The array of layers found - Return type: - ( - int, layers: [- HarfBuzz.ot_color_layer_t])- Fetches a list of all color layers for the specified glyph index in the specified face. The list returned will begin at the offset provided. - New in version 2.1.0. 
- face (
- 
HarfBuzz.ot_color_glyph_reference_png(font, glyph)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – a glyph index
 - Returns: - An - HarfBuzz.blob_tcontaining the PNG image for the glyph, if available- Return type: - Fetches the PNG image for a glyph. This function takes a font object, not a face object, as input. To get an optimally sized PNG blob, the UPEM value must be set on the font object. If UPEM is unset, the blob returned will be the largest PNG available. - New in version 2.1.0. 
- font (
- 
HarfBuzz.ot_color_glyph_reference_svg(face, glyph)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- glyph (int) – a svg glyph index
 - Returns: - An - HarfBuzz.blob_tcontaining the SVG document of the glyph, if available- Return type: - Fetches the SVG document for a glyph. The blob may be either plain text or gzip-encoded. - New in version 2.1.0. 
- face (
- 
HarfBuzz.ot_color_has_layers(face)¶
- Parameters: - face ( - HarfBuzz.face_t) –- HarfBuzz.face_tto work upon- Returns: - true if data found, false otherwise - Return type: - int- Tests whether a face includes any - COLRcolor layers.- New in version 2.1.0. 
- 
HarfBuzz.ot_color_has_palettes(face)¶
- Parameters: - face ( - HarfBuzz.face_t) –- HarfBuzz.face_tto work upon- Returns: - true if data found, false otherwise - Return type: - int- Tests whether a face includes a - CPALcolor-palette table.- New in version 2.1.0. 
- 
HarfBuzz.ot_color_has_png(face)¶
- Parameters: - face ( - HarfBuzz.face_t) –- HarfBuzz.face_tto work upon- Returns: - true if data found, false otherwise - Return type: - int- Tests whether a face has PNG glyph images (either in - CBDTor- sbixtables).- New in version 2.1.0. 
- 
HarfBuzz.ot_color_has_svg(face)¶
- Parameters: - face ( - HarfBuzz.face_t) –- HarfBuzz.face_tto work upon.- Returns: - true if data found, false otherwise. - Return type: - int- Tests whether a face includes any - SVGglyph images.- New in version 2.1.0. 
- 
HarfBuzz.ot_color_palette_color_get_name_id(face, color_index)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- color_index (int) – The index of the color
 - Returns: - the Name ID found for the color. - Return type: - Fetches the - nametable Name ID that provides display names for the specificed color in a face’s- CPALcolor palette.- Display names can be generic (e.g., “Background”) or specific (e.g., “Eye color”). - New in version 2.1.0. 
- face (
- 
HarfBuzz.ot_color_palette_get_colors(face, palette_index, start_offset)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- palette_index (int) – the index of the color palette to query
- start_offset (int) – offset of the first color to retrieve
 - Returns: - the total number of colors in the palette - colors: - The array of #hb_color_t records found - Return type: - Fetches a list of the colors in a color palette. - After calling this function, colors will be filled with the palette colors. If colors is - None, the function will just return the number of total colors without storing any actual colors; this can be used for allocating a buffer of suitable size before calling- HarfBuzz.ot_color_palette_get_colors() a second time.- New in version 2.1.0. 
- face (
- 
HarfBuzz.ot_color_palette_get_count(face)¶
- Parameters: - face ( - HarfBuzz.face_t) –- HarfBuzz.face_tto work upon- Returns: - the number of palettes found - Return type: - int- Fetches the number of color palettes in a face. - New in version 2.1.0. 
- 
HarfBuzz.ot_color_palette_get_flags(face, palette_index)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- palette_index (int) – The index of the color palette
 - Returns: - the - HarfBuzz.ot_color_palette_flags_tof the requested color palette- Return type: - Fetches the flags defined for a color palette. - New in version 2.1.0. 
- face (
- 
HarfBuzz.ot_color_palette_get_name_id(face, palette_index)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- palette_index (int) – The index of the color palette
 - Returns: - the Named ID found for the palette. If the requested palette has no name the result is #HB_OT_NAME_ID_INVALID. - Return type: - Fetches the - nametable Name ID that provides display names for a- CPALcolor palette.- Palette display names can be generic (e.g., “Default”) or provide specific, themed names (e.g., “Spring”, “Summer”, “Fall”, and “Winter”). - New in version 2.1.0. 
- face (
- 
HarfBuzz.ot_font_set_funcs(font)¶
- Parameters: - font ( - HarfBuzz.font_t) –- HarfBuzz.font_tto work upon- Sets the font functions to use when working with font. - New in version 0.9.28. 
- 
HarfBuzz.ot_layout_collect_features(face, table_tag, scripts, languages, features)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- scripts (int) – The array of scripts to collect features for
- languages (int) – The array of languages to collect features for
- features (int) – The array of features to collect
 - Returns: - The array of feature indexes found for the query - Return type: - feature_indexes: - HarfBuzz.set_t- Fetches a list of all feature indexes in the specified face’s GSUB table or GPOS table, underneath the specified scripts, languages, and features. If no list of scripts is provided, all scripts will be queried. If no list of languages is provided, all languages will be queried. If no list of features is provided, all features will be queried. - New in version 1.8.5. 
- face (
- 
HarfBuzz.ot_layout_collect_lookups(face, table_tag, scripts, languages, features)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- scripts (int) – The array of scripts to collect lookups for
- languages (int) – The array of languages to collect lookups for
- features (int) – The array of features to collect lookups for
 - Returns: - The array of lookup indexes found for the query - Return type: - lookup_indexes: - HarfBuzz.set_t- Fetches a list of all feature-lookup indexes in the specified face’s GSUB table or GPOS table, underneath the specified scripts, languages, and features. If no list of scripts is provided, all scripts will be queried. If no list of languages is provided, all languages will be queried. If no list of features is provided, all features will be queried. - New in version 0.9.8. 
- face (
- 
HarfBuzz.ot_layout_feature_get_characters(face, table_tag, feature_index, start_offset)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – table tag to query, “GSUB” or “GPOS”.
- feature_index (int) – index of feature to query.
- start_offset (int) – offset of the first character to retrieve
 - Returns: - Number of total sample characters in the cvXX feature. - characters: - A buffer pointer. The Unicode codepoints of the characters for which this feature provides glyph variants. - Return type: - Fetches a list of the characters defined as having a variant under the specified “Character Variant” (“cvXX”) feature tag. - New in version 2.0.0. 
- face (
- 
HarfBuzz.ot_layout_feature_get_lookups(face, table_tag, feature_index, start_offset)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- feature_index (int) – The index of the requested feature
- start_offset (int) – offset of the first lookup to retrieve
 - Returns: - lookup_indexes: - The array of lookup indexes found for the query - Return type: - Fetches a list of all lookups enumerated for the specified feature, in the specified face’s GSUB table or GPOS table. The list returned will begin at the offset provided. - New in version 0.9.7. 
- face (
- 
HarfBuzz.ot_layout_feature_get_name_ids(face, table_tag, feature_index)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – table tag to query, “GSUB” or “GPOS”.
- feature_index (int) – index of feature to query.
 - Returns: - %true if data found, false otherwise - label_id: - The ‘name’ table name ID that specifies a string for a user-interface label for this feature. (May be - None.)- tooltip_id: - The ‘name’ table name ID that specifies a string that an application can use for tooltip text for this feature. (May be - None.)- sample_id: - The ‘name’ table name ID that specifies sample text that illustrates the effect of this feature. (May be - None.)- num_named_parameters: - Number of named parameters. (May be zero.) - first_param_id: - The first ‘name’ table name ID used to specify strings for user-interface labels for the feature parameters. (Must be zero if numParameters is zero.) - Return type: - ( - int, label_id:- int, tooltip_id:- int, sample_id:- int, num_named_parameters:- int, first_param_id:- int)- Fetches name indices from feature parameters for “Stylistic Set” (‘ssXX’) or “Character Variant” (‘cvXX’) features. - New in version 2.0.0. 
- face (
- 
HarfBuzz.ot_layout_feature_with_variations_get_lookups(face, table_tag, feature_index, variations_index, start_offset)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- feature_index (int) – The index of the feature to query
- variations_index (int) – The index of the feature variation to query
- start_offset (int) – offset of the first lookup to retrieve
 - Returns: - lookup_indexes: - The array of lookups found for the query - Return type: - Fetches a list of all lookups enumerated for the specified feature, in the specified face’s GSUB table or GPOS table, enabled at the specified variations index. The list returned will begin at the offset provided. 
- face (
- 
HarfBuzz.ot_layout_get_attach_points(face, glyph, start_offset)¶
- Parameters: - face (HarfBuzz.face_t) – TheHarfBuzz.face_tto work on
- glyph (int) – The #hb_codepoint_t code point to query
- start_offset (int) – offset of the first attachment point to retrieve
 - Returns: - point_array: - The array of attachment points found for the query - Return type: - Fetches a list of all attachment points for the specified glyph in the GDEF table of the face. The list returned will begin at the offset provided. - Useful if the client program wishes to cache the list. 
- face (
- 
HarfBuzz.ot_layout_get_baseline(font, baseline_tag, direction, script_tag, language_tag)¶
- Parameters: - font (HarfBuzz.font_t) – a font
- baseline_tag (HarfBuzz.ot_layout_baseline_tag_t) – a baseline tag
- direction (HarfBuzz.direction_t) – text direction.
- script_tag (int) – script tag.
- language_tag (int) – language tag.
 - Returns: - if found baseline value in the font. - coord: - baseline value if found. - Return type: - Fetches a baseline value from the face. - New in version 2.6.0. 
- font (
- 
HarfBuzz.ot_layout_get_glyph_class(face, glyph)¶
- Parameters: - face (HarfBuzz.face_t) – TheHarfBuzz.face_tto work on
- glyph (int) – The #hb_codepoint_t code point to query
 - Returns: - The - HarfBuzz.ot_layout_glyph_class_tglyph class of the given code point in the GDEF table of the face.- Return type: - Fetches the GDEF class of the requested glyph in the specified face. - New in version 0.9.7. 
- face (
- 
HarfBuzz.ot_layout_get_glyphs_in_class(face, klass)¶
- Parameters: - face (HarfBuzz.face_t) – TheHarfBuzz.face_tto work on
- klass (HarfBuzz.ot_layout_glyph_class_t) – TheHarfBuzz.ot_layout_glyph_class_tGDEF class to retrieve
 - Returns: - The - HarfBuzz.set_tset of all glyphs belonging to the requested class.- Return type: - glyphs: - HarfBuzz.set_t- Retrieves the set of all glyphs from the face that belong to the requested glyph class in the face’s GDEF table. - New in version 0.9.7. 
- face (
- 
HarfBuzz.ot_layout_get_ligature_carets(font, direction, glyph, start_offset)¶
- Parameters: - font (HarfBuzz.font_t) – TheHarfBuzz.font_tto work on
- direction (HarfBuzz.direction_t) – TheHarfBuzz.direction_ttext direction to use
- glyph (int) – The #hb_codepoint_t code point to query
- start_offset (int) – offset of the first caret position to retrieve
 - Returns: - caret_array: - The array of caret positions found for the query - Return type: - Fetches a list of the caret positions defined for a ligature glyph in the GDEF table of the font. The list returned will begin at the offset provided. 
- font (
- 
HarfBuzz.ot_layout_get_size_params(face)¶
- Parameters: - face ( - HarfBuzz.face_t) –- HarfBuzz.face_tto work upon- Returns: - %true if data found, false otherwise - design_size: - The design size of the face - subfamily_id: - The identifier of the face within the font subfamily - subfamily_name_id: - The ‘name’ table name ID of the face within the font subfamily - range_start: - The minimum size of the recommended size range for the face - range_end: - The maximum size of the recommended size range for the face - Return type: - ( - int, design_size:- int, subfamily_id:- int, subfamily_name_id:- int, range_start:- int, range_end:- int)- Fetches optical-size feature data (i.e., the - sizefeature from GPOS). Note that the subfamily_id and the subfamily name string (accessible via the subfamily_name_id) as used here are defined as pertaining only to fonts within a font family that differ specifically in their respective size ranges; other ways to differentiate fonts within a subfamily are not covered by the- sizefeature.- For more information on this distinction, see the `size feature documentation < https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#tag-size>`__. - New in version 0.9.10. 
- 
HarfBuzz.ot_layout_has_glyph_classes(face)¶
- Parameters: - face ( - HarfBuzz.face_t) –- HarfBuzz.face_tto work upon- Returns: - %true if data found, false otherwise - Return type: - int- Tests whether a face has any glyph classes defined in its GDEF table. 
- 
HarfBuzz.ot_layout_has_positioning(face)¶
- Parameters: - face ( - HarfBuzz.face_t) –- HarfBuzz.face_tto work upon- Returns: - %true if the face has GPOS data, false otherwise - Return type: - int
- 
HarfBuzz.ot_layout_has_substitution(face)¶
- Parameters: - face ( - HarfBuzz.face_t) –- HarfBuzz.face_tto work upon- Returns: - %true if data found, false otherwise - Return type: - int- Tests whether the specified face includes any GSUB substitutions. 
- 
HarfBuzz.ot_layout_language_find_feature(face, table_tag, script_index, language_index, feature_tag)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- script_index (int) – The index of the requested script tag
- language_index (int) – The index of the requested language tag
- feature_tag (int) – #hb_tag_t of the feature tag requested
 - Returns: - %true if the feature is found, false otherwise - feature_index: - The index of the requested feature - Return type: - Fetches the index of a given feature tag in the specified face’s GSUB table or GPOS table, underneath the specified script and language. 
- face (
- 
HarfBuzz.ot_layout_language_get_feature_indexes(face, table_tag, script_index, language_index, start_offset)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- script_index (int) – The index of the requested script tag
- language_index (int) – The index of the requested language tag
- start_offset (int) – offset of the first feature tag to retrieve
 - Returns: - feature_indexes: - The array of feature indexes found for the query - Return type: - Fetches a list of all features in the specified face’s GSUB table or GPOS table, underneath the specified script and language. The list returned will begin at the offset provided. 
- face (
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- script_index (int) – The index of the requested script tag
- language_index (int) – The index of the requested language tag
- start_offset (int) – offset of the first feature tag to retrieve
 - Returns: - feature_tags: - The array of #hb_tag_t feature tags found for the query - Return type: - Fetches a list of all features in the specified face’s GSUB table or GPOS table, underneath the specified script and language. The list returned will begin at the offset provided. 
- face (
- 
HarfBuzz.ot_layout_language_get_required_feature(face, table_tag, script_index, language_index)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- script_index (int) – The index of the requested script tag
- language_index (int) – The index of the requested language tag
 - Returns: - %true if the feature is found, false otherwise - feature_index: - The index of the requested feature - feature_tag: - The #hb_tag_t of the requested feature - Return type: - Fetches the tag of a requested feature index in the given face’s GSUB or GPOS table, underneath the specified script and language. - New in version 0.9.30. 
- face (
- 
HarfBuzz.ot_layout_language_get_required_feature_index(face, table_tag, script_index, language_index)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- script_index (int) – The index of the requested script tag
- language_index (int) – The index of the requested language tag
 - Returns: - %true if the feature is found, false otherwise - feature_index: - The index of the requested feature - Return type: - Fetches the index of a requested feature in the given face’s GSUB or GPOS table, underneath the specified script and language. 
- face (
- 
HarfBuzz.ot_layout_lookup_collect_glyphs(face, table_tag, lookup_index)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- lookup_index (int) – The index of the feature lookup to query
 - Returns: - glyphs_before: - Array of glyphs preceding the substitution range - glyphs_input: - Array of input glyphs that would be substituted by the lookup - glyphs_after: - Array of glyphs following the substitution range - glyphs_output: - Array of glyphs that would be the substituted output of the lookup - Return type: - (glyphs_before: - HarfBuzz.set_t, glyphs_input:- HarfBuzz.set_t, glyphs_after:- HarfBuzz.set_t, glyphs_output:- HarfBuzz.set_t)- Fetches a list of all glyphs affected by the specified lookup in the specified face’s GSUB table or GPOS table. - New in version 0.9.7. 
- face (
- 
HarfBuzz.ot_layout_lookup_get_glyph_alternates(face, lookup_index, glyph, start_offset)¶
- Parameters: - face (HarfBuzz.face_t) – a face.
- lookup_index (int) – index of the feature lookup to query.
- glyph (int) – a glyph id.
- start_offset (int) – starting offset.
 - Returns: - total number of alternates found in the specific lookup index for the given glyph id. - alternate_glyphs: - A glyphs buffer. Alternate glyphs associated with the glyph id. - Return type: - Fetches alternates of a glyph from a given GSUB lookup index. - New in version 2.6.8. 
- face (
- 
HarfBuzz.ot_layout_lookup_substitute_closure(face, lookup_index)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- lookup_index (int) – index of the feature lookup to query
 - Returns: - Array of glyphs comprising the transitive closure of the lookup - Return type: - glyphs: - HarfBuzz.set_t- Compute the transitive closure of glyphs needed for a specified lookup. - New in version 0.9.7. 
- face (
- 
HarfBuzz.ot_layout_lookup_would_substitute(face, lookup_index, glyphs, glyphs_length, zero_context)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- lookup_index (int) – The index of the lookup to query
- glyphs (int) – The sequence of glyphs to query for substitution
- glyphs_length (int) – The length of the glyph sequence
- zero_context (int) – #hb_bool_t indicating whether substitutions should be context-free
 - Returns: - %true if a substitution would be triggered, false otherwise - Return type: - Tests whether a specified lookup in the specified face would trigger a substitution on the given glyph sequence. - New in version 0.9.7. 
- face (
- 
HarfBuzz.ot_layout_lookups_substitute_closure(face, lookups)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- lookups (HarfBuzz.set_t) – The set of lookups to query
 - Returns: - Array of glyphs comprising the transitive closure of the lookups - Return type: - glyphs: - HarfBuzz.set_t- Compute the transitive closure of glyphs needed for all of the provided lookups. - New in version 1.8.1. 
- face (
- 
HarfBuzz.ot_layout_script_find_language(face, table_tag, script_index, language_tag, language_index)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- script_index (int) – The index of the requested script tag
- language_tag (int) – The #hb_tag_t of the requested language
- language_index (int) – The index of the requested language
 - Returns: - %true if the language tag is found, false otherwise - Return type: - Fetches the index of a given language tag in the specified face’s GSUB table or GPOS table, underneath the specified script tag. - Deprecated since version ???: ?? 
- face (
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- script_index (int) – The index of the requested script tag
- start_offset (int) – offset of the first language tag to retrieve
 - Returns: - language_tags: - Array of language tags found in the table - Return type: - Fetches a list of language tags in the given face’s GSUB or GPOS table, underneath the specified script index. The list returned will begin at the offset provided. 
- face (
- 
HarfBuzz.ot_layout_script_select_language(face, table_tag, script_index, language_count, language_tags)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- script_index (int) – The index of the requested script tag
- language_count (int) – The number of languages in the specified script
- language_tags (int) – The array of language tags
 - Returns: - %true if the language tag is found, false otherwise - language_index: - The index of the requested language - Return type: - Fetches the index of a given language tag in the specified face’s GSUB table or GPOS table, underneath the specified script index. - New in version 2.0.0. 
- face (
- 
HarfBuzz.ot_layout_table_choose_script(face, table_tag, script_tags)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- script_tags (int) – Array of #hb_tag_t script tags
 - Returns: - script_index: - The index of the requested script tag - chosen_script: - #hb_tag_t of the script tag requested - Return type: - Deprecated since 2.0.0 
- face (
- 
HarfBuzz.ot_layout_table_find_feature_variations(face, table_tag, coords, num_coords)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- coords (int) – The variation coordinates to query
- num_coords (int) – The number of variation coordinates
 - Returns: - variations_index: - The array of feature variations found for the query - Return type: - Fetches a list of feature variations in the specified face’s GSUB table or GPOS table, at the specified variation coordinates. 
- face (
- 
HarfBuzz.ot_layout_table_find_script(face, table_tag, script_tag)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- script_tag (int) – #hb_tag_t of the script tag requested
 - Returns: - %true if the script is found, false otherwise - script_index: - The index of the requested script tag - Return type: - Fetches the index if a given script tag in the specified face’s GSUB table or GPOS table. 
- face (
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- start_offset (int) – offset of the first feature tag to retrieve
 - Returns: - feature_tags: - Array of feature tags found in the table - Return type: - Fetches a list of all feature tags in the given face’s GSUB or GPOS table. 
- face (
- 
HarfBuzz.ot_layout_table_get_lookup_count(face, table_tag)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
 - Return type: - Fetches the total number of lookups enumerated in the specified face’s GSUB table or GPOS table. - New in version 0.9.22. 
- face (
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- start_offset (int) – offset of the first script tag to retrieve
 - Returns: - script_tags: - The array of #hb_tag_t script tags found for the query - Return type: - Fetches a list of all scripts enumerated in the specified face’s GSUB table or GPOS table. The list returned will begin at the offset provided. 
- face (
- 
HarfBuzz.ot_layout_table_select_script(face, table_tag, script_count, script_tags)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- table_tag (int) – HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
- script_count (int) – Number of script tags in the array
- script_tags (int) – Array of #hb_tag_t script tags
 - Returns: - script_index: - The index of the requested script - chosen_script: - #hb_tag_t of the requested script - Return type: - New in version 2.0.0. 
- face (
- 
HarfBuzz.ot_math_get_constant(font, constant)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- constant (HarfBuzz.ot_math_constant_t) –HarfBuzz.ot_math_constant_tthe constant to retrieve
 - Returns: - the requested constant or zero - Return type: - Fetches the specified math constant. For most constants, the value returned is an #hb_position_t. - However, if the requested constant is - HarfBuzz.ot_math_constant_t.SCRIPT_PERCENT_SCALE_DOWN,- HarfBuzz.ot_math_constant_t.SCRIPT_SCRIPT_PERCENT_SCALE_DOWNor- HarfBuzz.ot_math_constant_t.SCRIPT_PERCENT_SCALE_DOWN, then the return value is an integer between 0 and 100 representing that percentage.- New in version 1.3.3. 
- font (
- 
HarfBuzz.ot_math_get_glyph_assembly(font, glyph, direction, start_offset)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The index of the glyph to stretch
- direction (HarfBuzz.direction_t) – direction of the stretching (horizontal or vertical)
- start_offset (int) – offset of the first glyph part to retrieve
 - Returns: - the total number of parts in the glyph assembly - parts: - the glyph parts returned - italics_correction: - italics correction of the glyph assembly - Return type: - ( - int, parts: [- HarfBuzz.ot_math_glyph_part_t], italics_correction:- int)- Fetches the GlyphAssembly for the specified font, glyph index, and direction. Returned are a list of - HarfBuzz.ot_math_glyph_part_tglyph 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 - HarfBuzz.direction_tvalues are accepted, only the result of #HB_DIRECTION_IS_HORIZONTAL is considered.- New in version 1.3.3. 
- font (
- 
HarfBuzz.ot_math_get_glyph_italics_correction(font, glyph)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph index from which to retrieve the value
 - Returns: - the italics correction of the glyph or zero - Return type: - Fetches an italics-correction value (if one exists) for the specified glyph index. - New in version 1.3.3. 
- font (
- 
HarfBuzz.ot_math_get_glyph_kerning(font, glyph, kern, correction_height)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The glyph index from which to retrieve the value
- kern (HarfBuzz.ot_math_kern_t) – TheHarfBuzz.ot_math_kern_tfrom which to retrieve the value
- correction_height (int) – the correction height to use to determine the kerning.
 - Returns: - requested kerning value or zero - Return type: - 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. - New in version 1.3.3. 
- font (
- 
HarfBuzz.ot_math_get_glyph_top_accent_attachment(font, glyph)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – 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 - Return type: - 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 - MathTopAccentAttachmenttable (or, when font has no- MathTopAccentAttachmenttable or no- MATHtable, any glyph) - the function synthesizes a value, returning the position at one-half the glyph’s advance width.- New in version 1.3.3. 
- font (
- 
HarfBuzz.ot_math_get_glyph_variants(font, glyph, direction, start_offset)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- glyph (int) – The index of the glyph to stretch
- direction (HarfBuzz.direction_t) – The direction of the stretching (horizontal or vertical)
- start_offset (int) – offset of the first variant to retrieve
 - Returns: - the total number of size variants available or zero - variants: - array of variants returned - Return type: - ( - int, variants: [- HarfBuzz.ot_math_glyph_variant_t])- Fetches the MathGlyphConstruction for the specified font, glyph index, and direction. The corresponding list of size variants is returned as a list of - HarfBuzz.ot_math_glyph_variant_tstructs.- The direction parameter is only used to select between horizontal or vertical directions for the construction. Even though all - HarfBuzz.direction_tvalues are accepted, only the result of #HB_DIRECTION_IS_HORIZONTAL is considered.- New in version 1.3.3. 
- font (
- 
HarfBuzz.ot_math_get_min_connector_overlap(font, direction)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- direction (HarfBuzz.direction_t) – direction of the stretching (horizontal or vertical)
 - Returns: - requested minimum connector overlap or zero - Return type: - 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 - HarfBuzz.direction_tvalues are accepted, only the result of #HB_DIRECTION_IS_HORIZONTAL is considered.- New in version 1.3.3. 
- font (
- 
HarfBuzz.ot_math_has_data(face)¶
- Parameters: - face ( - HarfBuzz.face_t) –- HarfBuzz.face_tto test- Returns: - true if the table is found, false otherwise - Return type: - int- Tests whether a face has a - MATHtable.- New in version 1.3.3. 
- 
HarfBuzz.ot_math_is_glyph_extended_shape(face, glyph)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- glyph (int) – The glyph index to test
 - Returns: - true if the glyph is an extended shape, false otherwise - Return type: - Tests whether the given glyph index is an extended shape in the face. - New in version 1.3.3. 
- face (
- Parameters: - face (HarfBuzz.face_t) – a face object
- start_offset (int) – iteration’s start offset
 - Returns: - Number of all available feature types. - entries: - entries tags buffer - Return type: - ( - int, entries: [- HarfBuzz.ot_meta_tag_t])- New in version 2.6.0. 
- face (
- 
HarfBuzz.ot_meta_reference_entry(face, meta_tag)¶
- Parameters: - face (HarfBuzz.face_t) – aHarfBuzz.face_tobject.
- meta_tag (HarfBuzz.ot_meta_tag_t) – tag of metadata you like to have.
 - Returns: - A blob containing the blob. - Return type: - It fetches metadata entry of a given tag from a font. - New in version 2.6.0. 
- face (
- 
HarfBuzz.ot_metrics_get_position(font, metrics_tag)¶
- Parameters: - font (HarfBuzz.font_t) – aHarfBuzz.font_tobject.
- metrics_tag (HarfBuzz.ot_metrics_tag_t) – tag of metrics value you like to fetch.
 - Returns: - Whether found the requested metrics in the font. - position: - result of metrics value from the font. - Return type: - It fetches metrics value corresponding to a given tag from a font. - New in version 2.6.0. 
- font (
- 
HarfBuzz.ot_metrics_get_variation(font, metrics_tag)¶
- Parameters: - font (HarfBuzz.font_t) –
- metrics_tag (HarfBuzz.ot_metrics_tag_t) –
 - Return type: - New in version 2.6.0. 
- font (
- 
HarfBuzz.ot_metrics_get_x_variation(font, metrics_tag)¶
- Parameters: - font (HarfBuzz.font_t) –
- metrics_tag (HarfBuzz.ot_metrics_tag_t) –
 - Return type: - New in version 2.6.0. 
- font (
- 
HarfBuzz.ot_metrics_get_y_variation(font, metrics_tag)¶
- Parameters: - font (HarfBuzz.font_t) –
- metrics_tag (HarfBuzz.ot_metrics_tag_t) –
 - Return type: - New in version 2.6.0. 
- font (
- 
HarfBuzz.ot_name_get_utf16(face, name_id, language)¶
- Parameters: - face (HarfBuzz.face_t) – font face.
- name_id (int) – OpenType name identifier to fetch.
- language (HarfBuzz.language_t) – language to fetch the name for.
 - Returns: - full length of the requested string, or 0 if not found. - text: - buffer to write fetched name into. - Return type: - Fetches a font name from the OpenType ‘name’ table. If language is - HarfBuzz.LANGUAGE_INVALID, English (“en”) is assumed. Returns string in UTF-16 encoding.- New in version 2.1.0. 
- face (
- 
HarfBuzz.ot_name_get_utf32(face, name_id, language)¶
- Parameters: - face (HarfBuzz.face_t) – font face.
- name_id (int) – OpenType name identifier to fetch.
- language (HarfBuzz.language_t) – language to fetch the name for.
 - Returns: - full length of the requested string, or 0 if not found. - text: - buffer to write fetched name into. - Return type: - Fetches a font name from the OpenType ‘name’ table. If language is - HarfBuzz.LANGUAGE_INVALID, English (“en”) is assumed. Returns string in UTF-32 encoding.- New in version 2.1.0. 
- face (
- 
HarfBuzz.ot_name_get_utf8(face, name_id, language)¶
- Parameters: - face (HarfBuzz.face_t) – font face.
- name_id (int) – OpenType name identifier to fetch.
- language (HarfBuzz.language_t) – language to fetch the name for.
 - Returns: - full length of the requested string, or 0 if not found. - text: - buffer to write fetched name into. - Return type: - Fetches a font name from the OpenType ‘name’ table. If language is - HarfBuzz.LANGUAGE_INVALID, English (“en”) is assumed. Returns string in UTF-8 encoding.- New in version 2.1.0. 
- face (
- 
HarfBuzz.ot_name_list_names(face)¶
- Parameters: - face ( - HarfBuzz.face_t) – font face.- Returns: - Array of available name entries. - Return type: - [ - HarfBuzz.ot_name_entry_t]- Enumerates all available name IDs and language combinations. Returned array is owned by the face and should not be modified. It can be used as long as face is alive. - New in version 2.1.0. 
- 
HarfBuzz.ot_shape_glyphs_closure(font, buffer, features)¶
- Parameters: - font (HarfBuzz.font_t) –HarfBuzz.font_tto work upon
- buffer (HarfBuzz.buffer_t) – The input buffer to compute from
- features ([HarfBuzz.feature_t]) – The features enabled on the buffer
 - Returns: - The - HarfBuzz.set_tset of glyphs comprising the transitive closure of the query- Return type: - glyphs: - HarfBuzz.set_t- Computes the transitive closure of glyphs needed for a specified input buffer under the given font and feature list. The closure is computed as a set, not as a list. - New in version 0.9.2. 
- font (
- 
HarfBuzz.ot_tag_from_language(language)¶
- Parameters: - language ( - HarfBuzz.language_t) –- Return type: - int
- 
HarfBuzz.ot_tag_to_language(tag)¶
- Parameters: - tag ( - int) –- Return type: - HarfBuzz.language_t- New in version 0.9.2. 
- 
HarfBuzz.ot_tag_to_script(tag)¶
- Parameters: - tag ( - int) –- Return type: - HarfBuzz.script_t
- Parameters: - script (HarfBuzz.script_t) –
- script_tag_1 (int) –
- script_tag_2 (int) –
 
- script (
- Parameters: - script (HarfBuzz.script_t) – anHarfBuzz.script_tto convert.
- language (HarfBuzz.language_t) – anHarfBuzz.language_tto convert.
- script_count (intorNone) – maximum number of script tags to retrieve (IN) and actual number of script tags retrieved (OUT)
- language_count (intorNone) – maximum number of language tags to retrieve (IN) and actual number of language tags retrieved (OUT)
 - Returns: - script_tags: - array of size at least script_count to store the script tag results - language_tags: - array of size at least language_count to store the language tag results - Return type: - Converts an - HarfBuzz.script_tand an- HarfBuzz.language_tto script and language tags.- New in version 2.0.0. 
- script (
- Parameters: - script_tag (int) – a script tag
- language_tag (int) – a language tag
- script (HarfBuzz.script_torNone) – theHarfBuzz.script_tcorresponding to script_tag (OUT).
- language (HarfBuzz.language_torNone) – theHarfBuzz.language_tcorresponding to script_tag and language_tag (OUT).
 - Converts a script tag and a language tag to an - HarfBuzz.script_tand an- HarfBuzz.language_t.- New in version 2.0.0. 
- script_tag (
- 
HarfBuzz.ot_var_find_axis(face, axis_tag, axis_index)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- axis_tag (int) – The #hb_tag_t of the variation axis to query
- axis_index (int) – The index of the variation axis
 - Returns: - axis_info: - The - HarfBuzz.ot_var_axis_info_tof the axis tag queried- Return type: - ( - int, axis_info:- HarfBuzz.ot_var_axis_t)- Fetches the variation-axis information corresponding to the specified axis tag in the specified face. - New in version 1.4.2. - Deprecated since version 2.2.0: * use - HarfBuzz.ot_var_find_axis_info() instead
- face (
- 
HarfBuzz.ot_var_find_axis_info(face, axis_tag)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- axis_tag (int) – The #hb_tag_t of the variation axis to query
 - Returns: - true if data found, false otherwise - axis_info: - The - HarfBuzz.ot_var_axis_info_tof the axis tag queried- Return type: - ( - int, axis_info:- HarfBuzz.ot_var_axis_info_t)- Fetches the variation-axis information corresponding to the specified axis tag in the specified face. - New in version 2.2.0. 
- face (
- 
HarfBuzz.ot_var_get_axes(face, start_offset)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- start_offset (int) – offset of the first lookup to retrieve
 - Returns: - axes_array: - The array of variation axes found - Return type: - ( - int, axes_array: [- HarfBuzz.ot_var_axis_t])- Fetches a list of all variation axes in the specified face. The list returned will begin at the offset provided. - New in version 1.4.2. - Deprecated since version 2.2.0: use - HarfBuzz.ot_var_get_axis_infos() instead
- face (
- 
HarfBuzz.ot_var_get_axis_count(face)¶
- Parameters: - face ( - HarfBuzz.face_t) – The- HarfBuzz.face_tto work on- Returns: - the number of variation axes defined - Return type: - int- Fetches the number of OpenType variation axes included in the face. - New in version 1.4.2. 
- 
HarfBuzz.ot_var_get_axis_infos(face, start_offset)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto work upon
- start_offset (int) – offset of the first lookup to retrieve
 - Returns: - the number of variation axes in the face - axes_array: - The array of variation axes found - Return type: - ( - int, axes_array: [- HarfBuzz.ot_var_axis_info_t])- Fetches a list of all variation axes in the specified face. The list returned will begin at the offset provided. - New in version 2.2.0. 
- face (
- 
HarfBuzz.ot_var_get_named_instance_count(face)¶
- Parameters: - face ( - HarfBuzz.face_t) – The- HarfBuzz.face_tto work on- Returns: - the number of named instances defined - Return type: - int- Fetches the number of named instances included in the face. - New in version 2.2.0. 
- 
HarfBuzz.ot_var_has_data(face)¶
- Parameters: - face ( - HarfBuzz.face_t) – The- HarfBuzz.face_tto work on- Returns: - true if data found, false otherwise - Return type: - int- Tests whether a face includes any OpenType variation data in the - fvartable.- New in version 1.4.2. 
- 
HarfBuzz.ot_var_named_instance_get_design_coords(face, instance_index)¶
- Parameters: - face (HarfBuzz.face_t) – TheHarfBuzz.face_tto work on
- instance_index (int) – The index of the named instance to query
 - Returns: - the number of variation axes in the face - coords: - The array of coordinates found for the query - Return type: - Fetches the design-space coordinates corresponding to the given named instance in the face. - New in version 2.2.0. 
- face (
- 
HarfBuzz.ot_var_named_instance_get_postscript_name_id(face, instance_index)¶
- Parameters: - face (HarfBuzz.face_t) – TheHarfBuzz.face_tto work on
- instance_index (int) – The index of the named instance to query
 - Returns: - the Name ID found for the PostScript name - Return type: - Fetches the - nametable Name ID that provides display names for the “PostScript name” defined for the given named instance in the face.- New in version 2.2.0. 
- face (
- 
HarfBuzz.ot_var_named_instance_get_subfamily_name_id(face, instance_index)¶
- Parameters: - face (HarfBuzz.face_t) – TheHarfBuzz.face_tto work on
- instance_index (int) – The index of the named instance to query
 - Returns: - the Name ID found for the Subfamily name - Return type: - Fetches the - nametable Name ID that provides display names for the “Subfamily name” defined for the given named instance in the face.- New in version 2.2.0. 
- face (
- 
HarfBuzz.ot_var_normalize_coords(face, coords_length, design_coords)¶
- Parameters: - face (HarfBuzz.face_t) – TheHarfBuzz.face_tto work on
- coords_length (int) – The length of the coordinate array
- design_coords (float) – The design-space coordinates to normalize
 - Returns: - The normalized coordinates - Return type: - normalized_coords: - int- Normalizes the given design-space coordinates. The minimum and maximum values for the axis are mapped to the interval [-1,1], with the default axis value mapped to 0. - Any additional scaling defined in the face’s - avartable is also applied, as described at https://docs.microsoft.com/en-us/typography/opentype/spec/avar- New in version 1.4.2. 
- face (
- 
HarfBuzz.ot_var_normalize_variations(face, variations, variations_length)¶
- Parameters: - face (HarfBuzz.face_t) – TheHarfBuzz.face_tto work on
- variations (HarfBuzz.variation_t) – The array of variations to normalize
- variations_length (int) – The number of variations to normalize
 - Returns: - The array of normalized coordinates - Return type: - coords: [ - int]- Normalizes all of the coordinates in the given list of variation axes. - New in version 1.4.2. 
- face (
- 
HarfBuzz.script_from_iso15924_tag(tag)¶
- Parameters: - tag ( - int) – an #hb_tag_t representing an ISO 15924 tag.- Returns: - An - HarfBuzz.script_tcorresponding to the ISO 15924 tag.- Return type: - HarfBuzz.script_t- Converts an ISO 15924 script tag to a corresponding - HarfBuzz.script_t.- New in version 0.9.2. 
- 
HarfBuzz.script_from_string(str)¶
- Parameters: - str ( - bytes) – a string representing an ISO 15924 tag.- Returns: - An - HarfBuzz.script_tcorresponding to the ISO 15924 tag.- Return type: - HarfBuzz.script_t- Converts a string str representing an ISO 15924 script tag to a corresponding - HarfBuzz.script_t. Shorthand for- HarfBuzz.tag_from_string() then- HarfBuzz.script_from_iso15924_tag().- New in version 0.9.2. 
- 
HarfBuzz.script_get_horizontal_direction(script)¶
- Parameters: - script ( - HarfBuzz.script_t) – The- HarfBuzz.script_tto query- Returns: - The horizontal - HarfBuzz.direction_tof script- Return type: - HarfBuzz.direction_t- Fetches the - HarfBuzz.direction_tof a script when it is set horizontally. All right-to-left scripts will return- HarfBuzz.direction_t.RTL. All left-to-right scripts will return- HarfBuzz.direction_t.LTR. Scripts that can be written either horizontally or vertically will return- HarfBuzz.direction_t.INVALID. Unknown scripts will return- HarfBuzz.direction_t.LTR.- New in version 0.9.2. 
- 
HarfBuzz.script_to_iso15924_tag(script)¶
- Parameters: - script ( - HarfBuzz.script_t) – an- HarfBuzz.script_tto convert.- Returns: - An #hb_tag_t representing an ISO 15924 script tag. - Return type: - int- Converts an - HarfBuzz.script_tto a corresponding ISO 15924 script tag.- New in version 0.9.2. 
- 
HarfBuzz.segment_properties_equal(a, b)¶
- Parameters: - a (HarfBuzz.segment_properties_t) – firstHarfBuzz.segment_properties_tto compare.
- b (HarfBuzz.segment_properties_t) – secondHarfBuzz.segment_properties_tto compare.
 - Returns: - %true if all properties of a equal those of b, %false otherwise. - Return type: - Checks the equality of two - HarfBuzz.segment_properties_t’s.- New in version 0.9.7. 
- a (
- 
HarfBuzz.segment_properties_hash(p)¶
- Parameters: - p ( - HarfBuzz.segment_properties_t) –- HarfBuzz.segment_properties_tto hash.- Returns: - A hash of p. - Return type: - int- Creates a hash representing p. - New in version 0.9.7. 
- 
HarfBuzz.set_add(set, codepoint)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- codepoint (int) – The element to add to set
 - Adds codepoint to set. - New in version 0.9.2. 
- set (
- 
HarfBuzz.set_add_range(set, first, last)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- first (int) – The first element to add to set
- last (int) – The final element to add to set
 - Adds all of the elements from first to last (inclusive) to set. - New in version 0.9.7. 
- set (
- 
HarfBuzz.set_allocation_successful(set)¶
- Parameters: - set ( - HarfBuzz.set_t) – A set- Returns: - %true if allocation succeeded, false otherwise - Return type: - int- Tests whether memory allocation for a set was successful. - New in version 0.9.2. 
- 
HarfBuzz.set_clear(set)¶
- Parameters: - set ( - HarfBuzz.set_t) – A set- Clears out the contents of a set. - New in version 0.9.2. 
- 
HarfBuzz.set_create()¶
- Returns: - The new - HarfBuzz.set_t- Return type: - HarfBuzz.set_t- Creates a new, initially empty set. - New in version 0.9.2. 
- 
HarfBuzz.set_del(set, codepoint)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- codepoint (int) – Removes codepoint from set
 - Removes codepoint from set. - New in version 0.9.2. 
- set (
- 
HarfBuzz.set_del_range(set, first, last)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- first (int) – The first element to remove from set
- last (int) – The final element to remove from set
 - Removes all of the elements from first to last (inclusive) from set. - New in version 0.9.7. 
- set (
- 
HarfBuzz.set_get_empty()¶
- Returns: - The empty - HarfBuzz.set_t- Return type: - HarfBuzz.set_t- Fetches the singleton empty - HarfBuzz.set_t.- New in version 0.9.2. 
- 
HarfBuzz.set_get_max(set)¶
- Parameters: - set ( - HarfBuzz.set_t) – A set- Returns: - maximum of set, or - HarfBuzz.SET_VALUE_INVALIDif set is empty.- Return type: - int- Finds the largest element in the set. - New in version 0.9.7. 
- 
HarfBuzz.set_get_min(set)¶
- Parameters: - set ( - HarfBuzz.set_t) – A set- Returns: - minimum of set, or - HarfBuzz.SET_VALUE_INVALIDif set is empty.- Return type: - int- Finds the smallest element in the set. - New in version 0.9.7. 
- 
HarfBuzz.set_get_population(set)¶
- Parameters: - set ( - HarfBuzz.set_t) – A set- Returns: - The population of set - Return type: - int- Returns the number of elements in the set. - New in version 0.9.7. 
- 
HarfBuzz.set_has(set, codepoint)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- codepoint (int) – The element to query
 - Returns: - %true if codepoint is in set, false otherwise - Return type: - Tests whether codepoint belongs to set. - New in version 0.9.2. 
- set (
- 
HarfBuzz.set_intersect(set, other)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- other (HarfBuzz.set_t) – Another set
 - Makes set the intersection of set and other. - New in version 0.9.2. 
- set (
- 
HarfBuzz.set_invert(set)¶
- Parameters: - set ( - HarfBuzz.set_t) – A set- Inverts the contents of set. - New in version 0.9.10. - Deprecated since version 1.6.1. 
- 
HarfBuzz.set_is_empty(set)¶
- Parameters: - set ( - HarfBuzz.set_t) – a set.- Returns: - %true if set is empty - Return type: - int- Tests whether a set is empty (contains no elements). - New in version 0.9.7. 
- 
HarfBuzz.set_is_equal(set, other)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- other (HarfBuzz.set_t) – Another set
 - Returns: - Return type: - Tests whether set and other are equal (contain the same elements). - New in version 0.9.7. 
- set (
- 
HarfBuzz.set_is_subset(set, larger_set)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- larger_set (HarfBuzz.set_t) – Another set
 - Returns: - Trueif the set is a subset of (or equal to) larger_set,- Falseotherwise.- Return type: - Tests whether set is a subset of larger_set. - New in version 1.8.1. 
- set (
- 
HarfBuzz.set_next(set, codepoint)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- codepoint (int) – Input = Code point to query Output = Code point retrieved
 - Returns: - %true if there was a next value, false otherwise - codepoint: - Input = Code point to query Output = Code point retrieved - Return type: - Fetches the next element in set that is greater than current value of codepoint. - Set codepoint to - HarfBuzz.SET_VALUE_INVALIDto get started.- New in version 0.9.2. 
- set (
- 
HarfBuzz.set_next_range(set, last)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- last (int) – Input = The current last code point in the range Output = The last code point in the range
 - Returns: - %true if there was a next range, false otherwise - first: - The first code point in the range - last: - Input = The current last code point in the range Output = The last code point in the range - Return type: - Fetches the next consecutive range of elements in set that are greater than current value of last. - Set last to - HarfBuzz.SET_VALUE_INVALIDto get started.- New in version 0.9.7. 
- set (
- 
HarfBuzz.set_previous(set, codepoint)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- codepoint (int) – Input = Code point to query Output = Code point retrieved
 - Returns: - %true if there was a previous value, false otherwise - codepoint: - Input = Code point to query Output = Code point retrieved - Return type: - Fetches the previous element in set that is lower than current value of codepoint. - Set codepoint to - HarfBuzz.SET_VALUE_INVALIDto get started.- New in version 1.8.0. 
- set (
- 
HarfBuzz.set_previous_range(set, first)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- first (int) – Input = The current first code point in the range Output = The first code point in the range
 - Returns: - %true if there was a previous range, false otherwise - first: - Input = The current first code point in the range Output = The first code point in the range - last: - The last code point in the range - Return type: - Fetches the previous consecutive range of elements in set that are greater than current value of last. - Set first to - HarfBuzz.SET_VALUE_INVALIDto get started.- New in version 1.8.0. 
- set (
- 
HarfBuzz.set_set(set, other)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- other (HarfBuzz.set_t) – Another set
 - Makes the contents of set equal to the contents of other. - New in version 0.9.2. 
- set (
- 
HarfBuzz.set_subtract(set, other)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- other (HarfBuzz.set_t) – Another set
 - Subtracts the contents of other from set. - New in version 0.9.2. 
- set (
- 
HarfBuzz.set_symmetric_difference(set, other)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- other (HarfBuzz.set_t) – Another set
 - Makes set the symmetric difference of set and other. - New in version 0.9.2. 
- set (
- 
HarfBuzz.set_union(set, other)¶
- Parameters: - set (HarfBuzz.set_t) – A set
- other (HarfBuzz.set_t) – Another set
 - Makes set the union of set and other. - New in version 0.9.2. 
- set (
- 
HarfBuzz.shape(font, buffer, features)¶
- Parameters: - font (HarfBuzz.font_t) – anHarfBuzz.font_tto use for shaping
- buffer (HarfBuzz.buffer_t) – anHarfBuzz.buffer_tto shape
- features ([HarfBuzz.feature_t] orNone) – an array of user specifiedHarfBuzz.feature_torNone
 - Shapes buffer using font turning its Unicode characters content to positioned glyphs. If features is not - None, it will be used to control the features applied during shaping. If two features have the same tag but overlapping ranges the value of the feature with the higher index takes precedence.- New in version 0.9.2. 
- font (
- 
HarfBuzz.shape_full(font, buffer, features, shaper_list)¶
- Parameters: - font (HarfBuzz.font_t) – anHarfBuzz.font_tto use for shaping
- buffer (HarfBuzz.buffer_t) – anHarfBuzz.buffer_tto shape
- features ([HarfBuzz.feature_t] orNone) – an array of user specifiedHarfBuzz.feature_torNone
- shaper_list ([str] orNone) – aNone-terminated array of shapers to use orNone
 - Returns: - false if all shapers failed, true otherwise - Return type: - See - HarfBuzz.shape() for details. If shaper_list is not- None, the specified shapers will be used in the given order, otherwise the default shapers list will be used.- New in version 0.9.2. 
- font (
- 
HarfBuzz.shape_list_shapers()¶
- Returns: - an array of constant strings - Return type: - [ - str]- Retrieves the list of shapers supported by HarfBuzz. - New in version 0.9.2. 
- 
HarfBuzz.shape_plan_create(face, props, user_features, shaper_list)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto use
- props (HarfBuzz.segment_properties_t) – TheHarfBuzz.segment_properties_tof the segment
- user_features ([HarfBuzz.feature_t]) – The list of user-selected features
- shaper_list ([str]) – List of shapers to try
 - Returns: - The shaping plan - Return type: - Constructs a shaping plan for a combination of face, user_features, props, and shaper_list. - New in version 0.9.7. 
- face (
- 
HarfBuzz.shape_plan_create2(face, props, user_features, coords, shaper_list)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto use
- props (HarfBuzz.segment_properties_t) – TheHarfBuzz.segment_properties_tof the segment
- user_features ([HarfBuzz.feature_t]) – The list of user-selected features
- coords ([int]) – The list of variation-space coordinates
- shaper_list ([str]) – List of shapers to try
 - Returns: - The shaping plan - Return type: - The variable-font version of - HarfBuzz.shape_plan_create. Constructs a shaping plan for a combination of face, user_features, props, and shaper_list, plus the variation-space coordinates coords.- New in version 1.4.0. 
- face (
- 
HarfBuzz.shape_plan_create_cached(face, props, user_features, shaper_list)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto use
- props (HarfBuzz.segment_properties_t) – TheHarfBuzz.segment_properties_tof the segment
- user_features ([HarfBuzz.feature_t]) – The list of user-selected features
- shaper_list ([str]) – List of shapers to try
 - Returns: - The shaping plan - Return type: - Creates a cached shaping plan suitable for reuse, for a combination of face, user_features, props, and shaper_list. - New in version 0.9.7. 
- face (
- 
HarfBuzz.shape_plan_create_cached2(face, props, user_features, coords, shaper_list)¶
- Parameters: - face (HarfBuzz.face_t) –HarfBuzz.face_tto use
- props (HarfBuzz.segment_properties_t) – TheHarfBuzz.segment_properties_tof the segment
- user_features ([HarfBuzz.feature_t]) – The list of user-selected features
- coords ([int]) – The list of variation-space coordinates
- shaper_list ([str]) – List of shapers to try
 - Returns: - The shaping plan - Return type: - The variable-font version of - HarfBuzz.shape_plan_create_cached. Creates a cached shaping plan suitable for reuse, for a combination of face, user_features, props, and shaper_list, plus the variation-space coordinates coords.- New in version 1.4.0. 
- face (
- 
HarfBuzz.shape_plan_execute(shape_plan, font, buffer, features)¶
- Parameters: - shape_plan (HarfBuzz.shape_plan_t) – A shaping plan
- font (HarfBuzz.font_t) – TheHarfBuzz.font_tto use
- buffer (HarfBuzz.buffer_t) – TheHarfBuzz.buffer_tto work upon
- features ([HarfBuzz.feature_t]) – Features to enable
 - Return type: - Executes the given shaping plan on the specified buffer, using the given font and features. - New in version 0.9.7. 
- shape_plan (
- 
HarfBuzz.shape_plan_get_empty()¶
- Returns: - The empty shaping plan - Return type: - HarfBuzz.shape_plan_t- Fetches the singleton empty shaping plan. - New in version 0.9.7. 
- 
HarfBuzz.shape_plan_get_shaper(shape_plan)¶
- Parameters: - shape_plan ( - HarfBuzz.shape_plan_t) – A shaping plan- Returns: - The shaper - Return type: - str- Fetches the shaper from a given shaping plan. - New in version 0.9.7. 
- 
HarfBuzz.tag_from_string(str)¶
- Parameters: - str ( - bytes) – String to convert- Returns: - The #hb_tag_t corresponding to str - Return type: - int- Converts a string into an #hb_tag_t. Valid tags are four characters. Shorter input strings will be padded with spaces. Longer input strings will be truncated. - New in version 0.9.2. 
- 
HarfBuzz.tag_to_string(tag)¶
- Parameters: - tag ( - int) – #hb_tag_t to convert- Returns: - Converted string - Return type: - buf: - bytes- Converts an #hb_tag_t to a string and returns it in buf. Strings will be four characters long. - New in version 0.9.5. 
- 
HarfBuzz.unicode_combining_class(ufuncs, unicode)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – The Unicode-functions structure
- unicode (int) – The code point to query
 - Returns: - The - HarfBuzz.unicode_combining_class_tof unicode- Return type: - Retrieves the Canonical Combining Class (ccc) property of code point unicode. - New in version 0.9.2. 
- ufuncs (
- 
HarfBuzz.unicode_compose(ufuncs, a, b)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – The Unicode-functions structure
- a (int) – The first code point to compose
- b (int) – The second code point to compose
 - Returns: - True is a,`b` composed, false otherwise - ab: - The composed code point - Return type: - Composes the code point sequence a,`b` by canonical equivalence into code point ab. - New in version 0.9.2. 
- ufuncs (
- 
HarfBuzz.unicode_decompose(ufuncs, ab)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – The Unicode-functions structure
- ab (int) – The code point to decompose
 - Returns: - True if ab decomposed, false otherwise - a: - The first decomposed code point - b: - The second decomposed code point - Return type: - Decomposes code point ab by canonical equivalence, into code points a and b. - New in version 0.9.2. 
- ufuncs (
- 
HarfBuzz.unicode_decompose_compatibility(ufuncs, u)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – The Unicode-functions structure
- u (int) – Code point to decompose
 - Returns: - decomposed: - Compatibility decomposition of u - Return type: - Fetches the compatibility decomposition of a Unicode code point. Deprecated. - New in version 0.9.2. - Deprecated since version 2.0.0. 
- ufuncs (
- 
HarfBuzz.unicode_eastasian_width(ufuncs, unicode)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) –
- unicode (int) –
 - Return type: - New in version 0.9.2. - Deprecated since version 2.0.0. 
- ufuncs (
- 
HarfBuzz.unicode_funcs_create(parent)¶
- Parameters: - parent ( - HarfBuzz.unicode_funcs_tor- None) – Parent Unicode-functions structure- Returns: - The Unicode-functions structure - Return type: - HarfBuzz.unicode_funcs_t- Creates a new - HarfBuzz.unicode_funcs_tstructure of Unicode functions.- New in version 0.9.2. 
- 
HarfBuzz.unicode_funcs_get_default()¶
- Returns: - a pointer to the - HarfBuzz.unicode_funcs_tUnicode-functions structure- Return type: - HarfBuzz.unicode_funcs_t- Fetches a pointer to the default Unicode-functions structure that is used when no functions are explicitly set on - HarfBuzz.buffer_t.- New in version 0.9.2. 
- 
HarfBuzz.unicode_funcs_get_empty()¶
- Returns: - The empty Unicode-functions structure - Return type: - HarfBuzz.unicode_funcs_t- Fetches the singleton empty Unicode-functions structure. - New in version 0.9.2. 
- 
HarfBuzz.unicode_funcs_get_parent(ufuncs)¶
- Parameters: - ufuncs ( - HarfBuzz.unicode_funcs_t) – The Unicode-functions structure- Returns: - The parent Unicode-functions structure - Return type: - HarfBuzz.unicode_funcs_t- Fetches the parent of the Unicode-functions structure ufuncs. - New in version 0.9.2. 
- 
HarfBuzz.unicode_funcs_is_immutable(ufuncs)¶
- Parameters: - ufuncs ( - HarfBuzz.unicode_funcs_t) – The Unicode-functions structure- Returns: - %true if ufuncs is immutable, false otherwise - Return type: - int- Tests whether the specified Unicode-functions structure is immutable. - New in version 0.9.2. 
- 
HarfBuzz.unicode_funcs_make_immutable(ufuncs)¶
- Parameters: - ufuncs ( - HarfBuzz.unicode_funcs_t) – The Unicode-functions structure- Makes the specified Unicode-functions structure immutable. - New in version 0.9.2. 
- 
HarfBuzz.unicode_funcs_set_combining_class_func(ufuncs, func, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – A Unicode-functions structure
- func (HarfBuzz.unicode_combining_class_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.unicode_combining_class_func_t.- New in version 0.9.2. 
- ufuncs (
- 
HarfBuzz.unicode_funcs_set_compose_func(ufuncs, func, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – A Unicode-functions structure
- func (HarfBuzz.unicode_compose_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.unicode_compose_func_t.- New in version 0.9.2. 
- ufuncs (
- 
HarfBuzz.unicode_funcs_set_decompose_compatibility_func(ufuncs, func, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – a Unicode function structure
- func (HarfBuzz.unicode_decompose_compatibility_func_t) –
- user_data (objectorNone) –
 - New in version 0.9.2. - Deprecated since version 2.0.0. 
- ufuncs (
- 
HarfBuzz.unicode_funcs_set_decompose_func(ufuncs, func, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – A Unicode-functions structure
- func (HarfBuzz.unicode_decompose_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.unicode_decompose_func_t.- New in version 0.9.2. 
- ufuncs (
- 
HarfBuzz.unicode_funcs_set_eastasian_width_func(ufuncs, func, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – a Unicode function structure
- func (HarfBuzz.unicode_eastasian_width_func_t) –
- user_data (objectorNone) –
 - New in version 0.9.2. - Deprecated since version 2.0.0. 
- ufuncs (
- 
HarfBuzz.unicode_funcs_set_general_category_func(ufuncs, func, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – A Unicode-functions structure
- func (HarfBuzz.unicode_general_category_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.unicode_general_category_func_t.- New in version 0.9.2. 
- ufuncs (
- 
HarfBuzz.unicode_funcs_set_mirroring_func(ufuncs, func, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – A Unicode-functions structure
- func (HarfBuzz.unicode_mirroring_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.unicode_mirroring_func_t.- New in version 0.9.2. 
- ufuncs (
- 
HarfBuzz.unicode_funcs_set_script_func(ufuncs, func, *user_data)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – A Unicode-functions structure
- func (HarfBuzz.unicode_script_func_t) – The callback function to assign
- user_data (objectorNone) – Data to pass to func
 - Sets the implementation function for - HarfBuzz.unicode_script_func_t.- New in version 0.9.2. 
- ufuncs (
- 
HarfBuzz.unicode_general_category(ufuncs, unicode)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – The Unicode-functions structure
- unicode (int) – The code point to query
 - Returns: - The - HarfBuzz.unicode_general_category_tof unicode- Return type: - Retrieves the General Category (gc) property of code point unicode. - New in version 0.9.2. 
- ufuncs (
- 
HarfBuzz.unicode_mirroring(ufuncs, unicode)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – The Unicode-functions structure
- unicode (int) – The code point to query
 - Returns: - The #hb_codepoint_t of the Mirroring Glyph for unicode - Return type: - Retrieves the Bi-directional Mirroring Glyph code point defined for code point unicode. - New in version 0.9.2. 
- ufuncs (
- 
HarfBuzz.unicode_script(ufuncs, unicode)¶
- Parameters: - ufuncs (HarfBuzz.unicode_funcs_t) – The Unicode-functions structure
- unicode (int) – The code point to query
 - Returns: - The - HarfBuzz.script_tof unicode- Return type: - Retrieves the - HarfBuzz.script_tscript to which code point unicode belongs.- New in version 0.9.2. 
- ufuncs (
- 
HarfBuzz.variation_from_string(str, len, variation)¶
- Parameters: - str (str) –
- len (int) –
- variation (HarfBuzz.variation_t) –
 - Return type: - New in version 1.4.2. 
- str (
- 
HarfBuzz.variation_to_string(variation, buf, size)¶
- Parameters: - variation (HarfBuzz.variation_t) –
- buf (str) –
- size (int) –
 - New in version 1.4.2. 
- variation (
- 
HarfBuzz.version()¶
- Returns: - major: - Library major version component - minor: - Library minor version component - micro: - Library micro version component - Return type: - (major: - int, minor:- int, micro:- int)- Returns library version as three integer components. - New in version 0.9.2. 
- 
HarfBuzz.version_atleast(major, minor, micro)¶
- Parameters: - Returns: - True if the library is equal to or greater than the test value, false otherwise - Return type: - Tests the library version against a minimum value, as three integer components. - New in version 0.9.30.