Data type for holding color values.
An integral type representing an OpenType 'name' table name identifier.
There are predefined name IDs, as well as name IDs return from other
API. These can be used to fetch name strings from a font face.
The default code point for replacing invalid characters in a given encoding.
Set to U+FFFD REPLACEMENT CHARACTER.
See Unicode 6.1 for details on the maximum decomposition length.
Makes a writable copy of @blob.
New blob, or nullptr if allocation failed.
A blob.
Creates a new "blob" object wrapping @data. The @mode parameter is used
to negotiate ownership and lifecycle of @data.
New blob, or the empty blob if something failed or if @length is
zero. Destroy with hb_blob_destroy().
Pointer to blob data.
Length of @data in bytes.
Memory mode for @data.
Data parameter to pass to @destroy.
Callback to call when @data is not needed anymore.
A hb_blob_t pointer with the content of the file
font filename.
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 @parent immutable.
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().
Parent blob.
Start offset of sub-blob within @parent, in bytes.
Length of sub-blob.
Decreases the reference count on @blob, and if it reaches zero, destroys
@blob, 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.
a blob.
a blob.
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.
Writable blob data,
or %NULL if failed.
a blob.
output length of the writable data.
Returns the singleton empty blob.
See TODO:link object types for more information.
the empty blob.
the length of blob data in bytes.
a blob.
a blob.
key for data to get.
TODO
a blob.
a blob.
Increases the reference count on @blob.
See TODO:link object types for more information.
@blob.
a blob.
a blob.
key for data to set.
data to set.
callback to call when @data is not needed anymore.
whether to replace an existing data with the same key.
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
#hb_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.
an #hb_buffer_t.
a Unicode code point.
the cluster value of @codepoint.
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.
a #hb_buffer_t to append characters to.
an array of Unicode code points to append.
the length of the @text, or -1 if it is %NULL terminated.
the offset of the first code point to add to the @buffer.
the number of code points to add to the @buffer, or -1 for the
end of @text (assuming it is %NULL terminated).
Similar to hb_buffer_add_codepoints(), but allows only access to first 256
Unicode code points that can fit in 8-bit strings.
<note>Has nothing to do with non-Unicode Latin-1 encoding.</note>
an #hb_buffer_t.
an array of UTF-8
characters to append.
the length of the @text, or -1 if it is %NULL terminated.
the offset of the first character to add to the @buffer.
the number of characters to add to the @buffer, or -1 for the
end of @text (assuming it is %NULL terminated).
See hb_buffer_add_codepoints().
Replaces invalid UTF-16 characters with the @buffer replacement code point,
see hb_buffer_set_replacement_codepoint().
an #hb_buffer_t.
an array of UTF-16 characters to append.
the length of the @text, or -1 if it is %NULL terminated.
the offset of the first character to add to the @buffer.
the number of characters to add to the @buffer, or -1 for the
end of @text (assuming it is %NULL terminated).
See hb_buffer_add_codepoints().
Replaces invalid UTF-32 characters with the @buffer replacement code point,
see hb_buffer_set_replacement_codepoint().
an #hb_buffer_t.
an array of UTF-32 characters to append.
the length of the @text, or -1 if it is %NULL terminated.
the offset of the first character to add to the @buffer.
the number of characters to add to the @buffer, or -1 for the
end of @text (assuming it is %NULL terminated).
See hb_buffer_add_codepoints().
Replaces invalid UTF-8 characters with the @buffer replacement code point,
see hb_buffer_set_replacement_codepoint().
an #hb_buffer_t.
an array of UTF-8
characters to append.
the length of the @text, or -1 if it is %NULL terminated.
the offset of the first character to add to the @buffer.
the number of characters to add to the @buffer, or -1 for the
end of @text (assuming it is %NULL terminated).
Check if allocating memory for the buffer succeeded.
%true if @buffer memory allocation succeeded, %false otherwise.
an #hb_buffer_t.
Append (part of) contents of another buffer to this buffer.
an #hb_buffer_t.
source #hb_buffer_t.
start index into source buffer to copy. Use 0 to copy from start of buffer.
end index into source buffer to copy. Use (unsigned int) -1 to copy to end of buffer.
Similar to hb_buffer_reset(), but does not clear the Unicode functions and
the replacement code point.
an #hb_buffer_t.
Return cluster values grouped by graphemes into
monotone order.
Return cluster values grouped into monotone order.
Don't group cluster values.
Default cluster level,
equal to @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES.
Initial value for new buffer.
The buffer contains input characters (before shaping).
The buffer contains output glyphs (after shaping).
Creates a new #hb_buffer_t with all properties to defaults.
A newly allocated #hb_buffer_t with a reference count of 1. The initial
reference count should be released with hb_buffer_destroy() when you are done
using the #hb_buffer_t. This function never returns %NULL. If memory cannot
be allocated, a special #hb_buffer_t object will be returned on which
hb_buffer_allocation_successful() returns %false.
an #hb_buffer_t 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().
an #hb_buffer_t.
If dottedcircle_glyph is (hb_codepoint_t) -1 then %HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT
and %HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT are never returned. This should be used by most
callers if just comparing two buffers is needed.
a buffer.
other buffer to compare to.
glyph id of U+25CC DOTTED CIRCLE, or (hb_codepont_t) -1.
allowed absolute difference in position values.
the default buffer flag.
flag indicating that special handling of the beginning
of text paragraph can be applied to this buffer. Should usually
be set, unless you are passing to the buffer only part
of the text without the full context.
flag indicating that special handling of the end of text
paragraph can be applied to this buffer, similar to
@HB_BUFFER_FLAG_BOT.
flag indication that character with Default_Ignorable
Unicode property should use the corresponding glyph
from the font, instead of hiding them (done by
replacing them with the space glyph and zeroing the
advance width.) This flag takes precedence over
@HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES.
flag indication that character with Default_Ignorable
Unicode property should be removed from glyph string
instead of hiding them (done by replacing them with the
space glyph and zeroing the advance width.)
@HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES takes
precedence over this flag. Since: 1.8.0
an #hb_buffer_t.
see hb_buffer_set_content_type().
The type of @buffer contents.
an #hb_buffer_t.
See hb_buffer_set_direction()
The direction of the @buffer.
an #hb_buffer_t.
See hb_buffer_set_flags().
The @buffer flags.
an #hb_buffer_t.
Returns @buffer glyph information array. Returned pointer
is valid as long as @buffer contents are not modified.
The @buffer glyph information array.
The value valid as long as buffer has not been modified.
an #hb_buffer_t.
output array length.
Returns @buffer glyph position array. Returned pointer
is valid as long as @buffer contents are not modified.
The @buffer glyph position array.
The value valid as long as buffer has not been modified.
an #hb_buffer_t.
output length.
See hb_buffer_set_invisible_glyph().
The @buffer invisible #hb_codepoint_t.
an #hb_buffer_t.
See hb_buffer_set_language().
The #hb_language_t of the buffer. Must not be freed by the caller.
an #hb_buffer_t.
Returns the number of items in the buffer.
The @buffer length.
The value valid as long as buffer has not been modified.
an #hb_buffer_t.
See hb_buffer_set_replacement_codepoint().
The @buffer replacement #hb_codepoint_t.
an #hb_buffer_t.
See hb_buffer_set_script().
The #hb_script_t of the @buffer.
an #hb_buffer_t.
Sets @props to the #hb_segment_properties_t of @buffer.
an #hb_buffer_t.
the output #hb_segment_properties_t.
an #hb_buffer_t.
an #hb_buffer_t.
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.
an #hb_buffer_t.
Reorders a glyph buffer to have canonical in-cluster glyph order / position.
The resulting clusters should behave identical to pre-reordering clusters.
<note>This has nothing to do with Unicode normalization.</note>
an #hb_buffer_t.
Pre allocates memory for @buffer to fit at least @size number of items.
%true if @buffer memory allocation succeeded, %false otherwise.
an #hb_buffer_t.
number of items to pre allocate.
Increases the reference count on @buffer by one. This prevents @buffer from
being destroyed until a matching call to hb_buffer_destroy() is made.
The referenced #hb_buffer_t.
an #hb_buffer_t.
Resets the buffer to its initial status, as if it was just newly created
with hb_buffer_create().
an #hb_buffer_t.
Reverses buffer contents.
an #hb_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.
an #hb_buffer_t.
Reverses buffer contents between start to end.
an #hb_buffer_t.
start index.
end index.
Flags that control what glyph information are serialized in hb_buffer_serialize_glyphs().
serialize glyph names, clusters and positions.
do not serialize glyph cluster.
do not serialize glyph position information.
do no serialize glyph name.
serialize glyph extents.
serialize glyph flags. Since: 1.5.0
do not serialize glyph advances,
glyph offsets will reflect absolute glyph positions. Since: 1.8.0
Parses a string into an #hb_buffer_serialize_format_t. Does not check if
@str is a valid buffer serialization format, use
hb_buffer_serialize_list_formats() to get the list of supported formats.
The parsed #hb_buffer_serialize_format_t.
a string to parse
length of @str, or -1 if string is %NULL terminated
The buffer serialization and de-serialization format used in
hb_buffer_serialize_glyphs() and hb_buffer_deserialize_glyphs().
a human-readable, plain text format.
a machine-readable JSON format.
invalid format.
Converts @format to the string corresponding it, or %NULL if it is not a valid
#hb_buffer_serialize_format_t.
A %NULL terminated string corresponding to @format. Should not be freed.
an #hb_buffer_serialize_format_t to convert.
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
#HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES flag is set. Then,
- If #HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS is not set, `=` then #hb_glyph_info_t.cluster.
- If #HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS is not set, the #hb_glyph_position_t in the format:
- If both #hb_glyph_position_t.x_offset and #hb_glyph_position_t.y_offset are not 0, `@x_offset,y_offset`. Then,
- `+x_advance`, then `,y_advance` if #hb_glyph_position_t.y_advance is not 0. Then,
- If #HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS is set, the
#hb_glyph_extents_t in the format
`<x_bearing,y_bearing,width,height>`
## json
TODO.
The number of serialized items.
an #hb_buffer_t buffer.
the first item in @buffer to serialize.
the last item in @buffer to serialize.
output string to
write serialized buffer into.
the size of @buf.
if not %NULL, will be set to the number of byes written into @buf.
the #hb_font_t used to shape this buffer, needed to
read glyph names and extents. If %NULL, and empty font will be used.
the #hb_buffer_serialize_format_t to use for formatting the output.
the #hb_buffer_serialize_flags_t that control what glyph properties
to serialize.
Returns a list of supported buffer serialization formats.
A string array of buffer serialization formats. Should not be freed.
an #hb_buffer_t.
Sets the type of @buffer contents, buffers are either empty, contain
characters (before shaping) or glyphs (the result of shaping).
an #hb_buffer_t.
the type of buffer contents to set
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.
an #hb_buffer_t.
the #hb_direction_t of the @buffer
Sets @buffer flags to @flags. See #hb_buffer_flags_t.
an #hb_buffer_t.
the buffer flags to set.
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.
an #hb_buffer_t.
the invisible #hb_codepoint_t
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.
an #hb_buffer_t.
an hb_language_t to set.
Similar to hb_buffer_pre_allocate(), but clears any new items added at the
end.
%true if @buffer memory allocation succeeded, %false otherwise.
an #hb_buffer_t.
the new length of @buffer.
an #hb_buffer_t.
Sets the #hb_codepoint_t that replaces invalid entries for a given encoding
when adding text to @buffer.
Default is %HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT.
an #hb_buffer_t.
the replacement #hb_codepoint_t
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.
an #hb_buffer_t.
an #hb_script_t to set.
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.
an #hb_buffer_t.
an #hb_segment_properties_t to use.
an #hb_buffer_t.
an #hb_buffer_t.
The main structure holding the input text and its properties before shaping,
and output glyphs and their information after shaping.
Initial, unset direction.
Text is set horizontally from left to right.
Text is set horizontally from right to left.
Text is set vertically from top to bottom.
Text is set vertically from bottom to top.
Add table for @tag with data provided by @blob to the face. @face must
be created using hb_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().
New face.
font face.
set to add Unicode characters covered by @face to.
font face.
set to add Variation Selector characters covered by @face to.
font face.
set to add Unicode characters for @variation_selector covered by @face to.
Get number of faces in a blob.
Number of faces in @blob
a blob.
a face.
a face.
a face.
Retrieves table tags for a face, if possible.
total number of tables, or 0 if not possible to list.
a face.
index of first tag to return.
input length of @table_tags array, output number of items written.
array to write tags into.
a face.
a face.
a face.
a face.
a face.
a face.
a face.
a face.
a face.
a face.
a face.
Parses a string into a #hb_feature_t.
TODO: document the syntax here.
%true if @str is successfully parsed, %false otherwise.
a string to parse
length of @str, or -1 if string is %NULL terminated
the #hb_feature_t to initialize with the parsed values
Converts a #hb_feature_t into a %NULL-terminated string in the format
understood by hb_feature_from_string(). The client in responsible for
allocating big enough size for @buf, 128 bytes is more than enough.
an #hb_feature_t to convert
output string
the allocated size of @buf
Converts a #hb_feature_t into a %NULL-terminated string in the format
understood by hb_feature_from_string(). The client in responsible for
allocating big enough size for @buf, 128 bytes is more than enough.
an #hb_feature_t to convert
output string
the allocated size of @buf
a font.
a face.
parent font.
a font.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
Deprecated. Use hb_font_funcs_set_nominal_glyph_func() and
hb_font_funcs_set_variation_glyph_func() instead.
font functions.
callback function.
data to pass to @func.
function to call when @user_data is not needed anymore.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
font functions.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
a font.
Gets the "point size" of the font. A value of 0 means unset.
Point size.
a font.
a font.
a font.
a font.
Return value is valid as long as variation coordinates of the font
are not modified.
a font.
a font.
a font.
a font.
a font.
a font.
Sets font-face of @font.
a font.
new face.
a font.
a font.
Sets parent font of @font.
a font.
new parent.
a font.
Sets "point size" of the font. Set to 0 to unset.
There are 72 points in an inch.
a font.
font size in points.
a font.
a font.
a font.
Indicates that if input text is broken at the
beginning of the cluster this glyph is part of,
then both sides need to be re-shaped, as the
result might be different. On the flip side,
it means that when this flag is not present,
then it's safe to break the glyph-run at the
beginning of this cluster, and the two sides
represent the exact same result one would get
if breaking input text at the beginning of
this cluster and shaping the two sides
separately. This can be used to optimize
paragraph layout, by avoiding re-shaping
of each line after line-breaking, or limiting
the reshaping to a small piece around the
breaking point only.
All the currently defined flags.
Returns glyph flags encoded within a #hb_glyph_info_t.
The #hb_glyph_flags_t encoded within @info.
a #hb_glyph_info_t.
The #hb_glyph_info_t is the structure that holds information about the
glyphs and their relation to input text.
either a Unicode code point (before shaping) or a glyph index
(after shaping).
the index of the character in the original text that corresponds
to this #hb_glyph_info_t, or whatever the client passes to
hb_buffer_add(). More than one #hb_glyph_info_t can have the same
@cluster value, if they resulted from the same character (e.g. one
to many glyph substitution), and when more than one character gets
merged in the same glyph (e.g. many to one glyph substitution) the
#hb_glyph_info_t will have the smallest cluster value of them.
By default some characters are merged into the same cluster
(e.g. combining marks have the same cluster as their bases)
even if they are separate glyphs, hb_buffer_set_cluster_level()
allow selecting more fine-grained cluster handling.
The #hb_glyph_position_t is the structure that holds the positions of the
glyph in both horizontal and vertical directions. All positions in
#hb_glyph_position_t are relative to the current point.
how much the line advances after drawing this glyph when setting
text in horizontal direction.
how much the line advances after drawing this glyph when setting
text in vertical direction.
how much the glyph moves on the X-axis before drawing it, this
should not affect how much the line advances.
how much the glyph moves on the Y-axis before drawing it, this
should not affect how much the line advances.
Converts @str representing a BCPÂ 47 language tag to the corresponding
#hb_language_t.
The #hb_language_t corresponding to the BCPÂ 47 language tag.
a string representing
a BCPÂ 47 language tag
length of the @str, or -1 if it is %NULL-terminated.
Get 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.
See hb_language_from_string().
A %NULL-terminated string representing the @language. Must not be freed by
the caller.
an #hb_language_t to convert.
See hb_language_from_string().
A %NULL-terminated string representing the @language. Must not be freed by
the caller.
an #hb_language_t to convert.
a map.
a map.
a map.
a map.
a map.
a map.
a map.
a map.
a map.
a map.
a map.
a map.
Total number of layers a layered color glyph have.
a font face.
a layered color glyph id.
starting offset of layers.
gets number of layers available to be written on buffer
and returns number of written layers.
layers buffer to buffer.
Get PNG image for a glyph.
respective PNG blob of the glyph, if available.
a font object, not face. upem should be set on
that font object if one wants to get optimal png blob, otherwise
return the biggest one
a glyph index.
Get SVG document for a glyph. The blob may be either plain text or gzip-encoded.
respective svg blob of the glyph, if available.
a font face.
a svg glyph index.
whether COLR table is available.
a font face.
whether CPAL table is available.
a font face.
Check whether @face has PNG glyph images (either CBDT or sbix tables).
Returns true if available, false otherwise.
a font face.
Check whether @face has SVG glyph images.
Returns true if available, false otherwise.
a font face.
Pairs of glyph and color index.
Name ID associated with a palette entry, e.g. eye color
a font face.
palette entry index.
default indicating that there is nothing special
to note about a color palette.
flag indicating that the color
palette is appropriate to use when displaying the font on a light background such as white.
flag indicating that the color
palette is appropriate to use when displaying the font on a dark background such as black.
Retrieves the colors in a color palette.
the total number of colors in the palette.
a font face.
the index of the color palette whose colors
are being requested.
the index of the first color being requested.
on input, how many colors
can be maximally stored into the @colors array;
on output, how many colors were actually stored.
an array of #hb_color_t records. After calling
this function, @colors will be filled with
the palette colors. If @colors is NULL, 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
hb_ot_color_palette_get_colors() a second time.
the number of color palettes in @face, or zero if @face has
no colors.
a font face.
the flags for the requested color palette.
a font face
the index of the color palette whose flags are being requested
Retrieves the name id of a color palette. For example, a color font can
have themed palettes like "Spring", "Summer", "Fall", and "Winter".
an identifier within @face's `name` table.
If the requested palette has no name the result is #HB_OT_NAME_ID_INVALID.
a font face.
the index of the color palette whose name is being requested.
Fetches characters listed by designer under feature parameters for "Character
Variant" ("cvXX") features.
Number of total sample characters in the cvXX feature.
#hb_face_t to work upon
table tag to query, "GSUB" or "GPOS".
index of feature to query.
In case the resulting char_count was equal to its input value, there
is a chance there were more characters on the tag so this API can be
called with an offset till resulting char_count gets to a number
lower than input buffer (or consider using just a bigger buffer for
one shot copying).
The count of characters for which this feature
provides glyph variants. (May be zero.)
A buffer pointer. The Unicode codepoints
of the characters for which this feature provides glyph variants.
Fetches name indices from feature parameters for "Stylistic Set" ('ssXX') or
"Character Variant" ('cvXX') features.
true if data found, false otherwise
#hb_face_t to work upon
table tag to query, "GSUB" or "GPOS".
index of feature to query.
The ‘name’ table name ID that specifies a string
for a user-interface label for this feature. (May be NULL.)
The ‘name’ table name ID that specifies a string
that an application can use for tooltip text for this
feature. (May be NULL.)
The ‘name’ table name ID that specifies sample text
that illustrates the effect of this feature. (May be NULL.)
Number of named parameters. (May be zero.)
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.)
Compute the transitive closure of glyphs needed for all of the
provided lookups.
This function returns the requested math constants as a #hb_position_t.
If the request constant is HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN,
HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN or
HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN then the return value is
actually an integer between 0 and 100 representing that percentage.
the requested constant or 0
#hb_font_t from which to retrieve the value
#hb_ot_math_constant_t the constant to retrieve
This function tries to retrieve the GlyphAssembly for the specified font,
glyph and direction. Note that only the value of #HB_DIRECTION_IS_HORIZONTAL
is considered. It provides the information necessary to draw the glyph
assembly as an array of #hb_ot_math_glyph_part_t.
the total number of parts in the glyph assembly
#hb_font_t from which to retrieve the values
index of the glyph to stretch
direction of the stretching
offset of the first glyph part to retrieve
maximum number of glyph parts to retrieve after start_offset
(IN) and actual number of parts retrieved (OUT)
array of size at least @parts_count to store the result
italic correction of the glyph assembly
the italics correction of the glyph or 0
#hb_font_t from which to retrieve the value
glyph index from which to retrieve the value
This function tries to retrieve the MathKern table for the specified font,
glyph and #hb_ot_math_kern_t. Then it browses the list of heights from the
MathKern table to find one value that is greater or equal to specified
correction_height. If one is found the corresponding value from the list of
kerns is returned and otherwise the last kern value is returned.
requested kerning or 0
#hb_font_t from which to retrieve the value
glyph index from which to retrieve the value
the #hb_ot_math_kern_t from which to retrieve the value
the correction height to use to determine the kerning.
the top accent attachment of the glyph or 0
#hb_font_t from which to retrieve the value
glyph index from which to retrieve the value
This function tries to retrieve the MathGlyphConstruction for the specified
font, glyph and direction. Note that only the value of
#HB_DIRECTION_IS_HORIZONTAL is considered. It provides the corresponding list
of size variants as an array of hb_ot_math_glyph_variant_t structs.
the total number of size variants available or 0
#hb_font_t from which to retrieve the values
index of the glyph to stretch
direction of the stretching
offset of the first variant to retrieve
maximum number of variants to retrieve after start_offset
(IN) and actual number of variants retrieved (OUT)
array of size at least @variants_count to store the result
This function tries to retrieve the MathVariants table for the specified
font and returns the minimum overlap of connecting glyphs to draw a glyph
assembly in the specified direction. Note that only the value of
#HB_DIRECTION_IS_HORIZONTAL is considered.
requested min connector overlap or 0
#hb_font_t from which to retrieve the value
direction of the stretching
This function allows to verify the presence of an OpenType MATH table on the
face.
true if face has a MATH table, false otherwise
#hb_face_t to test
true if the glyph is an extended shape, false otherwise
a #hb_face_t to test
a glyph index to test
Structure representing a name ID in a particular language.
name ID
language
Fetches a font name from the OpenType 'name' table.
If @language is #HB_LANGUAGE_INVALID, English ("en") is assumed.
Returns string in UTF-16 encoding.
full length of the requested string, or 0 if not found.
font face.
OpenType name identifier to fetch.
language to fetch the name for.
input size of @text buffer, and output size of
text written to buffer.
buffer to write fetched name into.
Fetches a font name from the OpenType 'name' table.
If @language is #HB_LANGUAGE_INVALID, English ("en") is assumed.
Returns string in UTF-32 encoding.
full length of the requested string, or 0 if not found.
font face.
OpenType name identifier to fetch.
language to fetch the name for.
input size of @text buffer, and output size of
text written to buffer.
buffer to write fetched name into.
Fetches a font name from the OpenType 'name' table.
If @language is #HB_LANGUAGE_INVALID, English ("en") is assumed.
Returns string in UTF-8 encoding.
full length of the requested string, or 0 if not found.
font face.
OpenType name identifier to fetch.
language to fetch the name for.
input size of @text buffer, and output size of
text written to buffer.
buffer to write fetched name into.
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.
Array of available name entries.
font face.
number of returned entries.
Converts an #hb_script_t and an #hb_language_t to script and language tags.
an #hb_script_t to convert.
an #hb_language_t to convert.
maximum number of script tags to retrieve (IN)
and actual number of script tags retrieved (OUT)
array of size at least @script_count to store the
script tag results
maximum number of language tags to retrieve
(IN) and actual number of language tags retrieved (OUT)
array of size at least @language_count to store
the language tag results
Converts a script tag and a language tag to an #hb_script_t and an
#hb_language_t.
a script tag
a language tag
the #hb_script_t corresponding to @script_tag (OUT).
the #hb_language_t corresponding to @script_tag and
@language_tag (OUT).
The axis should not be exposed directly in user interfaces.
This function allows to verify the presence of OpenType variation data on the face.
true if face has a `fvar' table and false otherwise
#hb_face_t to test
Converts an ISOÂ 15924 script tag to a corresponding #hb_script_t.
An #hb_script_t corresponding to the ISOÂ 15924 tag.
an #hb_tag_t representing an ISOÂ 15924 tag.
Converts a string @str representing an ISOÂ 15924 script tag to a
corresponding #hb_script_t. Shorthand for hb_tag_from_string() then
hb_script_from_iso15924_tag().
An #hb_script_t corresponding to the ISOÂ 15924 tag.
a string representing an
ISOÂ 15924 tag.
length of the @str, or -1 if it is %NULL-terminated.
See hb_script_from_iso15924_tag().
An #hb_tag_t representing an ISOÂ 15924 script tag.
an #hb_script_ to convert.
Checks the equality of two #hb_segment_properties_t's.
%true if all properties of @a equal those of @b, false otherwise.
first #hb_segment_properties_t to compare.
second #hb_segment_properties_t to compare.
Creates a hash representing @p.
A hash of @p.
#hb_segment_properties_t to hash.
The structure that holds various text properties of an #hb_buffer_t. Can be
set and retrieved using hb_buffer_set_segment_properties() and
hb_buffer_get_segment_properties(), respectively.
the #hb_direction_t of the buffer, see hb_buffer_set_direction().
the #hb_script_t of the buffer, see hb_buffer_set_script().
the #hb_language_t of the buffer, see hb_buffer_set_language().
a set.
a set.
a set.
a set.
a set.
a set.
a set.
Finds the maximum number in the set.
minimum of the set, or %HB_SET_VALUE_INVALID if set is empty.
a set.
Finds the minimum number in the set.
minimum of the set, or %HB_SET_VALUE_INVALID if set is empty.
a set.
Returns the number of numbers in the set.
set population.
a set.
a set.
a set.
a set.
a set.
a set.
%TRUE if the two sets are equal, %FALSE otherwise.
a set.
other set.
%TRUE if the @set is a subset of (or equal to) @larger_set, %FALSE otherwise.
a set.
other set.
Gets the next number in @set that is greater than current value of @codepoint.
Set @codepoint to %HB_SET_VALUE_INVALID to get started.
whether there was a next value.
a set.
Gets the next consecutive range of numbers in @set that
are greater than current value of @last.
Set @last to %HB_SET_VALUE_INVALID to get started.
whether there was a next range.
a set.
output first codepoint in the range.
input current last and output last codepoint in the range.
Gets the previous number in @set that is slower than current value of @codepoint.
Set @codepoint to %HB_SET_VALUE_INVALID to get started.
whether there was a previous value.
a set.
Gets the previous consecutive range of numbers in @set that
are greater than current value of @last.
Set @first to %HB_SET_VALUE_INVALID to get started.
whether there was a previous range.
a set.
input current first and output first codepoint in the range.
output last codepoint in the range.
a set.
a set.
a set.
a set.
a set.
a set.
Shapes @buffer using @font turning its Unicode characters content to
positioned glyphs. If @features is not %NULL, it will be used to control the
features applied during shaping.
an #hb_font_t to use for shaping
an #hb_buffer_t to shape
an array of user
specified #hb_feature_t or %NULL
the length of @features array
See hb_shape() for details. If @shaper_list is not %NULL, the specified
shapers will be used in the given order, otherwise the default shapers list
will be used.
false if all shapers failed, true otherwise
an #hb_font_t to use for shaping
an #hb_buffer_t to shape
an array of user
specified #hb_feature_t or %NULL
the length of @features array
a %NULL-terminated
array of shapers to use or %NULL
Retrieves the list of shapers supported by HarfBuzz.
an array of
constant strings
a shape plan.
a shape plan.
a font.
a buffer.
a shape plan.
a shape plan.
a shape plan.
a shape plan.
Unicode functions.
Unicode functions.
Unicode functions.
Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed.
The complete length of the decomposition will be returned.
If @u has no compatibility decomposition, zero should be returned.
The Unicode standard guarantees that a buffer of length %HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any
compatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations
of this function type must ensure that they do not write past the provided array.
number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available.
a Unicode function structure
codepoint to decompose
address of codepoint array (of length %HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into
user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func()
Unicode functions.
Unicode functions.
Unicode functions.
Unicode functions.
Unicode functions.
Unicode functions.
a Unicode function structure
a Unicode function structure
a Unicode function structure
a Unicode function structure
a Unicode function structure
a Unicode function structure
a Unicode function structure
a Unicode function structure
Unicode functions.
Returns library version as three integer components.
Library major version component.
Library minor version component.
Library micro version component.
Returns library version as a string with three components.
library version string.