|
HB_EXTERN hb_glyph_flags_t | hb_glyph_info_get_glyph_flags (const hb_glyph_info_t *info) |
|
HB_EXTERN hb_bool_t | hb_segment_properties_equal (const hb_segment_properties_t *a, const hb_segment_properties_t *b) |
|
HB_EXTERN unsigned int | hb_segment_properties_hash (const hb_segment_properties_t *p) |
|
HB_EXTERN void | hb_segment_properties_overlay (hb_segment_properties_t *p, const hb_segment_properties_t *src) |
|
HB_EXTERN hb_buffer_t * | hb_buffer_create (void) |
|
HB_EXTERN hb_buffer_t * | hb_buffer_create_similar (const hb_buffer_t *src) |
|
HB_EXTERN void | hb_buffer_reset (hb_buffer_t *buffer) |
|
HB_EXTERN hb_buffer_t * | hb_buffer_get_empty (void) |
|
HB_EXTERN hb_buffer_t * | hb_buffer_reference (hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_destroy (hb_buffer_t *buffer) |
|
HB_EXTERN hb_bool_t | hb_buffer_set_user_data (hb_buffer_t *buffer, hb_user_data_key_t *key, void *data, hb_destroy_func_t destroy, hb_bool_t replace) |
|
HB_EXTERN void * | hb_buffer_get_user_data (const hb_buffer_t *buffer, hb_user_data_key_t *key) |
|
HB_EXTERN void | hb_buffer_set_content_type (hb_buffer_t *buffer, hb_buffer_content_type_t content_type) |
|
HB_EXTERN hb_buffer_content_type_t | hb_buffer_get_content_type (const hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_set_unicode_funcs (hb_buffer_t *buffer, hb_unicode_funcs_t *unicode_funcs) |
|
HB_EXTERN hb_unicode_funcs_t * | hb_buffer_get_unicode_funcs (const hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_set_direction (hb_buffer_t *buffer, hb_direction_t direction) |
|
HB_EXTERN hb_direction_t | hb_buffer_get_direction (const hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_set_script (hb_buffer_t *buffer, hb_script_t script) |
|
HB_EXTERN hb_script_t | hb_buffer_get_script (const hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_set_language (hb_buffer_t *buffer, hb_language_t language) |
|
HB_EXTERN hb_language_t | hb_buffer_get_language (const hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_set_segment_properties (hb_buffer_t *buffer, const hb_segment_properties_t *props) |
|
HB_EXTERN void | hb_buffer_get_segment_properties (const hb_buffer_t *buffer, hb_segment_properties_t *props) |
|
HB_EXTERN void | hb_buffer_guess_segment_properties (hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_set_flags (hb_buffer_t *buffer, hb_buffer_flags_t flags) |
|
HB_EXTERN hb_buffer_flags_t | hb_buffer_get_flags (const hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_set_cluster_level (hb_buffer_t *buffer, hb_buffer_cluster_level_t cluster_level) |
|
HB_EXTERN hb_buffer_cluster_level_t | hb_buffer_get_cluster_level (const hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer, hb_codepoint_t replacement) |
|
HB_EXTERN hb_codepoint_t | hb_buffer_get_replacement_codepoint (const hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_set_invisible_glyph (hb_buffer_t *buffer, hb_codepoint_t invisible) |
|
HB_EXTERN hb_codepoint_t | hb_buffer_get_invisible_glyph (const hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_set_not_found_glyph (hb_buffer_t *buffer, hb_codepoint_t not_found) |
|
HB_EXTERN hb_codepoint_t | hb_buffer_get_not_found_glyph (const hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_set_not_found_variation_selector_glyph (hb_buffer_t *buffer, hb_codepoint_t not_found_variation_selector) |
|
HB_EXTERN hb_codepoint_t | hb_buffer_get_not_found_variation_selector_glyph (const hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_set_random_state (hb_buffer_t *buffer, unsigned state) |
|
HB_EXTERN unsigned | hb_buffer_get_random_state (const hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_clear_contents (hb_buffer_t *buffer) |
|
HB_EXTERN hb_bool_t | hb_buffer_pre_allocate (hb_buffer_t *buffer, unsigned int size) |
|
HB_EXTERN hb_bool_t | hb_buffer_allocation_successful (hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_reverse (hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_reverse_range (hb_buffer_t *buffer, unsigned int start, unsigned int end) |
|
HB_EXTERN void | hb_buffer_reverse_clusters (hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_add (hb_buffer_t *buffer, hb_codepoint_t codepoint, unsigned int cluster) |
|
HB_EXTERN void | hb_buffer_add_utf8 (hb_buffer_t *buffer, const char *text, int text_length, unsigned int item_offset, int item_length) |
|
HB_EXTERN void | hb_buffer_add_utf16 (hb_buffer_t *buffer, const uint16_t *text, int text_length, unsigned int item_offset, int item_length) |
|
HB_EXTERN void | hb_buffer_add_utf32 (hb_buffer_t *buffer, const uint32_t *text, int text_length, unsigned int item_offset, int item_length) |
|
HB_EXTERN void | hb_buffer_add_latin1 (hb_buffer_t *buffer, const uint8_t *text, int text_length, unsigned int item_offset, int item_length) |
|
HB_EXTERN void | hb_buffer_add_codepoints (hb_buffer_t *buffer, const hb_codepoint_t *text, int text_length, unsigned int item_offset, int item_length) |
|
HB_EXTERN void | hb_buffer_append (hb_buffer_t *buffer, const hb_buffer_t *source, unsigned int start, unsigned int end) |
|
HB_EXTERN hb_bool_t | hb_buffer_set_length (hb_buffer_t *buffer, unsigned int length) |
|
HB_EXTERN unsigned int | hb_buffer_get_length (const hb_buffer_t *buffer) |
|
HB_EXTERN hb_glyph_info_t * | hb_buffer_get_glyph_infos (hb_buffer_t *buffer, unsigned int *length) |
|
HB_EXTERN hb_glyph_position_t * | hb_buffer_get_glyph_positions (hb_buffer_t *buffer, unsigned int *length) |
|
HB_EXTERN hb_bool_t | hb_buffer_has_positions (hb_buffer_t *buffer) |
|
HB_EXTERN void | hb_buffer_normalize_glyphs (hb_buffer_t *buffer) |
|
HB_EXTERN hb_buffer_serialize_format_t | hb_buffer_serialize_format_from_string (const char *str, int len) |
|
HB_EXTERN const char * | hb_buffer_serialize_format_to_string (hb_buffer_serialize_format_t format) |
|
HB_EXTERN const char ** | hb_buffer_serialize_list_formats (void) |
|
HB_EXTERN unsigned int | hb_buffer_serialize_glyphs (hb_buffer_t *buffer, unsigned int start, unsigned int end, char *buf, unsigned int buf_size, unsigned int *buf_consumed, hb_font_t *font, hb_buffer_serialize_format_t format, hb_buffer_serialize_flags_t flags) |
|
HB_EXTERN unsigned int | hb_buffer_serialize_unicode (hb_buffer_t *buffer, unsigned int start, unsigned int end, char *buf, unsigned int buf_size, unsigned int *buf_consumed, hb_buffer_serialize_format_t format, hb_buffer_serialize_flags_t flags) |
|
HB_EXTERN unsigned int | hb_buffer_serialize (hb_buffer_t *buffer, unsigned int start, unsigned int end, char *buf, unsigned int buf_size, unsigned int *buf_consumed, hb_font_t *font, hb_buffer_serialize_format_t format, hb_buffer_serialize_flags_t flags) |
|
HB_EXTERN hb_bool_t | hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, const char *buf, int buf_len, const char **end_ptr, hb_font_t *font, hb_buffer_serialize_format_t format) |
|
HB_EXTERN hb_bool_t | hb_buffer_deserialize_unicode (hb_buffer_t *buffer, const char *buf, int buf_len, const char **end_ptr, hb_buffer_serialize_format_t format) |
|
HB_EXTERN hb_buffer_diff_flags_t | hb_buffer_diff (hb_buffer_t *buffer, hb_buffer_t *reference, hb_codepoint_t dottedcircle_glyph, unsigned int position_fuzz) |
|
HB_EXTERN void | hb_buffer_set_message_func (hb_buffer_t *buffer, hb_buffer_message_func_t func, void *user_data, hb_destroy_func_t destroy) |
|
hb_buffer_cluster_level_t: @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES: Return cluster values grouped by graphemes into monotone order. @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS: Return cluster values grouped into monotone order. @HB_BUFFER_CLUSTER_LEVEL_CHARACTERS: Don't group cluster values. @HB_BUFFER_CLUSTER_LEVEL_DEFAULT: Default cluster level, equal to @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES.
Data type for holding HarfBuzz's clustering behavior options. The cluster level dictates one aspect of how HarfBuzz will treat non-base characters during shaping.
In @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES, non-base characters are merged into the cluster of the base character that precedes them.
In @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS, non-base characters are initially assigned their own cluster values, which are not merged into preceding base clusters. This allows HarfBuzz to perform additional operations like reorder sequences of adjacent marks.
@HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES is the default, because it maintains backward compatibility with older versions of HarfBuzz. New client programs that do not need to maintain such backward compatibility are recommended to use @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS instead of the default.
Since: 0.9.42
Enumerator |
---|
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES | |
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS | |
HB_BUFFER_CLUSTER_LEVEL_CHARACTERS | |
HB_BUFFER_CLUSTER_LEVEL_DEFAULT | |
Definition at line 445 of file hb-buffer.h.
445 {
hb_buffer_cluster_level_t
@ HB_BUFFER_CLUSTER_LEVEL_CHARACTERS
@ HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS
@ HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES
@ HB_BUFFER_CLUSTER_LEVEL_DEFAULT
hb_glyph_flags_t: @HB_GLYPH_FLAG_UNSAFE_TO_BREAK: 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 is safe to break the glyph-run at the beginning of this cluster, and the two sides will 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. @HB_GLYPH_FLAG_UNSAFE_TO_CONCAT: Indicates that if input text is changed on one side of the beginning of the cluster this glyph is part of, then the shaping results for the other side might change. Note that the absence of this flag will NOT by itself mean that it IS safe to concat text. Only two pieces of text both of which clear of this flag can be concatenated safely. This can be used to optimize paragraph layout, by avoiding re-shaping of each line after line-breaking, by limiting the reshaping to a small piece around the breaking position only, even if the breaking position carries the HB_GLYPH_FLAG_UNSAFE_TO_BREAK or when hyphenation or other text transformation happens at line-break position, in the following way:
- Iterate back from the line-break position until the first cluster start position that is NOT unsafe-to-concat, 2. shape the segment from there till the end of line, 3. check whether the resulting glyph-run also is clear of the unsafe-to-concat at its start-of-text position; if it is, just splice it into place and the line is shaped; If not, move on to a position further back that is clear of unsafe-to-concat and retry from there, and repeat. At the start of next line a similar algorithm can be implemented. That is: 1. Iterate forward from the line-break position until the first cluster start position that is NOT unsafe-to-concat, 2. shape the segment from beginning of the line to that position, 3. check whether the resulting glyph-run also is clear of the unsafe-to-concat at its end-of-text position; if it is, just splice it into place and the beginning is shaped; If not, move on to a position further forward that is clear of unsafe-to-concat and retry up to there, and repeat. A slight complication will arise in the implementation of the algorithm above, because while our buffer API has a way to return flags for position corresponding to start-of-text, there is currently no position corresponding to end-of-text. This limitation can be alleviated by shaping more text than needed and looking for unsafe-to-concat flag within text clusters. The HB_GLYPH_FLAG_UNSAFE_TO_BREAK flag will always imply this flag. To use this flag, you must enable the buffer flag @HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT during shaping, otherwise the buffer flag will not be reliably produced. Since: 4.0.0 @HB_GLYPH_FLAG_SAFE_TO_INSERT_TATWEEL: In scripts that use elongation (Arabic, Mongolian, Syriac, etc.), this flag signifies that it is safe to insert a U+0640 TATWEEL character before this cluster for elongation. This flag does not determine the script-specific elongation places, but only when it is safe to do the elongation without interrupting text shaping. Since: 5.1.0 @HB_GLYPH_FLAG_DEFINED: All the currently defined flags.
Flags for hb_glyph_info_t.
Since: 1.5.0
Enumerator |
---|
HB_GLYPH_FLAG_UNSAFE_TO_BREAK | |
HB_GLYPH_FLAG_UNSAFE_TO_CONCAT | |
HB_GLYPH_FLAG_SAFE_TO_INSERT_TATWEEL | |
HB_GLYPH_FLAG_DEFINED | |
Definition at line 160 of file hb-buffer.h.
160 {
164
@ HB_GLYPH_FLAG_SAFE_TO_INSERT_TATWEEL
@ HB_GLYPH_FLAG_UNSAFE_TO_CONCAT
@ HB_GLYPH_FLAG_UNSAFE_TO_BREAK