29 #ifndef HB_NO_OT_SHAPE
83 return (
bool)
c->unicode->decompose (ab,
a,
b);
92 return (
bool)
c->unicode->compose (
a,
b, ab);
105 buffer->cur().glyph_index() = glyph;
107 _hb_glyph_info_set_unicode_props (&
buffer->prev(),
buffer);
113 buffer->cur().glyph_index() = glyph;
124 static inline unsigned int
131 if (!
c->decompose (
c, ab, &
a, &
b) ||
132 (
b && !
font->get_nominal_glyph (
b, &b_glyph)))
135 bool has_a = (bool)
font->get_nominal_glyph (
a, &a_glyph);
136 if (shortest && has_a) {
138 output_char (
buffer,
a, a_glyph);
140 output_char (
buffer,
b, b_glyph);
147 if ((
ret = decompose (
c, shortest,
a))) {
149 output_char (
buffer,
b, b_glyph);
156 output_char (
buffer,
a, a_glyph);
158 output_char (
buffer,
b, b_glyph);
174 if (shortest &&
c->font->get_nominal_glyph (
u, &glyph,
c->not_found))
176 next_char (
buffer, glyph);
180 if (decompose (
c, shortest,
u))
186 if (!shortest &&
c->font->get_nominal_glyph (
u, &glyph,
c->not_found))
188 next_char (
buffer, glyph);
192 if (_hb_glyph_info_is_unicode_space (&
buffer->cur()))
197 (
c->font->get_nominal_glyph (0x0020, &space_glyph) || (space_glyph =
buffer->invisible)))
199 _hb_glyph_info_set_unicode_space_fallback_type (&
buffer->cur(), space_type);
200 next_char (
buffer, space_glyph);
211 if (
c->font->get_nominal_glyph (0x2010u, &other_glyph))
213 next_char (
buffer, other_glyph);
218 next_char (
buffer, glyph);
231 if (
font->get_variation_glyph (
buffer->cur().codepoint,
buffer->cur(+1).codepoint, &
buffer->cur().glyph_index()))
234 (
void)
buffer->replace_glyphs (2, 1, &unicode);
270 for (
unsigned int i =
buffer->idx; i < end && buffer->successful;
i++)
272 handle_variation_selector_cluster (
c,
end, short_circuit);
277 decompose_current_character (
c, short_circuit);
284 unsigned int a = _hb_glyph_info_get_modified_combining_class (pa);
285 unsigned int b = _hb_glyph_info_get_modified_combining_class (
pb);
287 return a <
b ? -1 :
a ==
b ? 0 : +1;
298 _hb_buffer_assert_unicode_vars (
buffer);
322 bool might_short_circuit = always_short_circuit ||
336 bool all_simple =
true;
352 if (might_short_circuit)
357 &
buffer->cur().glyph_index(),
358 sizeof (
buffer->info[0]));
362 decompose_current_character (&
c, might_short_circuit);
371 if (!_hb_glyph_info_is_unicode_mark(&
buffer->info[
end]))
375 decompose_multi_char_cluster (&
c,
end, always_short_circuit);
384 if (!all_simple &&
buffer->message(
font,
"start reorder"))
387 for (
unsigned int i = 0;
i <
count;
i++)
389 if (_hb_glyph_info_get_modified_combining_class (&
buffer->info[
i]) == 0)
394 if (_hb_glyph_info_get_modified_combining_class (&
buffer->info[
end]) == 0)
403 buffer->sort (
i,
end, compare_combining_class);
418 for (
unsigned int i = 1;
i + 1 <
buffer->len;
i++)
419 if (
buffer->info[
i].codepoint == 0x034Fu &&
422 _hb_glyph_info_unhide (&
buffer->info[
i]);
439 unsigned int starter = 0;
448 _hb_glyph_info_is_unicode_mark(&
buffer->cur()))
452 (starter ==
buffer->out_len - 1 ||
456 buffer->out_info[starter].codepoint,
460 font->get_nominal_glyph (composed, &glyph))
467 buffer->out_info[starter].codepoint = composed;
468 buffer->out_info[starter].glyph_index() = glyph;
469 _hb_glyph_info_set_unicode_props (&
buffer->out_info[starter],
buffer);
479 starter =
buffer->out_len - 1;
small capitals from c petite p scientific f u
small capitals from c petite p scientific i
[1]
@ HB_BUFFER_SCRATCH_FLAG_HAS_SPACE_FALLBACK
@ HB_BUFFER_SCRATCH_FLAG_HAS_CGJ
void const void *obj HB_UNUSED
#define HB_OT_SHAPE_COMPLEX_MAX_COMBINING_MARKS
void _hb_ot_shape_normalize(const hb_ot_shape_plan_t *plan, hb_buffer_t *buffer, hb_font_t *font)
hb_ot_shape_normalization_mode_t
@ HB_OT_SHAPE_NORMALIZATION_MODE_AUTO
@ HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS
@ HB_OT_SHAPE_NORMALIZATION_MODE_NONE
@ HB_OT_SHAPE_NORMALIZATION_MODE_DECOMPOSED
@ HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT
backing_store_ptr info
[4]
QT_BEGIN_NAMESPACE bool done
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLenum GLsizei count
hb_ot_shape_normalization_mode_t normalization_preference
bool(* decompose)(const hb_ot_shape_normalize_context_t *c, hb_codepoint_t ab, hb_codepoint_t *a, hb_codepoint_t *b)
void(* reorder_marks)(const hb_ot_shape_plan_t *plan, hb_buffer_t *buffer, unsigned int start, unsigned int end)
bool(* compose)(const hb_ot_shape_normalize_context_t *c, hb_codepoint_t a, hb_codepoint_t b, hb_codepoint_t *ab)
const struct hb_ot_complex_shaper_t * shaper