[12:14] static extends: object
Generated low-level function wrappers for namespace HarfBuzz.
getLib ()
blob_copy_writable_or_fail (object blob)
Makes a writable copy of @blob.
blob is A blob..blob_create_from_file (string file_name)
Creates a new blob containing the data from the specified binary font file. The filename is passed directly to the system on all platforms, except on Windows, where the filename is interpreted as UTF-8. Only if the filename is not valid UTF-8, it will be interpreted according to the system codepage.
file_name is A font filename.blob_create_from_file_or_fail (string file_name)
Creates a new blob containing the data from the specified file. The filename is passed directly to the system on all platforms, except on Windows, where the filename is interpreted as UTF-8. Only if the filename is not valid UTF-8, it will be interpreted according to the system codepage.
file_name is A filename.blob_create_sub_blob (object parent, int offset, int length)
Returns a blob that represents a range of bytes in @parent. The new blob is always created with #HB_MEMORY_MODE_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
immutable.parent is Parent blob..offset is Start offset of sub-blob within @parent, in bytes..length is Length of sub-blob..blob_destroy (object blob)
Decreases the reference count on @blob, and if it reaches zero, destroys
freeing all memory, possibly calling the destroy-callback the blob was created for if it has not been called already. See TODO:link object types for more information.blob is a blob..None.blob_get_empty ()
Returns the singleton empty blob. See TODO:link object types for more information.
blob_get_length (object blob)
Fetches the length of a blob's data.
blob is a blob..blob_get_user_data (object blob, key)
Fetches the user data associated with the specified key, attached to the specified font-functions structure.
blob is a blob.key is The user-data key to query.blob_make_immutable (object blob)
Makes a blob immutable.
blob is a blob.None.blob_reference (object blob)
Increases the reference count on @blob. See TODO:link object types for more information.
blob is a blob..buffer_append (object buffer, object source, int start, int end)
Append (part of) contents of another buffer to this buffer.
buffer is An #hb_buffer_t.source is source #hb_buffer_t.start is start index into source buffer to copy. Use 0 to copy from start of buffer..end is end index into source buffer to copy. Use @UINT_MAX (or ((unsigned int) -1)) to copy to end of buffer..None.buffer_changed (object buffer)
Called by a message callback after modifying buffer glyph indices, to update internal caches. If not called from inside a message callback, does nothing.
buffer is An #hb_buffer_t.None.buffer_clear_contents (object buffer)
Similar to hb_buffer_reset(), but does not clear the Unicode functions and the replacement code point.
buffer is An #hb_buffer_t.None.buffer_create ()
Creates a new #hb_buffer_t with all properties to defaults.
buffer_create_similar (object src)
Creates a new #hb_buffer_t, similar to hb_buffer_create(). The only difference is that the buffer is configured similarly to @src.
src is An #hb_buffer_t.buffer_destroy (object buffer)
Deallocate the @buffer. Decreases the reference count on @buffer by one. If the result is zero, then @buffer and all associated resources are freed. See hb_buffer_reference().
buffer is An #hb_buffer_t.None.buffer_get_cluster_level (object buffer)
Fetches the cluster level of a buffer. The #hb_buffer_cluster_level_t dictates one aspect of how HarfBuzz will treat non-base characters during shaping.
buffer is An #hb_buffer_t.buffer_get_content_type (object buffer)
Fetches the type of @buffer contents. Buffers are either empty, contain characters (before shaping), or contain glyphs (the result of shaping).
buffer is An #hb_buffer_t.buffer_get_direction (object buffer)
See hb_buffer_set_direction()
buffer is An #hb_buffer_t.buffer_get_empty ()
Fetches an empty #hb_buffer_t.
buffer_get_flags (object buffer)
Fetches the #hb_buffer_flags_t of @buffer.
buffer is An #hb_buffer_t.buffer_get_language (object buffer)
See hb_buffer_set_language().
buffer is An #hb_buffer_t.buffer_get_length (object buffer)
Returns the number of items in the buffer.
buffer is An #hb_buffer_t.buffer_get_random_state (object buffer)
See hb_buffer_set_random_state().
buffer is An #hb_buffer_t.buffer_get_script (object buffer)
Fetches the script of @buffer.
buffer is An #hb_buffer_t.buffer_get_unicode_funcs (object buffer)
Fetches the Unicode-functions structure of a buffer.
buffer is An #hb_buffer_t.buffer_get_user_data (object buffer, key)
Fetches the user data associated with the specified key, attached to the specified buffer.
buffer is An #hb_buffer_t.key is The user-data key to query.buffer_guess_segment_properties (object buffer)
Sets unset buffer segment properties based on buffer Unicode contents. If buffer is not empty, it must have content type #HB_BUFFER_CONTENT_TYPE_UNICODE. If buffer script is not set (ie. is #HB_SCRIPT_INVALID), it will be set to the Unicode script of the first character in the buffer that has a script other than #HB_SCRIPT_COMMON, #HB_SCRIPT_INHERITED, and #HB_SCRIPT_UNKNOWN. Next, if buffer direction is not set (ie. is #HB_DIRECTION_INVALID), it will be set to the natural horizontal direction of the buffer script as returned by hb_script_get_horizontal_direction(). If hb_script_get_horizontal_direction() returns #HB_DIRECTION_INVALID, then #HB_DIRECTION_LTR is used. Finally, if buffer language is not set (ie. is #HB_LANGUAGE_INVALID), it will be set to the process's default language as returned by hb_language_get_default(). This may change in the future by taking buffer script into consideration when choosing a language. Note that hb_language_get_default() is NOT threadsafe the first time it is called. See documentation for that function for details.
buffer is An #hb_buffer_t.None.buffer_normalize_glyphs (object buffer)
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.
buffer is An #hb_buffer_t.None.buffer_reference (object buffer)
Increases the reference count on @buffer by one. This prevents @buffer from being destroyed until a matching call to hb_buffer_destroy() is made.
buffer is An #hb_buffer_t.buffer_reset (object buffer)
Resets the buffer to its initial status, as if it was just newly created with hb_buffer_create().
buffer is An #hb_buffer_t.None.buffer_reverse (object buffer)
Reverses buffer contents.
buffer is An #hb_buffer_t.None.buffer_reverse_clusters (object buffer)
Reverses buffer clusters. That is, the buffer contents are reversed, then each cluster (consecutive items having the same cluster number) are reversed again.
buffer is An #hb_buffer_t.None.buffer_reverse_range (object buffer, int start, int end)
Reverses buffer contents between @start and @end.
buffer is An #hb_buffer_t.start is start index.end is end index.None.buffer_serialize_format_to_string (string format)
Converts @format to the string corresponding it, or
NULLif it is not a valid #hb_buffer_serialize_format_t.
format is an #hb_buffer_serialize_format_t to convert..buffer_serialize_list_formats ()
Returns a list of supported buffer serialization formats.
buffer_set_cluster_level (object buffer, string cluster_level)
Sets the cluster level of a buffer. The #hb_buffer_cluster_level_t dictates one aspect of how HarfBuzz will treat non-base characters during shaping.
buffer is An #hb_buffer_t.cluster_level is The cluster level to set on the buffer.None.buffer_set_content_type (object buffer, string content_type)
Sets the type of @buffer contents. Buffers are either empty, contain characters (before shaping), or contain glyphs (the result of shaping). You rarely need to call this function, since a number of other functions transition the content type for you. Namely: - A newly created buffer starts with content type %HB_BUFFER_CONTENT_TYPE_INVALID. Calling hb_buffer_reset(), hb_buffer_clear_contents(), as well as calling hb_buffer_set_length() with an argument of zero all set the buffer content type to invalid as well. - Calling hb_buffer_add_utf8(), hb_buffer_add_utf16(), hb_buffer_add_utf32(), hb_buffer_add_codepoints() and hb_buffer_add_latin1() expect that buffer is either empty and have a content type of invalid, or that buffer content type is %HB_BUFFER_CONTENT_TYPE_UNICODE, and they also set the content type to Unicode if they added anything to an empty buffer. - Finally hb_shape() and hb_shape_full() expect that the buffer is either empty and have content type of invalid, or that buffer content type is %HB_BUFFER_CONTENT_TYPE_UNICODE, and upon success they set the buffer content type to %HB_BUFFER_CONTENT_TYPE_GLYPHS. The above transitions are designed such that one can use a buffer in a loop of "reset : add-text : shape" without needing to ever modify the content type manually.
buffer is An #hb_buffer_t.content_type is The type of buffer contents to set.None.buffer_set_direction (object buffer, string direction)
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.
buffer is An #hb_buffer_t.direction is the #hb_direction_t of the @buffer.None.buffer_set_flags (object buffer, string flags)
Sets @buffer flags to @flags. See #hb_buffer_flags_t.
buffer is An #hb_buffer_t.flags is The buffer flags to set.None.buffer_set_language (object buffer, object language)
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 hb_language_from_string() to convert from BCP 47 language tags to #hb_language_t.
buffer is An #hb_buffer_t.language is An hb_language_t to set.None.buffer_set_random_state (object buffer, int state)
Sets the random state of the buffer. The state changes every time a glyph uses randomness (eg. the
randOpenType feature). This function together with hb_buffer_get_random_state() allow for transferring the current random state to a subsequent buffer, to get better randomness distribution. Defaults to 1 and when buffer contents are cleared. A value of 0 disables randomness during shaping.
buffer is An #hb_buffer_t.state is the new random state.None.buffer_set_script (object buffer, string script)
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 #hb_script_t values, or use hb_script_from_string() or hb_script_from_iso15924_tag() to get the corresponding script from an ISO 15924 script tag.
buffer is An #hb_buffer_t.script is An #hb_script_t to set..None.buffer_set_segment_properties (object buffer, object props)
Sets the segment properties of the buffer, a shortcut for calling hb_buffer_set_direction(), hb_buffer_set_script() and hb_buffer_set_language() individually.
buffer is An #hb_buffer_t.props is An #hb_segment_properties_t to use.None.buffer_set_unicode_funcs (object buffer, object unicode_funcs)
Sets the Unicode-functions structure of a buffer to @unicode_funcs.
buffer is An #hb_buffer_t.unicode_funcs is The Unicode-functions structure.None.calloc (int nmemb, int size)
Allocates @nmemb elements of @size bytes each, initialized to zero, using the allocator set at compile-time. Typically just calloc().
nmemb is The number of elements to allocate..size is The size of each element..color_line_get_extend (object color_line)
Fetches the extend mode of the color line object.
color_line is a #hb_color_line_t object.direction_to_string (string direction)
Converts an #hb_direction_t to a string.
direction is The #hb_direction_t to convert.draw_close_path (object dfuncs, draw_data, object st)
Perform a "close-path" draw operation.
dfuncs is draw functions.draw_data is associated draw data passed by the caller.st is current draw state.None.draw_cubic_to (object dfuncs, draw_data, object st, double control1_x, double control1_y, double control2_x, double control2_y, double to_x, double to_y)
Perform a "cubic-to" draw operation.
dfuncs is draw functions.draw_data is associated draw data passed by the caller.st is current draw state.control1_x is X component of first control point.control1_y is Y component of first control point.control2_x is X component of second control point.control2_y is Y component of second control point.to_x is X component of target point.to_y is Y component of target point.None.draw_funcs_create ()
Creates a new draw callbacks object.
draw_funcs_destroy (object dfuncs)
Deallocate the @dfuncs. Decreases the reference count on @dfuncs by one. If the result is zero, then @dfuncs and all associated resources are freed. See hb_draw_funcs_reference().
dfuncs is draw functions.None.draw_funcs_get_empty ()
Fetches the singleton empty draw-functions structure.
draw_funcs_get_user_data (object dfuncs, key)
Fetches the user-data associated with the specified key, attached to the specified draw-functions structure.
dfuncs is The draw-functions structure.key is The user-data key to query.draw_funcs_make_immutable (object dfuncs)
Makes @dfuncs object immutable.
dfuncs is draw functions.None.draw_funcs_reference (object dfuncs)
Increases the reference count on @dfuncs by one. This prevents @dfuncs from being destroyed until a matching call to hb_draw_funcs_destroy() is made.
dfuncs is draw functions.draw_line_to (object dfuncs, draw_data, object st, double to_x, double to_y)
Perform a "line-to" draw operation.
dfuncs is draw functions.draw_data is associated draw data passed by the caller.st is current draw state.to_x is X component of target point.to_y is Y component of target point.None.draw_move_to (object dfuncs, draw_data, object st, double to_x, double to_y)
Perform a "move-to" draw operation.
dfuncs is draw functions.draw_data is associated draw data passed by the caller.st is current draw state.to_x is X component of target point.to_y is Y component of target point.None.draw_quadratic_to (object dfuncs, draw_data, object st, double control_x, double control_y, double to_x, double to_y)
Perform a "quadratic-to" draw operation.
dfuncs is draw functions.draw_data is associated draw data passed by the caller.st is current draw state.control_x is X component of control point.control_y is Y component of control point.to_x is X component of target point.to_y is Y component of target point.None.face_builder_create ()
Creates a #hb_face_t that can be used with hb_face_builder_add_table(). After tables are added to the face, it can be compiled to a binary font file by calling hb_face_reference_blob().
face_count (object blob)
Fetches the number of faces in a blob.
blob is a blob..face_create (object blob, int index)
Constructs a new face object from the specified blob and a face index into that blob. The face index is used for blobs of file formats such as TTC and DFont that can contain more than one face. Face indices within such collections are zero-based.
Note: If the blob font format is not a collection, @index is ignored. Otherwise, only the lower 16-bits of
are used. The unmodified @index can be accessed via hb_face_get_index(). blob is #hb_blob_t to work upon.index is The index of the face within @blob.face_create_from_file_or_fail (string file_name, int index)
A thin wrapper around hb_blob_create_from_file_or_fail() followed by hb_face_create_or_fail().
file_name is A font filename.index is The index of the face within the file.face_create_from_file_or_fail_using (string file_name, int index, string loader_name)
A thin wrapper around the face loader functions registered with HarfBuzz. If @loader_name is
NULLor the empty string, the first available loader is used. For example, the FreeType ("ft") loader might be able to load WOFF and WOFF2 files if FreeType is built with those features, whereas the OpenType ("ot") loader will not.
file_name is A font filename.index is The index of the face within the file.loader_name is The name of the loader to use, or NULL.face_create_or_fail (object blob, int index)
Like hb_face_create(), but returns
NULLif the blob data contains no usable font face at the specified index.
blob is #hb_blob_t to work upon.index is The index of the face within @blob.face_create_or_fail_using (object blob, int index, string loader_name)
A thin wrapper around the face loader functions registered with HarfBuzz. If @loader_name is
NULLor the empty string, the first available loader is used. For example, the FreeType ("ft") loader might be able to load WOFF and WOFF2 files if FreeType is built with those features, whereas the OpenType ("ot") loader will not.
blob is #hb_blob_t to work upon.index is The index of the face within @blob.loader_name is The name of the loader to use, or NULL.face_destroy (object face)
Decreases the reference count on a face object. When the reference count reaches zero, the face is destroyed, freeing all memory.
face is A face object.None.face_get_empty ()
Fetches the singleton empty face object.
face_get_glyph_count (object face)
Fetches the glyph-count value of the specified face object.
face is A face object.face_get_index (object face)
Fetches the face-index corresponding to the given face.
Note: face indices within a collection are zero-based.
face is A face object.face_get_upem (object face)
Fetches the units-per-em (UPEM) value of the specified face object. Typical UPEM values for fonts are 1000, or 2048, but any value in between 16 and 16,384 is allowed for OpenType fonts.
face is A face object.face_get_user_data (object face, key)
Fetches the user data associated with the specified key, attached to the specified face object.
face is A face object.key is The user-data key to query.face_list_loaders ()
Retrieves the list of face loaders supported by HarfBuzz.
face_make_immutable (object face)
Makes the given face object immutable.
face is A face object.None.face_reference (object face)
Increases the reference count on a face object.
face is A face object.face_reference_blob (object face)
Fetches a pointer to the binary blob that contains the specified face. If referencing the face data is not possible, this function creates a blob out of individual table blobs if hb_face_get_table_tags() works with this face, otherwise it returns an empty blob.
face is A face object.face_set_glyph_count (object face, int glyph_count)
Sets the glyph count for a face object to the specified value. This API is used in rare circumstances.
face is A face object.glyph_count is The glyph-count value to assign.None.face_set_index (object face, int index)
Assigns the specified face-index to @face. Fails if the face is immutable.
Note: changing the index has no effect on the face itself This only changes the value returned by hb_face_get_index().
face is A face object.index is The index to assign.None.face_set_upem (object face, int upem)
Sets the units-per-em (upem) for a face object to the specified value. This API is used in rare circumstances.
face is A face object.upem is The units-per-em value to assign.None.font_changed (object font)
Notifies the @font that underlying font data has changed. This has the effect of increasing the serial as returned by hb_font_get_serial(), which invalidates internal caches.
font is #hb_font_t to work upon.None.font_create (object face)
Constructs a new font object from the specified face.
Note: If
index value (as passed to hb_face_create() has non-zero top 16-bits, those bits minus one are passed to hb_font_set_var_named_instance(), effectively loading a named-instance of a variable font, instead of the default-instance. This allows specifying which named-instance to load by default when creating the face.face is a face..font_create_sub_font (object parent)
Constructs a sub-font font object from the specified @parent font, replicating the parent's properties.
parent is The parent font object.font_destroy (object font)
Decreases the reference count on the given font object. When the reference count reaches zero, the font is destroyed, freeing all memory.
font is #hb_font_t to work upon.None.font_funcs_create ()
Creates a new #hb_font_funcs_t structure of font functions.
font_funcs_destroy (object ffuncs)
Decreases the reference count on a font-functions structure. When the reference count reaches zero, the font-functions structure is destroyed, freeing all memory.
ffuncs is The font-functions structure.None.font_funcs_get_empty ()
Fetches an empty font-functions structure.
font_funcs_get_user_data (object ffuncs, key)
Fetches the user data associated with the specified key, attached to the specified font-functions structure.
ffuncs is The font-functions structure.key is The user-data key to query.font_funcs_make_immutable (object ffuncs)
Makes a font-functions structure immutable.
ffuncs is The font-functions structure.None.font_funcs_reference (object ffuncs)
Increases the reference count on a font-functions structure.
ffuncs is The font-functions structure.font_get_empty ()
Fetches the empty font object.
font_get_face (object font)
Fetches the face associated with the specified font object.
font is #hb_font_t to work upon.font_get_parent (object font)
Fetches the parent font of @font.
font is #hb_font_t to work upon.font_get_ptem (object font)
Fetches the "point size" of a font. Used in CoreText to implement optical sizing.
font is #hb_font_t to work upon.font_get_serial (object font)
Returns the internal serial number of the font. The serial number is increased every time a setting on the font is changed, using a setter function.
font is #hb_font_t to work upon.font_get_synthetic_slant (object font)
Fetches the "synthetic slant" of a font.
font is #hb_font_t to work upon.font_get_user_data (object font, key)
Fetches the user-data object associated with the specified key, attached to the specified font object.
font is #hb_font_t to work upon.key is The user-data key to query.font_get_var_named_instance (object font)
Returns the currently-set named-instance index of the font.
font is a font..font_list_funcs ()
Retrieves the list of font functions supported by HarfBuzz.
font_make_immutable (object font)
Makes @font immutable.
font is #hb_font_t to work upon.None.font_reference (object font)
Increases the reference count on the given font object.
font is #hb_font_t to work upon.font_set_face (object font, object face)
Sets @face as the font-face value of @font.
font is #hb_font_t to work upon.face is The #hb_face_t to assign.None.font_set_parent (object font, object parent)
Sets the parent font of @font.
font is #hb_font_t to work upon.parent is The parent font object to assign.None.font_set_ppem (object font, int x_ppem, int y_ppem)
Sets the horizontal and vertical pixels-per-em (PPEM) of a font. These values are used for pixel-size-specific adjustment to shaping and draw results, though for the most part they are unused and can be left unset.
font is #hb_font_t to work upon.x_ppem is Horizontal ppem value to assign.y_ppem is Vertical ppem value to assign.None.font_set_ptem (object font, double ptem)
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.
font is #hb_font_t to work upon.ptem is font size in points..None.font_set_scale (object font, int x_scale, int y_scale)
Sets the horizontal and vertical scale of a font. The font scale is a number related to, but not the same as, font size. Typically the client establishes a scale factor to be used between the two. For example, 64, or 256, which would be the fractional-precision part of the font scale. This is necessary because #hb_position_t values are integer types and you need to leave room for fractional values in there. For example, to set the font size to 20, with 64 levels of fractional precision you would call
hb_font_set_scale(font, 20 * 64, 20 * 64). In the example above, even what font size 20 means is up to you. It might be 20 pixels, or 20 points, or 20 millimeters. HarfBuzz does not care about that. You can set the point size of the font using hb_font_set_ptem(), and the pixel size using hb_font_set_ppem(). The choice of scale is yours but needs to be consistent between what you set here, and what you expect out of #hb_position_t as well has draw / paint API output values. Fonts default to a scale equal to the UPEM value of their face. A font with this setting is sometimes called an "unscaled" font.
font is #hb_font_t to work upon.x_scale is Horizontal scale value to assign.y_scale is Vertical scale value to assign.None.font_set_synthetic_slant (object font, double slant)
Sets the "synthetic slant" of a font. By default is zero. Synthetic slant is the graphical skew applied to the font at rendering time. HarfBuzz needs to know this value to adjust shaping results, metrics, and style values to match the slanted rendering.
Note: The glyph shape fetched via the hb_font_draw_glyph_or_fail() function is slanted to reflect this value as well. Note: The slant value is a ratio. For example, a 20% slant would be represented as a 0.2 value.
font is #hb_font_t to work upon.slant is synthetic slant value..None.font_set_var_coords_design (object font, list coords)
Applies a list of variation coordinates (in design-space units) to a font. Note that this overrides all existing variations set on @font. Axes not included in @coords will be effectively set to their default values.
font is #hb_font_t to work upon.coords is Array of variation coordinates to apply.coords_length is Number of coordinates to apply.None.font_set_var_coords_normalized (object font, list coords)
Applies a list of variation coordinates (in normalized units) to a font. Note that this overrides all existing variations set on @font. Axes not included in @coords will be effectively set to their default values.
Note: Coordinates should be normalized to 2.14.
font is #hb_font_t to work upon.coords is Array of variation coordinates to apply.coords_length is Number of coordinates to apply.None.font_set_var_named_instance (object font, int instance_index)
Sets design coords of a font from a named-instance index.
font is a font..instance_index is named instance index..None.free (ptr)
Frees the memory pointed to by @ptr, using the allocator set at compile-time. Typically just free().
ptr is The pointer to the memory to free..None.ft_face_create_from_blob_or_fail (object blob, int index)
Creates an #hb_face_t face object from the specified font blob and face index. This is similar in functionality to hb_face_create_from_blob_or_fail(), but uses the FreeType library for loading the font blob. This can be useful, for example, to load WOFF and WOFF2 font data.
blob is A blob.index is The index of the face within the blob.ft_face_create_from_file_or_fail (string file_name, int index)
Creates an #hb_face_t face object from the specified font file and face index. This is similar in functionality to hb_face_create_from_file_or_fail(), but uses the FreeType library for loading the font file. This can be useful, for example, to load WOFF and WOFF2 font data.
file_name is A font filename.index is The index of the face within the file.ft_font_changed (object font)
Refreshes the state of @font when the underlying FT_Face has changed. This function should be called after changing the size or variation-axis settings on the FT_Face.
font is #hb_font_t to work upon.None.ft_font_get_ft_face (object font)
Fetches the FT_Face associated with the specified #hb_font_t font object. This function works with #hb_font_t objects created by hb_ft_font_create() or hb_ft_font_create_referenced().
font is #hb_font_t to work upon.ft_font_get_load_flags (object font)
Fetches the FT_Load_Glyph load flags of the specified #hb_font_t. For more information, see https://freetype.org/freetype2/docs/reference/ft2-glyph_retrieval.html#ft_load_xxx This function works with #hb_font_t objects created by hb_ft_font_create() or hb_ft_font_create_referenced().
font is #hb_font_t to work upon.ft_font_set_funcs (object font)
Configures the font-functions structure of the specified #hb_font_t font object to use FreeType font functions. In particular, you can use this function to configure an existing #hb_face_t face object for use with FreeType font functions even if that #hb_face_t face object was initially created with hb_face_create(), and therefore was not initially configured to use FreeType font functions. An #hb_font_t object created with hb_ft_font_create() is preconfigured for FreeType font functions and does not require this function to be used. Note that if you modify the underlying #hb_font_t after calling this function, you need to call hb_ft_hb_font_changed() to update the underlying FT_Face.
Note: Internally, this function creates an FT_Face.
font is #hb_font_t to work upon.None.ft_font_set_load_flags (object font, int load_flags)
Sets the FT_Load_Glyph load flags for the specified #hb_font_t. For more information, see https://freetype.org/freetype2/docs/reference/ft2-glyph_retrieval.html#ft_load_xxx This function works with #hb_font_t objects created by hb_ft_font_create() or hb_ft_font_create_referenced().
font is #hb_font_t to work upon.load_flags is The FreeType load flags to set.None.ft_font_unlock_face (object font)
Releases an FT_Face previously obtained with hb_ft_font_lock_face().
font is #hb_font_t to work upon.None.glib_blob_create (object gbytes)
Creates an #hb_blob_t blob from the specified GBytes data structure.
gbytes is the GBytes structure to work upon.glib_get_unicode_funcs ()
Fetches a Unicode-functions structure that is populated with the appropriate GLib function for each method.
glib_script_from_script (string script)
Fetches the GUnicodeScript identifier that corresponds to the specified #hb_script_t script.
script is The #hb_script_t to query.glib_script_to_script (string script)
Fetches the #hb_script_t script that corresponds to the specified GUnicodeScript identifier.
script is The GUnicodeScript identifier to query.glyph_info_get_glyph_flags (object info)
Returns glyph flags encoded within a #hb_glyph_info_t.
info is a #hb_glyph_info_t.language_get_default ()
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 hb_buffer_guess_segment_properties() by HarfBuzz itself.
language_to_string (object language)
Converts an #hb_language_t to a string.
language is The #hb_language_t to convert.malloc (int size)
Allocates @size bytes of memory, using the allocator set at compile-time. Typically just malloc().
size is The size of the memory to allocate..map_clear (object arg0Map)
Clears out the contents of @map.
map is A map.None.map_copy (object arg0Map)
Allocate a copy of @map.
map is A map.map_create ()
Creates a new, initially empty map.
map_destroy (object arg0Map)
Decreases the reference count on a map. When the reference count reaches zero, the map is destroyed, freeing all memory.
map is A map.None.map_get_empty ()
Fetches the singleton empty #hb_map_t.
map_get_population (object arg0Map)
Returns the number of key-value pairs in the map.
map is A map.map_get_user_data (object arg0Map, key)
Fetches the user data associated with the specified key, attached to the specified map.
map is A map.key is The user-data key to query.map_hash (object arg0Map)
Creates a hash representing @map.
map is A map.map_keys (object arg0Map, object keys)
Add the keys of @map to @keys.
map is A map.keys is A set.None.map_reference (object arg0Map)
Increases the reference count on a map.
map is A map.map_update (object arg0Map, object other)
Add the contents of @other to @map.
map is A map.other is Another map.None.map_values (object arg0Map, object values)
Add the values of @map to @values.
map is A map.values is A set.None.ot_color_get_svg_document_count (object face)
Gets the number of SVG documents in the face
SVGtable.
face is #hb_face_t to work upon..ot_color_palette_get_count (object face)
Fetches the number of color palettes in a face.
face is #hb_face_t to work upon.ot_color_palette_get_flags (object face, int palette_index)
Fetches the flags defined for a color palette.
face is #hb_face_t to work upon.palette_index is The index of the color palette.ot_font_set_funcs (object font)
Sets the font functions to use when working with @font to the HarfBuzz's native implementation. This is the default for fonts newly created.
font is #hb_font_t to work upon.None.ot_layout_get_horizontal_baseline_tag_for_script (string script)
Fetches the dominant horizontal baseline tag used by @script.
script is a script tag..ot_meta_reference_entry (object face, string meta_tag)
It fetches metadata entry of a given tag from a font.
face is a #hb_face_t object..meta_tag is tag of metadata you like to have..ot_metrics_get_variation (object font, string metrics_tag)
Fetches metrics value corresponding to @metrics_tag from @font with the current font variation settings applied.
font is an #hb_font_t object..metrics_tag is tag of metrics value you like to fetch..ot_shape_get_buffer_format_serial ()
Returns the serial number of the current internal buffer format. See #HB_OT_SHAPE_BUFFER_FORMAT_SERIAL for more information.
ot_var_get_axis_count (object face)
Fetches the number of OpenType variation axes included in the face.
face is The #hb_face_t to work on.ot_var_get_named_instance_count (object face)
Fetches the number of named instances included in the face.
face is The #hb_face_t to work on.paint_funcs_create ()
Creates a new #hb_paint_funcs_t structure of paint functions. The initial reference count of 1 should be released with hb_paint_funcs_destroy() when you are done using the #hb_paint_funcs_t. This function never returns
NULL. If memory cannot be allocated, a special singleton #hb_paint_funcs_t object will be returned.
paint_funcs_destroy (object funcs)
Decreases the reference count on a paint-functions structure. When the reference count reaches zero, the structure is destroyed, freeing all memory.
funcs is The paint-functions structure.None.paint_funcs_get_empty ()
Fetches the singleton empty paint-functions structure.
paint_funcs_get_user_data (object funcs, key)
Fetches the user-data associated with the specified key, attached to the specified paint-functions structure.
funcs is The paint-functions structure.key is The user-data key to query.paint_funcs_make_immutable (object funcs)
Makes a paint-functions structure immutable. After this call, all attempts to set one of the callbacks on @funcs will fail.
funcs is The paint-functions structure.None.paint_funcs_reference (object funcs)
Increases the reference count on a paint-functions structure. This prevents @funcs from being destroyed until a matching call to hb_paint_funcs_destroy() is made.
funcs is The paint-functions structure.paint_linear_gradient (object funcs, paint_data, object color_line, double x0, double y0, double x1, double y1, double x2, double y2)
Perform a "linear-gradient" paint operation.
funcs is paint functions.paint_data is associated data passed by the caller.color_line is Color information for the gradient.x0 is X coordinate of the first point.y0 is Y coordinate of the first point.x1 is X coordinate of the second point.y1 is Y coordinate of the second point.x2 is X coordinate of the third point.y2 is Y coordinate of the third point.None.paint_pop_clip (object funcs, paint_data)
Perform a "pop-clip" paint operation.
funcs is paint functions.paint_data is associated data passed by the caller.None.paint_pop_group (object funcs, paint_data, string mode)
Perform a "pop-group" paint operation.
funcs is paint functions.paint_data is associated data passed by the caller.mode is the compositing mode to use.None.paint_pop_transform (object funcs, paint_data)
Perform a "pop-transform" paint operation.
funcs is paint functions.paint_data is associated data passed by the caller.None.paint_push_clip_rectangle (object funcs, paint_data, double xmin, double ymin, double xmax, double ymax)
Perform a "push-clip-rect" paint operation.
funcs is paint functions.paint_data is associated data passed by the caller.xmin is min X for the rectangle.ymin is min Y for the rectangle.xmax is max X for the rectangle.ymax is max Y for the rectangle.None.paint_push_font_transform (object funcs, paint_data, object font)
Push the transform reflecting the font's scale and slant settings onto the paint functions.
funcs is paint functions.paint_data is associated data passed by the caller.font is a font.None.paint_push_group (object funcs, paint_data)
Perform a "push-group" paint operation.
funcs is paint functions.paint_data is associated data passed by the caller.None.paint_push_group_for (object funcs, paint_data, string mode)
Perform a "push-group" paint operation, with the compositing mode known in advance. By default, this calls hb_paint_push_group(). XSince: REPLACEME
funcs is paint functions.paint_data is associated data passed by the caller.mode is the compositing mode that will be used when the group is popped.None.paint_push_inverse_font_transform (object funcs, paint_data, object font)
Push the inverse of the transform reflecting the font's scale and slant settings onto the paint functions.
funcs is paint functions.paint_data is associated data passed by the caller.font is a font.None.paint_push_transform (object funcs, paint_data, double xx, double yx, double xy, double yy, double dx, double dy)
Perform a "push-transform" paint operation.
funcs is paint functions.paint_data is associated data passed by the caller.xx is xx component of the transform matrix.yx is yx component of the transform matrix.xy is xy component of the transform matrix.yy is yy component of the transform matrix.dx is dx component of the transform matrix.dy is dy component of the transform matrix.None.paint_radial_gradient (object funcs, paint_data, object color_line, double x0, double y0, double r0, double x1, double y1, double r1)
Perform a "radial-gradient" paint operation.
funcs is paint functions.paint_data is associated data passed by the caller.color_line is Color information for the gradient.x0 is X coordinate of the first circle's center.y0 is Y coordinate of the first circle's center.r0 is radius of the first circle.x1 is X coordinate of the second circle's center.y1 is Y coordinate of the second circle's center.r1 is radius of the second circle.None.paint_sweep_gradient (object funcs, paint_data, object color_line, double x0, double y0, double start_angle, double end_angle)
Perform a "sweep-gradient" paint operation.
funcs is paint functions.paint_data is associated data passed by the caller.color_line is Color information for the gradient.x0 is X coordinate of the circle's center.y0 is Y coordinate of the circle's center.start_angle is the start angle.end_angle is the end angle.None.realloc (ptr, int size)
Reallocates the memory pointed to by @ptr to @size bytes, using the allocator set at compile-time. Typically just realloc().
ptr is The pointer to the memory to reallocate..size is The new size of the memory..script_get_horizontal_direction (string script)
Fetches the #hb_direction_t of a script when it is set horizontally. All right-to-left scripts will return #HB_DIRECTION_RTL. All left-to-right scripts will return #HB_DIRECTION_LTR. Scripts that can be written either right-to-left or left-to-right will return #HB_DIRECTION_INVALID. Unknown scripts will return #HB_DIRECTION_LTR.
script is The #hb_script_t to query.segment_properties_hash (object p)
Creates a hash representing @p.
p is #hb_segment_properties_t to hash..segment_properties_overlay (object p, object src)
Fills in missing fields of @p from @src in a considered manner. First, if
does not have direction set, direction is copied from @src. Next, ifand @src have the same direction (which can be unset), if @p does not have script set, script is copied from @src. Finally, if @p and @src have the same direction and script (which either can be unset), if @p does not have language set, language is copied from @src.p is #hb_segment_properties_t to fill in..src is #hb_segment_properties_t to fill in from..None.set_clear (object set)
Clears out the contents of a set.
set is A set.None.set_copy (object set)
Allocate a copy of @set.
set is A set.set_create ()
Creates a new, initially empty set.
set_destroy (object set)
Decreases the reference count on a set. When the reference count reaches zero, the set is destroyed, freeing all memory.
set is A set.None.set_get_empty ()
Fetches the singleton empty #hb_set_t.
set_get_population (object set)
Returns the number of elements in the set.
set is A set.set_get_user_data (object set, key)
Fetches the user data associated with the specified key, attached to the specified set.
set is A set.key is The user-data key to query.set_hash (object set)
Creates a hash representing @set.
set is A set.set_intersect (object set, object other)
Makes @set the intersection of @set and @other.
set is A set.other is Another set.None.set_invert (object set)
Inverts the contents of @set.
set is A set.None.set_reference (object set)
Increases the reference count on a set.
set is A set.set_set (object set, object other)
Makes the contents of @set equal to the contents of @other.
set is A set.other is Another set.None.set_subtract (object set, object other)
Subtracts the contents of @other from @set.
set is A set.other is Another set.None.set_symmetric_difference (object set, object other)
Makes @set the symmetric difference of @set and @other.
set is A set.other is Another set.None.set_union (object set, object other)
Makes @set the union of @set and @other.
set is A set.other is Another set.None.shape_list_shapers ()
Retrieves the list of shapers supported by HarfBuzz.
shape_plan_destroy (object shape_plan)
Decreases the reference count on the given shaping plan. When the reference count reaches zero, the shaping plan is destroyed, freeing all memory.
shape_plan is A shaping plan.None.shape_plan_get_empty ()
Fetches the singleton empty shaping plan.
shape_plan_get_shaper (object shape_plan)
Fetches the shaper from a given shaping plan.
shape_plan is A shaping plan.shape_plan_get_user_data (object shape_plan, key)
Fetches the user data associated with the specified key, attached to the specified shaping plan.
shape_plan is A shaping plan.key is The user-data key to query.shape_plan_reference (object shape_plan)
Increases the reference count on the given shaping plan.
shape_plan is A shaping plan.style_get_value (object font, string style_tag)
Searches variation axes of a #hb_font_t object for a specific axis first, if not set, first tries to get default style values in
STATtable then tries to polyfill from different tables of the font.
font is a #hb_font_t object..style_tag is a style tag..unicode_funcs_create (object parent)
Creates a new #hb_unicode_funcs_t structure of Unicode functions.
parent is Parent Unicode-functions structure.unicode_funcs_destroy (object ufuncs)
Decreases the reference count on a Unicode-functions structure. When the reference count reaches zero, the Unicode-functions structure is destroyed, freeing all memory.
ufuncs is The Unicode-functions structure.None.unicode_funcs_get_default ()
Fetches a pointer to the default Unicode-functions structure that is used when no functions are explicitly set on #hb_buffer_t.
unicode_funcs_get_empty ()
Fetches the singleton empty Unicode-functions structure.
unicode_funcs_get_parent (object ufuncs)
Fetches the parent of the Unicode-functions structure @ufuncs.
ufuncs is The Unicode-functions structure.unicode_funcs_get_user_data (object ufuncs, key)
Fetches the user-data associated with the specified key, attached to the specified Unicode-functions structure.
ufuncs is The Unicode-functions structure.key is The user-data key to query.unicode_funcs_make_immutable (object ufuncs)
Makes the specified Unicode-functions structure immutable.
ufuncs is The Unicode-functions structure.None.unicode_funcs_reference (object ufuncs)
Increases the reference count on a Unicode-functions structure.
ufuncs is The Unicode-functions structure.