Lines Matching +full:is +full:- +full:buffer
2 * Copyright © 1998-2004 David Turner and Werner Lemberg
6 * This is part of HarfBuzz, a text shaping library.
8 * Permission is hereby granted, without written agreement and without
22 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
23 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
37 #include "hb-common.h"
38 #include "hb-unicode.h"
39 #include "hb-font.h"
57 * allow selecting more fine-grained cluster handling.
59 * The #hb_glyph_info_t is the structure that holds information about the
76 * @HB_GLYPH_FLAG_UNSAFE_TO_BREAK: Indicates that if input text is broken at the
77 * beginning of the cluster this glyph is part of,
78 * then both sides need to be re-shaped, as the
81 * flag is not present, then it is safe to break
82 * the glyph-run at the beginning of this
88 * layout, by avoiding re-shaping of each line
89 * after line-breaking.
90 * @HB_GLYPH_FLAG_UNSAFE_TO_CONCAT: Indicates that if input text is changed on one
92 * is part of, then the shaping results for the
95 * itself mean that it IS safe to concat text.
99 * layout, by avoiding re-shaping of each line
100 * after line-breaking, by limiting the
106 * happens at line-break position, in the following
108 * 1. Iterate back from the line-break position
109 * until the first cluster start position that is
110 * NOT unsafe-to-concat, 2. shape the segment from
112 * resulting glyph-run also is clear of the
113 * unsafe-to-concat at its start-of-text position;
114 * if it is, just splice it into place and the line
115 * is shaped; If not, move on to a position further
116 * back that is clear of unsafe-to-concat and retry
119 * be implemented. That is: 1. Iterate forward from
120 * the line-break position until the first cluster
121 * start position that is NOT unsafe-to-concat, 2.
124 * glyph-run also is clear of the unsafe-to-concat
125 * at its end-of-text position; if it is, just splice
126 * it into place and the beginning is shaped; If not,
127 * move on to a position further forward that is clear
128 * of unsafe-to-concat and retry up to there, and repeat.
131 * because while our buffer API has a way to
133 * start-of-text, there is currently no position
134 * corresponding to end-of-text. This limitation
136 * and looking for unsafe-to-concat flag within text
140 * To use this flag, you must enable the buffer flag
142 * shaping, otherwise the buffer flag will not be
147 that it is safe to insert a U+0640 TATWEEL
150 script-specific elongation places, but only
151 when it is safe to do the elongation without
172 ((hb_glyph_flags_t) ((unsigned int) (info)->mask & HB_GLYPH_FLAG_DEFINED))
181 * @x_offset: how much the glyph moves on the X-axis before drawing it, this
183 * @y_offset: how much the glyph moves on the Y-axis before drawing it, this
186 * The #hb_glyph_position_t is the structure that holds the positions of the
203 * @direction: the #hb_direction_t of the buffer, see hb_buffer_set_direction().
204 * @script: the #hb_script_t of the buffer, see hb_buffer_set_script().
205 * @language: the #hb_language_t of the buffer, see hb_buffer_set_language().
259 hb_buffer_reset (hb_buffer_t *buffer);
266 hb_buffer_reference (hb_buffer_t *buffer);
269 hb_buffer_destroy (hb_buffer_t *buffer);
272 hb_buffer_set_user_data (hb_buffer_t *buffer,
279 hb_buffer_get_user_data (const hb_buffer_t *buffer,
285 * @HB_BUFFER_CONTENT_TYPE_INVALID: Initial value for new buffer.
286 * @HB_BUFFER_CONTENT_TYPE_UNICODE: The buffer contains input characters (before shaping).
287 * @HB_BUFFER_CONTENT_TYPE_GLYPHS: The buffer contains output glyphs (after shaping).
298 hb_buffer_set_content_type (hb_buffer_t *buffer,
302 hb_buffer_get_content_type (const hb_buffer_t *buffer);
306 hb_buffer_set_unicode_funcs (hb_buffer_t *buffer,
310 hb_buffer_get_unicode_funcs (const hb_buffer_t *buffer);
313 hb_buffer_set_direction (hb_buffer_t *buffer,
317 hb_buffer_get_direction (const hb_buffer_t *buffer);
320 hb_buffer_set_script (hb_buffer_t *buffer,
324 hb_buffer_get_script (const hb_buffer_t *buffer);
327 hb_buffer_set_language (hb_buffer_t *buffer,
332 hb_buffer_get_language (const hb_buffer_t *buffer);
335 hb_buffer_set_segment_properties (hb_buffer_t *buffer,
339 hb_buffer_get_segment_properties (const hb_buffer_t *buffer,
343 hb_buffer_guess_segment_properties (hb_buffer_t *buffer);
348 * @HB_BUFFER_FLAG_DEFAULT: the default buffer flag.
350 * of text paragraph can be applied to this buffer. Should usually
351 * be set, unless you are passing to the buffer only part
354 * paragraph can be applied to this buffer, similar to
377 * of the shaping operation on the buffer. If the verification
378 * fails, then either a buffer message is sent, if a message
379 * handler is installed on the buffer, or a message is written
384 * glyph-flag should be produced by the shaper. By default
388 * glyph-flag should be produced by the shaper. By default
398 HB_BUFFER_FLAG_BOT = 0x00000001u, /* Beginning-of-text */
399 HB_BUFFER_FLAG_EOT = 0x00000002u, /* End-of-text */
411 hb_buffer_set_flags (hb_buffer_t *buffer,
415 hb_buffer_get_flags (const hb_buffer_t *buffer);
427 * dictates one aspect of how HarfBuzz will treat non-base characters
430 * In @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES, non-base
433 * In @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS, non-base characters are initially
438 * @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES is the default, because it maintains
453 hb_buffer_set_cluster_level (hb_buffer_t *buffer,
457 hb_buffer_get_cluster_level (const hb_buffer_t *buffer);
470 hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer,
474 hb_buffer_get_replacement_codepoint (const hb_buffer_t *buffer);
477 hb_buffer_set_invisible_glyph (hb_buffer_t *buffer,
481 hb_buffer_get_invisible_glyph (const hb_buffer_t *buffer);
484 hb_buffer_set_not_found_glyph (hb_buffer_t *buffer,
488 hb_buffer_get_not_found_glyph (const hb_buffer_t *buffer);
496 hb_buffer_clear_contents (hb_buffer_t *buffer);
499 hb_buffer_pre_allocate (hb_buffer_t *buffer,
504 hb_buffer_allocation_successful (hb_buffer_t *buffer);
507 hb_buffer_reverse (hb_buffer_t *buffer);
510 hb_buffer_reverse_range (hb_buffer_t *buffer,
514 hb_buffer_reverse_clusters (hb_buffer_t *buffer);
517 /* Filling the buffer in */
520 hb_buffer_add (hb_buffer_t *buffer,
525 hb_buffer_add_utf8 (hb_buffer_t *buffer,
532 hb_buffer_add_utf16 (hb_buffer_t *buffer,
539 hb_buffer_add_utf32 (hb_buffer_t *buffer,
546 hb_buffer_add_latin1 (hb_buffer_t *buffer,
553 hb_buffer_add_codepoints (hb_buffer_t *buffer,
560 hb_buffer_append (hb_buffer_t *buffer,
566 hb_buffer_set_length (hb_buffer_t *buffer,
570 hb_buffer_get_length (const hb_buffer_t *buffer);
572 /* Getting glyphs out of the buffer */
575 hb_buffer_get_glyph_infos (hb_buffer_t *buffer,
579 hb_buffer_get_glyph_positions (hb_buffer_t *buffer,
583 hb_buffer_has_positions (hb_buffer_t *buffer);
587 hb_buffer_normalize_glyphs (hb_buffer_t *buffer);
624 * @HB_BUFFER_SERIALIZE_FORMAT_TEXT: a human-readable, plain text format.
625 * @HB_BUFFER_SERIALIZE_FORMAT_JSON: a machine-readable JSON format.
628 * The buffer serialization and de-serialization format used in
649 hb_buffer_serialize_glyphs (hb_buffer_t *buffer,
660 hb_buffer_serialize_unicode (hb_buffer_t *buffer,
670 hb_buffer_serialize (hb_buffer_t *buffer,
681 hb_buffer_deserialize_glyphs (hb_buffer_t *buffer,
689 hb_buffer_deserialize_unicode (hb_buffer_t *buffer,
707 * @HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT: `.notdef` glyph is present in the
708 * reference buffer.
709 * @HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT: dotted circle glyph is present
710 * in the reference buffer.
718 * Buffer with different #hb_buffer_content_type_t cannot be meaningfully
721 * For buffers with differing length, the per-glyph comparison is not
722 * attempted, though we do still scan reference buffer for dotted circle and
725 * If the buffers have the same length, we compare them glyph-by-glyph and
737 /* For buffers with differing length, the per-glyph comparison is not
748 /* If the buffers have the same length, we compare them glyph-by-glyph
759 hb_buffer_diff (hb_buffer_t *buffer,
771 * @buffer: An #hb_buffer_t to work upon
772 * @font: The #hb_font_t the @buffer is shaped with
773 * @message: `NULL`-terminated message passed to the function
777 * #hb_buffer_t it was set on, the #hb_font_t the buffer is shaped with and a
786 typedef hb_bool_t (*hb_buffer_message_func_t) (hb_buffer_t *buffer,
792 hb_buffer_set_message_func (hb_buffer_t *buffer,