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.
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.
Parent blob.
Start offset of sub-blob within parent,
in bytes.
Length of sub-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.
a blob.
Returns the singleton empty blob.
See TODO:link object types for more information.
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 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.
an #hb_buffer_t.
an array of UTF-8 characters to append.
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 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 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 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).
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 HB_FEATURE_GLOBAL_END
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.
Creates a new #hb_buffer_t with all properties to defaults.
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.
see hb_buffer_set_content_type().
an #hb_buffer_t.
See hb_buffer_set_direction()
an #hb_buffer_t.
See hb_buffer_set_flags().
an #hb_buffer_t.
Returns buffer
glyph information array. Returned pointer
is valid as long as buffer
contents are not modified.
an #hb_buffer_t.
Returns buffer
glyph position array. Returned pointer
is valid as long as buffer
contents are not modified.
an #hb_buffer_t.
See hb_buffer_set_invisible_glyph().
an #hb_buffer_t.
See hb_buffer_set_language().
an #hb_buffer_t.
Returns the number of items in the buffer.
an #hb_buffer_t.
See hb_buffer_set_replacement_codepoint().
an #hb_buffer_t.
Sets props
to the #hb_segment_properties_t of buffer
.
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.
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.
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 hb_buffer_serialize_unicode() and
hb_buffer_serialize_glyphs() for a description of the output format.
an #hb_buffer_t buffer.
the first item in buffer
to serialize.
the last item in buffer
to serialize.
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.
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.
a string to parse
Converts format
to the string corresponding it, or %NULL if it is not a valid
#hb_buffer_serialize_format_t.
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:
A human-readable, plain text format. The serialized glyphs will look something like:
[uni0651=0`5`18,0+0|uni0628=0+1897]
[
and ]
.|
=
then #hb_glyph_info_t.cluster.y_offset
. Then,+x_advance
, then ,y_advance
if #hb_glyph_position_t.y_advance is not 0. Then,<x_bearing,y_bearing,width,height>
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
#HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES flag is set.cl
: #hb_glyph_info_t.cluster if
#HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS is not set.dx
,dy
,ax
,ay
: #hb_glyph_position_t.x_offset, #hb_glyph_position_t.y_offset,
#hb_glyph_position_t.x_advance and #hb_glyph_position_t.y_advance
respectively, if #HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS is not set.xb
,yb
,w
,h
: #hb_glyph_extents_t.x_bearing, #hb_glyph_extents_t.y_bearing,
#hb_glyph_extents_t.width and #hb_glyph_extents_t.height respectively if
#HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS is set.an #hb_buffer_t buffer.
the first item in buffer
to serialize.
the last item in buffer
to serialize.
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.
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:
A human-readable, plain text format. The serialized codepoints will look something like:
<U+0651=0|U+0628=1>
|
U+
=
then #hb_glyph_info_t.cluster.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 integercl
: #hb_glyph_info_t.cluster if
#HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS is not set.For example:
[{u:1617,cl:0},{u:1576,cl:1}]
an #hb_buffer_t buffer.
the first item in buffer
to serialize.
the last item in buffer
to serialize.
the #hb_buffer_serialize_format_t to use for formatting the output.
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.
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.
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.
color: a #hb_color_t we are interested in its channels.
color: a #hb_color_t we are interested in its channels.
color: a #hb_color_t we are interested in its channels.
color: a #hb_color_t we are interested in its channels.
Add table for tag
with data provided by blob
to the face. face
must
be created using hb_face_builder_create().
A face object created with hb_face_builder_create()
The #hb_tag_t of the table to add
The blob containing the table data to add
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().
Fetches the number of faces in a blob.
a blob.
Variant of hb_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 hb_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.
Table-referencing function
Fetches the singleton empty face object.
Fetches the glyph-count value of the specified face object.
A face object
Fetches the face-index corresponding to the given face.
A face object
Fetches the units-per-em (upem) value of the specified face object.
A face object
Makes the given face object immutable.
A face object
Sets the glyph count for a face object to the specified value.
A face object
The glyph-count value to assign
Assigns the specified face-index to face
. Fails if the
face is immutable.
A face object
The index to assign
Sets the units-per-em (upem) for a face object to the specified value.
A face object
The units-per-em value to assign
Parses a string into a #hb_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:
a string to parse
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
Deprecated. Use hb_font_funcs_set_nominal_glyph_func() and hb_font_funcs_set_variation_glyph_func() instead.
font functions.
callback function.
Gets the "point size" of the font. A value of 0 means unset.
a font.
Return value is valid as long as variation coordinates of the font are not modified.
Sets "point size" of the font. Set to 0 to unset.
There are 72 points in an inch.
a font.
font size in points.
Sets design coords of a font from a named instance index.
a font.
named instance index.
Fetches the FT_Load_Glyph load flags of the specified #hb_font_t.
For more information, see https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_load_xxx
#hb_font_t to work upon
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_face_t face object created with hb_ft_face_create() is preconfigured for FreeType font functions and does not require this function to be used.
#hb_font_t to work upon
Sets the FT_Load_Glyph load flags for the specified #hb_font_t.
For more information, see https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_load_xxx
#hb_font_t to work upon
The FreeType load flags to set
Creates an #hb_blob_t blob from the specified GBytes data structure.
the GBytes structure to work upon
Fetches a Unicode-functions structure that is populated with the appropriate GLib function for each method.
Fetches the GUnicodeScript identifier that corresponds to the specified #hb_script_t script.
The #hb_script_t to query
Fetches the #hb_script_t script that corresponds to the specified GUnicodeScript identifier.
The GUnicodeScript identifier to query
Returns glyph flags encoded within a #hb_glyph_info_t.
a #hb_glyph_info_t.
Converts str
representing a BCP 47 language tag to the corresponding
#hb_language_t.
a string representing a BCP 47 language tag
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().
an #hb_language_t to convert.
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.
#hb_face_t to work upon
The glyph index to query
offset of the first layer to retrieve
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.
#hb_font_t to work upon
a glyph index
Fetches the name
table Name ID that provides display names for
the specificed color in a face's CPAL
color palette.
Display names can be generic (e.g., "Background") or specific (e.g., "Eye color").
#hb_face_t to work upon
The index of the color
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 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.
#hb_face_t to work upon
the index of the color palette to query
offset of the first color to retrieve
Fetches the number of color palettes in a face.
#hb_face_t to work upon
Fetches the flags defined for a color palette.
#hb_face_t to work upon
The index of the color palette
Fetches the name
table Name ID that provides display names for
a CPAL
color palette.
Palette display names can be generic (e.g., "Default") or provide specific, themed names (e.g., "Spring", "Summer", "Fall", and "Winter").
#hb_face_t to work upon
The index of the color palette
Sets the font functions to use when working with font
.
#hb_font_t to work upon
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.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The array of scripts to collect features for
The array of languages to collect features for
The array of features to collect
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.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The array of scripts to collect lookups for
The array of languages to collect lookups for
The array of features to collect lookups for
Fetches a list of the characters defined as having a variant under the specified "Character Variant" ("cvXX") feature tag.
#hb_face_t to work upon
table tag to query, "GSUB" or "GPOS".
index of feature to query.
offset of the first character to retrieve
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.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The index of the requested feature
offset of the first lookup to retrieve
Fetches name indices from feature parameters for "Stylistic Set" ('ssXX') or "Character Variant" ('cvXX') features.
#hb_face_t to work upon
table tag to query, "GSUB" or "GPOS".
index of feature to query.
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.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The index of the feature to query
The index of the feature variation to query
offset of the first lookup to retrieve
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.
The #hb_face_t to work on
The #hb_codepoint_t code point to query
offset of the first attachment point to retrieve
Fetches a baseline value from the face.
a font
a baseline tag
text direction.
script tag.
language tag.
Fetches the GDEF class of the requested glyph in the specified face.
The #hb_face_t to work on
The #hb_codepoint_t code point to query
Retrieves the set of all glyphs from the face that belong to the requested glyph class in the face's GDEF table.
The #hb_face_t to work on
The #hb_ot_layout_glyph_class_t GDEF class to retrieve
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.
The #hb_font_t to work on
The #hb_direction_t text direction to use
The #hb_codepoint_t code point to query
offset of the first caret position to retrieve
Fetches optical-size feature data (i.e., the size
feature 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 size
feature.
For more information on this distinction, see the size
feature documentation.
#hb_face_t to work upon
Fetches the index of a given feature tag in the specified face's GSUB table or GPOS table, underneath the specified script and language.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The index of the requested script tag
The index of the requested language tag
#hb_tag_t of the feature tag requested
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.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The index of the requested script tag
The index of the requested language tag
offset of the first feature tag to retrieve
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.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The index of the requested script tag
The index of the requested language tag
offset of the first feature tag to retrieve
Fetches the tag of a requested feature index in the given face's GSUB or GPOS table, underneath the specified script and language.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The index of the requested script tag
The index of the requested language tag
Fetches the index of a requested feature in the given face's GSUB or GPOS table, underneath the specified script and language.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The index of the requested script tag
The index of the requested language tag
Fetches a list of all glyphs affected by the specified lookup in the specified face's GSUB table or GPOS table.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The index of the feature lookup to query
Fetches alternates of a glyph from a given GSUB lookup index.
a face.
index of the feature lookup to query.
a glyph id.
starting offset.
Tests whether a specified lookup in the specified face would trigger a substitution on the given glyph sequence.
#hb_face_t to work upon
The index of the lookup to query
The sequence of glyphs to query for substitution
The length of the glyph sequence
#hb_bool_t indicating whether substitutions should be context-free
Fetches the index of a given language tag in the specified face's GSUB table or GPOS table, underneath the specified script tag.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The index of the requested script tag
The #hb_tag_t of the requested language
The index of the requested language
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.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The index of the requested script tag
offset of the first language tag to retrieve
Fetches the index of a given language tag in the specified face's GSUB table or GPOS table, underneath the specified script index.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The index of the requested script tag
The number of languages in the specified script
The array of language tags
Fetches a list of feature variations in the specified face's GSUB table or GPOS table, at the specified variation coordinates.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
The variation coordinates to query
The number of variation coordinates
Fetches the total number of lookups enumerated in the specified face's GSUB table or GPOS table.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
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.
#hb_face_t to work upon
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS
offset of the first script tag to retrieve
Fetches the specified math constant. For most constants, the value returned is an #hb_position_t.
However, if the requested constant is #HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN, #HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN or #HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN, then the return value is an integer between 0 and 100 representing that percentage.
#hb_font_t to work upon
#hb_ot_math_constant_t the constant to retrieve
Fetches the GlyphAssembly for the specified font, glyph index, and direction. Returned are a list of #hb_ot_math_glyph_part_t glyph parts that can be used to draw the glyph and an italics-correction value (if one is defined in the font).
direction
parameter is only used to select between horizontal
or vertical directions for the construction. Even though all #hb_direction_t
values are accepted, only the result of #HB_DIRECTION_IS_HORIZONTAL is
considered.
#hb_font_t to work upon
The index of the glyph to stretch
direction of the stretching (horizontal or vertical)
offset of the first glyph part to retrieve
Fetches an italics-correction value (if one exists) for the specified glyph index.
#hb_font_t to work upon
The glyph index from which to retrieve the value
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.
#hb_font_t to work upon
The 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.
Fetches a top-accent-attachment value (if one exists) for the specified glyph index.
For any glyph that does not have a top-accent-attachment value - that is,
a glyph not covered by the MathTopAccentAttachment
table (or, when
font
has no MathTopAccentAttachment
table or no MATH
table, any
glyph) - the function synthesizes a value, returning the position at
one-half the glyph's advance width.
#hb_font_t to work upon
The glyph index from which to retrieve the value
Fetches the MathGlyphConstruction for the specified font, glyph index, and direction. The corresponding list of size variants is returned as a list of #hb_ot_math_glyph_variant_t structs.
direction
parameter is only used to select between horizontal
or vertical directions for the construction. Even though all #hb_direction_t
values are accepted, only the result of #HB_DIRECTION_IS_HORIZONTAL is
considered.
#hb_font_t to work upon
The index of the glyph to stretch
The direction of the stretching (horizontal or vertical)
offset of the first variant to retrieve
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.
direction
parameter is only used to select between horizontal
or vertical directions for the construction. Even though all #hb_direction_t
values are accepted, only the result of #HB_DIRECTION_IS_HORIZONTAL is
considered.
#hb_font_t to work upon
direction of the stretching (horizontal or vertical)
It fetches metadata entry of a given tag from a font.
a #hb_face_t object.
tag of metadata you like to have.
It fetches metrics value corresponding to a given tag from a font.
a #hb_font_t object.
tag of metrics value you like to fetch.
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.
font face.
OpenType name identifier to fetch.
language to fetch the name for.
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.
font face.
OpenType name identifier to fetch.
language to fetch the name for.
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.
font face.
OpenType name identifier to fetch.
language to fetch the name for.
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.
font face.
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.
#hb_font_t to work upon
The input buffer to compute from
The features enabled on the buffer
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)
maximum number of language tags to retrieve (IN) and actual number of language tags retrieved (OUT)
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).
Fetches the variation-axis information corresponding to the specified axis tag in the specified face.
#hb_face_t to work upon
The #hb_tag_t of the variation axis to query
The index of the variation axis
Fetches the variation-axis information corresponding to the specified axis tag in the specified face.
#hb_face_t to work upon
The #hb_tag_t of the variation axis to query
Fetches a list of all variation axes in the specified face. The list returned will begin at the offset provided.
#hb_face_t to work upon
offset of the first lookup to retrieve
Fetches the number of OpenType variation axes included in the face.
The #hb_face_t to work on
Fetches a list of all variation axes in the specified face. The list returned will begin at the offset provided.
#hb_face_t to work upon
offset of the first lookup to retrieve
Fetches the number of named instances included in the face.
The #hb_face_t to work on
Fetches the design-space coordinates corresponding to the given named instance in the face.
The #hb_face_t to work on
The index of the named instance to query
Fetches the name
table Name ID that provides display names for
the "PostScript name" defined for the given named instance in the face.
The #hb_face_t to work on
The index of the named instance to query
Fetches the name
table Name ID that provides display names for
the "Subfamily name" defined for the given named instance in the face.
The #hb_face_t to work on
The index of the named instance to query
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 avar
table is also
applied, as described at https://docs.microsoft.com/en-us/typography/opentype/spec/avar
The #hb_face_t to work on
The length of the coordinate array
The design-space coordinates to normalize
Normalizes all of the coordinates in the given list of variation axes.
The #hb_face_t to work on
The array of variations to normalize
The number of variations to normalize
Converts an ISO 15924 script tag to a corresponding #hb_script_t.
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().
a string representing an ISO 15924 tag.
Checks the equality of two #hb_segment_properties_t's.
first #hb_segment_properties_t to compare.
second #hb_segment_properties_t to compare.
Creates a hash representing p
.
#hb_segment_properties_t to hash.
Finds the maximum number in the set.
a set.
Finds the minimum number in the set.
a set.
Returns the number of numbers in the set.
a 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.
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.
a set.
input current last and output last codepoint in the range.
Gets the previous number in set
that is lower than current value of codepoint
.
Set codepoint
to %HB_SET_VALUE_INVALID to get started.
a set.
Gets the previous consecutive range of numbers in set
that
are less than current value of first
.
Set first
to %HB_SET_VALUE_INVALID to get started.
a set.
input current first and output first codepoint in the range.
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. If two features
have the same tag but
overlapping ranges the value of the feature with the higher index takes
precedence.
an #hb_font_t to use for shaping
an #hb_buffer_t to shape
an array of user specified #hb_feature_t or %NULL
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.
an #hb_font_t to use for shaping
an #hb_buffer_t to shape
an array of user specified #hb_feature_t or %NULL
a %NULL-terminated array of shapers to use or %NULL
Retrieves the list of shapers supported by HarfBuzz.
Constructs a shaping plan for a combination of face,
user_features,
props,
and shaper_list
.
#hb_face_t to use
The #hb_segment_properties_t of the segment
The list of user-selected features
List of shapers to try
The variable-font version of #hb_shape_plan_create.
Constructs a shaping plan for a combination of face,
user_features,
props,
and shaper_list,
plus the variation-space coordinates coords
.
#hb_face_t to use
The #hb_segment_properties_t of the segment
The list of user-selected features
The list of variation-space coordinates
List of shapers to try
Creates a cached shaping plan suitable for reuse, for a combination
of face,
user_features,
props,
and shaper_list
.
#hb_face_t to use
The #hb_segment_properties_t of the segment
The list of user-selected features
List of shapers to try
The variable-font version of #hb_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
.
#hb_face_t to use
The #hb_segment_properties_t of the segment
The list of user-selected features
The list of variation-space coordinates
List of shapers to try
Executes the given shaping plan on the specified buffer, using
the given font
and features
.
A shaping plan
The #hb_font_t to use
The #hb_buffer_t to work upon
Features to enable
Fetches the singleton empty shaping plan.
Fetches the shaper from a given shaping plan.
A shaping plan
Retrieves the Canonical Combining Class (ccc) property
of code point unicode
.
The Unicode-functions structure
The code point to query
Composes the code point sequence a,``b
by canonical equivalence into
code point ab
.
The Unicode-functions structure
The first code point to compose
The second code point to compose
Decomposes code point ab
by canonical equivalence, into code points
a
and b
.
The Unicode-functions structure
The code point to decompose
Fetches the compatibility decomposition of a Unicode code point. Deprecated.
The Unicode-functions structure
Code point to decompose
Creates a new #hb_unicode_funcs_t structure of Unicode functions.
Parent Unicode-functions structure
Fetches a pointer to the default Unicode-functions structure that is used when no functions are explicitly set on #hb_buffer_t.
Fetches the singleton empty Unicode-functions structure.
Fetches the parent of the Unicode-functions structure
ufuncs
.
The Unicode-functions structure
Tests whether the specified Unicode-functions structure is immutable.
The Unicode-functions structure
Makes the specified Unicode-functions structure immutable.
The Unicode-functions structure
Sets the implementation function for #hb_unicode_combining_class_func_t.
A Unicode-functions structure
The callback function to assign
Sets the implementation function for #hb_unicode_compose_func_t.
A Unicode-functions structure
The callback function to assign
Sets the implementation function for #hb_unicode_decompose_func_t.
A Unicode-functions structure
The callback function to assign
Sets the implementation function for #hb_unicode_general_category_func_t.
A Unicode-functions structure
The callback function to assign
Sets the implementation function for #hb_unicode_mirroring_func_t.
A Unicode-functions structure
The callback function to assign
Sets the implementation function for #hb_unicode_script_func_t.
A Unicode-functions structure
The callback function to assign
Retrieves the General Category (gc) property
of code point unicode
.
The Unicode-functions structure
The code point to query
Retrieves the Bi-directional Mirroring Glyph code
point defined for code point unicode
.
The Unicode-functions structure
The code point to query
Retrieves the #hb_script_t script to which code
point unicode
belongs.
The Unicode-functions structure
The code point to query
Returns library version as three integer components.
Returns library version as a string with three components.
Used when getting or setting AAT feature selectors. Indicates that there is no selector index corresponding to the selector of interest.