Top |
Functions
Types and Values
#define | HB_UNICODE_MAX |
enum | hb_unicode_combining_class_t |
enum | hb_unicode_general_category_t |
typedef | hb_unicode_funcs_t |
Description
Unicode functions are used to access Unicode character properties. With these functions, client programs can query various properties from the Unicode Character Database for any code point, such as General Category (gc), Script (sc), Canonical Combining Class (ccc), etc.
Client programs can optionally pass in their own Unicode functions that implement the same queries. The set of functions available is defined by the virtual methods in hb_unicode_funcs_t.
HarfBuzz provides built-in default functions for each method in hb_unicode_funcs_t.
Functions
hb_unicode_general_category ()
hb_unicode_general_category_t hb_unicode_general_category (hb_unicode_funcs_t *ufuncs
,hb_codepoint_t unicode
);
Retrieves the General Category (gc) property
of code point unicode
.
Since: 0.9.2
hb_unicode_combining_class ()
hb_unicode_combining_class_t hb_unicode_combining_class (hb_unicode_funcs_t *ufuncs
,hb_codepoint_t unicode
);
Retrieves the Canonical Combining Class (ccc) property
of code point unicode
.
Since: 0.9.2
hb_unicode_mirroring ()
hb_codepoint_t hb_unicode_mirroring (hb_unicode_funcs_t *ufuncs
,hb_codepoint_t unicode
);
Retrieves the Bi-directional Mirroring Glyph code
point defined for code point unicode
.
Since: 0.9.2
hb_unicode_script ()
hb_script_t hb_unicode_script (hb_unicode_funcs_t *ufuncs
,hb_codepoint_t unicode
);
Retrieves the hb_script_t script to which code
point unicode
belongs.
Since: 0.9.2
hb_unicode_compose ()
hb_bool_t hb_unicode_compose (hb_unicode_funcs_t *ufuncs
,hb_codepoint_t a
,hb_codepoint_t b
,hb_codepoint_t *ab
);
Fetches the composition of a sequence of two Unicode code points.
Calls the composition function of the specified
Unicode-functions structure ufuncs
.
Parameters
ufuncs |
The Unicode-functions structure |
|
a |
The first Unicode code point to compose |
|
b |
The second Unicode code point to compose |
|
ab |
The composition of |
[out] |
Since: 0.9.2
hb_unicode_decompose ()
hb_bool_t hb_unicode_decompose (hb_unicode_funcs_t *ufuncs
,hb_codepoint_t ab
,hb_codepoint_t *a
,hb_codepoint_t *b
);
Fetches the decomposition of a Unicode code point.
Calls the decomposition function of the specified
Unicode-functions structure ufuncs
.
Parameters
ufuncs |
The Unicode-functions structure |
|
ab |
Unicode code point to decompose |
|
a |
The first code point of the decomposition of |
[out] |
b |
The second code point of the decomposition of |
[out] |
Since: 0.9.2
hb_unicode_funcs_create ()
hb_unicode_funcs_t *
hb_unicode_funcs_create (hb_unicode_funcs_t *parent
);
Creates a new hb_unicode_funcs_t structure of Unicode functions.
Since: 0.9.2
hb_unicode_funcs_get_empty ()
hb_unicode_funcs_t *
hb_unicode_funcs_get_empty (void
);
Fetches the singleton empty Unicode-functions structure.
Since: 0.9.2
hb_unicode_funcs_reference ()
hb_unicode_funcs_t *
hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs
);
Increases the reference count on a Unicode-functions structure.
[skip]
Since: 0.9.2
hb_unicode_funcs_destroy ()
void
hb_unicode_funcs_destroy (hb_unicode_funcs_t *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.
[skip]
Since: 0.9.2
hb_unicode_funcs_set_user_data ()
hb_bool_t hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs
,hb_user_data_key_t *key
,void *data
,hb_destroy_func_t destroy
,hb_bool_t replace
);
Attaches a user-data key/data pair to the specified Unicode-functions structure.
[skip]
Parameters
ufuncs |
The Unicode-functions structure |
|
key |
The user-data key |
|
data |
A pointer to the user data |
|
destroy |
A callback to call when |
[nullable] |
replace |
Whether to replace an existing data with the same key |
Since: 0.9.2
hb_unicode_funcs_get_user_data ()
void * hb_unicode_funcs_get_user_data (const hb_unicode_funcs_t *ufuncs
,hb_user_data_key_t *key
);
Fetches the user-data associated with the specified key, attached to the specified Unicode-functions structure.
[skip]
Since: 0.9.2
hb_unicode_funcs_make_immutable ()
void
hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs
);
Makes the specified Unicode-functions structure immutable.
Since: 0.9.2
hb_unicode_funcs_is_immutable ()
hb_bool_t
hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs
);
Tests whether the specified Unicode-functions structure is immutable.
Since: 0.9.2
hb_unicode_funcs_get_default ()
hb_unicode_funcs_t *
hb_unicode_funcs_get_default (void
);
Fetches a pointer to the default Unicode-functions structure that is used when no functions are explicitly set on hb_buffer_t.
Since: 0.9.2
hb_unicode_funcs_get_parent ()
hb_unicode_funcs_t *
hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs
);
Fetches the parent of the Unicode-functions structure
ufuncs
.
Since: 0.9.2
hb_unicode_general_category_func_t ()
hb_unicode_general_category_t (*hb_unicode_general_category_func_t) (hb_unicode_funcs_t *ufuncs
,hb_codepoint_t unicode
,void *user_data
);
A virtual method for the hb_unicode_funcs_t structure.
This method should retrieve the General Category property for a specified Unicode code point.
hb_unicode_funcs_set_general_category_func ()
void hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs
,hb_unicode_general_category_func_t func
,void *user_data
,hb_destroy_func_t destroy
);
Sets the implementation function for hb_unicode_general_category_func_t.
Parameters
ufuncs |
A Unicode-functions structure |
|
func |
The callback function to assign. |
[closure user_data][destroy destroy][scope notified] |
user_data |
Data to pass to |
|
destroy |
The function to call when |
[nullable] |
Since: 0.9.2
hb_unicode_combining_class_func_t ()
hb_unicode_combining_class_t (*hb_unicode_combining_class_func_t) (hb_unicode_funcs_t *ufuncs
,hb_codepoint_t unicode
,void *user_data
);
A virtual method for the hb_unicode_funcs_t structure.
This method should retrieve the Canonical Combining Class (ccc) property for a specified Unicode code point.
hb_unicode_funcs_set_combining_class_func ()
void hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs
,hb_unicode_combining_class_func_t func
,void *user_data
,hb_destroy_func_t destroy
);
Sets the implementation function for hb_unicode_combining_class_func_t.
Parameters
ufuncs |
A Unicode-functions structure |
|
func |
The callback function to assign. |
[closure user_data][destroy destroy][scope notified] |
user_data |
Data to pass to |
|
destroy |
The function to call when |
[nullable] |
Since: 0.9.2
hb_unicode_mirroring_func_t ()
hb_codepoint_t (*hb_unicode_mirroring_func_t) (hb_unicode_funcs_t *ufuncs
,hb_codepoint_t unicode
,void *user_data
);
A virtual method for the hb_unicode_funcs_t structure.
This method should retrieve the Bi-Directional Mirroring Glyph code point for a specified Unicode code point.
hb_unicode_funcs_set_mirroring_func ()
void hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs
,hb_unicode_mirroring_func_t func
,void *user_data
,hb_destroy_func_t destroy
);
Sets the implementation function for hb_unicode_mirroring_func_t.
Parameters
ufuncs |
A Unicode-functions structure |
|
func |
The callback function to assign. |
[closure user_data][destroy destroy][scope notified] |
user_data |
Data to pass to |
|
destroy |
The function to call when |
[nullable] |
Since: 0.9.2
hb_unicode_script_func_t ()
hb_script_t (*hb_unicode_script_func_t) (hb_unicode_funcs_t *ufuncs
,hb_codepoint_t unicode
,void *user_data
);
A virtual method for the hb_unicode_funcs_t structure.
This method should retrieve the Script property for a specified Unicode code point.
hb_unicode_funcs_set_script_func ()
void hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs
,hb_unicode_script_func_t func
,void *user_data
,hb_destroy_func_t destroy
);
Sets the implementation function for hb_unicode_script_func_t.
Parameters
ufuncs |
A Unicode-functions structure |
|
func |
The callback function to assign. |
[closure user_data][destroy destroy][scope notified] |
user_data |
Data to pass to |
|
destroy |
The function to call when |
[nullable] |
Since: 0.9.2
hb_unicode_compose_func_t ()
hb_bool_t (*hb_unicode_compose_func_t) (hb_unicode_funcs_t *ufuncs
,hb_codepoint_t a
,hb_codepoint_t b
,hb_codepoint_t *ab
,void *user_data
);
A virtual method for the hb_unicode_funcs_t structure.
This method should compose a sequence of two input Unicode code points by canonical equivalence, returning the composed code point in a hb_codepoint_t output parameter (if successful). The method must return an hb_bool_t indicating the success of the composition.
hb_unicode_funcs_set_compose_func ()
void hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t *ufuncs
,hb_unicode_compose_func_t func
,void *user_data
,hb_destroy_func_t destroy
);
Sets the implementation function for hb_unicode_compose_func_t.
Parameters
ufuncs |
A Unicode-functions structure |
|
func |
The callback function to assign. |
[closure user_data][destroy destroy][scope notified] |
user_data |
Data to pass to |
|
destroy |
The function to call when |
[nullable] |
Since: 0.9.2
hb_unicode_decompose_func_t ()
hb_bool_t (*hb_unicode_decompose_func_t) (hb_unicode_funcs_t *ufuncs
,hb_codepoint_t ab
,hb_codepoint_t *a
,hb_codepoint_t *b
,void *user_data
);
A virtual method for the hb_unicode_funcs_t structure.
This method should decompose an input Unicode code point, returning the two decomposed code points in hb_codepoint_t output parameters (if successful). The method must return an hb_bool_t indicating the success of the composition.
hb_unicode_funcs_set_decompose_func ()
void hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs
,hb_unicode_decompose_func_t func
,void *user_data
,hb_destroy_func_t destroy
);
Sets the implementation function for hb_unicode_decompose_func_t.
Parameters
ufuncs |
A Unicode-functions structure |
|
func |
The callback function to assign. |
[closure user_data][destroy destroy][scope notified] |
user_data |
Data to pass to |
|
destroy |
The function to call when |
[nullable] |
Since: 0.9.2
Types and Values
enum hb_unicode_combining_class_t
Data type for the Canonical_Combining_Class (ccc) property from the Unicode Character Database.
hb_unicode_combining_class()
.Members
Spacing and enclosing marks; also many vowel and consonant signs, even if nonspacing |
||
Marks which overlay a base letter or symbol |
||
Diacritic nukta marks in Brahmi-derived scripts |
||
Hiragana/Katakana voicing marks |
||
Viramas |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Hebrew] |
||
[Arabic] |
||
[Arabic] |
||
[Arabic] |
||
[Arabic] |
||
[Arabic] |
||
[Arabic] |
||
[Arabic] |
||
[Arabic] |
||
[Arabic] |
||
[Syriac] |
||
[Telugu] |
||
[Telugu] |
||
[Thai] |
||
[Thai] |
||
[Lao] |
||
[Lao] |
||
[Tibetan] |
||
[Tibetan] |
||
[Tibetan] Since: 7.2.0 |
||
Marks attached at the bottom left |
||
Marks attached directly below |
||
Marks attached directly above |
||
Marks attached at the top right |
||
Distinct marks at the bottom left |
||
Distinct marks directly below |
||
Distinct marks at the bottom right |
||
Distinct marks to the left |
||
Distinct marks to the right |
||
Distinct marks at the top left |
||
Distinct marks directly above |
||
Distinct marks at the top right |
||
Distinct marks subtending two bases |
||
Distinct marks extending above two bases |
||
Greek iota subscript only |
||
Invalid combining class |
enum hb_unicode_general_category_t
Data type for the "General_Category" (gc) property from the Unicode Character Database.
hb_unicode_funcs_t
typedef struct hb_unicode_funcs_t hb_unicode_funcs_t;
Data type containing a set of virtual methods used for accessing various Unicode character properties.
HarfBuzz provides a default function for each of the methods in hb_unicode_funcs_t. Client programs can implement their own replacements for the individual Unicode functions, as needed, and replace the default by calling the setter for a method.