QtBase  v6.3.1
hb-ot-shape-fallback.cc
Go to the documentation of this file.
1 /*
2  * Copyright © 2011,2012 Google, Inc.
3  *
4  * This is part of HarfBuzz, a text shaping library.
5  *
6  * Permission is hereby granted, without written agreement and without
7  * license or royalty fees, to use, copy, modify, and distribute this
8  * software and its documentation for any purpose, provided that the
9  * above copyright notice and the following two paragraphs appear in
10  * all copies of this software.
11  *
12  * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14  * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15  * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
16  * DAMAGE.
17  *
18  * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21  * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
23  *
24  * Google Author(s): Behdad Esfahbod
25  */
26 
27 #include "hb.hh"
28 
29 #ifndef HB_NO_OT_SHAPE
30 
31 #include "hb-ot-shape-fallback.hh"
32 #include "hb-kern.hh"
33 
34 static unsigned int
35 recategorize_combining_class (hb_codepoint_t u,
36  unsigned int klass)
37 {
38  if (klass >= 200)
39  return klass;
40 
41  /* Thai / Lao need some per-character work. */
42  if ((u & ~0xFF) == 0x0E00u)
43  {
44  if (unlikely (klass == 0))
45  {
46  switch (u)
47  {
48  case 0x0E31u:
49  case 0x0E34u:
50  case 0x0E35u:
51  case 0x0E36u:
52  case 0x0E37u:
53  case 0x0E47u:
54  case 0x0E4Cu:
55  case 0x0E4Du:
56  case 0x0E4Eu:
58  break;
59 
60  case 0x0EB1u:
61  case 0x0EB4u:
62  case 0x0EB5u:
63  case 0x0EB6u:
64  case 0x0EB7u:
65  case 0x0EBBu:
66  case 0x0ECCu:
67  case 0x0ECDu:
69  break;
70 
71  case 0x0EBCu:
73  break;
74  }
75  } else {
76  /* Thai virama is below-right */
77  if (u == 0x0E3Au)
79  }
80  }
81 
82  switch (klass)
83  {
84 
85  /* Hebrew */
86 
87  case HB_MODIFIED_COMBINING_CLASS_CCC10: /* sheva */
88  case HB_MODIFIED_COMBINING_CLASS_CCC11: /* hataf segol */
89  case HB_MODIFIED_COMBINING_CLASS_CCC12: /* hataf patah */
90  case HB_MODIFIED_COMBINING_CLASS_CCC13: /* hataf qamats */
91  case HB_MODIFIED_COMBINING_CLASS_CCC14: /* hiriq */
92  case HB_MODIFIED_COMBINING_CLASS_CCC15: /* tsere */
93  case HB_MODIFIED_COMBINING_CLASS_CCC16: /* segol */
94  case HB_MODIFIED_COMBINING_CLASS_CCC17: /* patah */
95  case HB_MODIFIED_COMBINING_CLASS_CCC18: /* qamats & qamats qatan */
96  case HB_MODIFIED_COMBINING_CLASS_CCC20: /* qubuts */
97  case HB_MODIFIED_COMBINING_CLASS_CCC22: /* meteg */
99 
100  case HB_MODIFIED_COMBINING_CLASS_CCC23: /* rafe */
102 
103  case HB_MODIFIED_COMBINING_CLASS_CCC24: /* shin dot */
105 
106  case HB_MODIFIED_COMBINING_CLASS_CCC25: /* sin dot */
107  case HB_MODIFIED_COMBINING_CLASS_CCC19: /* holam & holam haser for vav */
109 
110  case HB_MODIFIED_COMBINING_CLASS_CCC26: /* point varika */
112 
113  case HB_MODIFIED_COMBINING_CLASS_CCC21: /* dagesh */
114  break;
115 
116 
117  /* Arabic and Syriac */
118 
119  case HB_MODIFIED_COMBINING_CLASS_CCC27: /* fathatan */
120  case HB_MODIFIED_COMBINING_CLASS_CCC28: /* dammatan */
121  case HB_MODIFIED_COMBINING_CLASS_CCC30: /* fatha */
122  case HB_MODIFIED_COMBINING_CLASS_CCC31: /* damma */
123  case HB_MODIFIED_COMBINING_CLASS_CCC33: /* shadda */
124  case HB_MODIFIED_COMBINING_CLASS_CCC34: /* sukun */
125  case HB_MODIFIED_COMBINING_CLASS_CCC35: /* superscript alef */
126  case HB_MODIFIED_COMBINING_CLASS_CCC36: /* superscript alaph */
128 
129  case HB_MODIFIED_COMBINING_CLASS_CCC29: /* kasratan */
130  case HB_MODIFIED_COMBINING_CLASS_CCC32: /* kasra */
132 
133 
134  /* Thai */
135 
136  case HB_MODIFIED_COMBINING_CLASS_CCC103: /* sara u / sara uu */
138 
139  case HB_MODIFIED_COMBINING_CLASS_CCC107: /* mai */
141 
142 
143  /* Lao */
144 
145  case HB_MODIFIED_COMBINING_CLASS_CCC118: /* sign u / sign uu */
147 
148  case HB_MODIFIED_COMBINING_CLASS_CCC122: /* mai */
150 
151 
152  /* Tibetan */
153 
154  case HB_MODIFIED_COMBINING_CLASS_CCC129: /* sign aa */
156 
157  case HB_MODIFIED_COMBINING_CLASS_CCC130: /* sign i*/
159 
160  case HB_MODIFIED_COMBINING_CLASS_CCC132: /* sign u */
162 
163  }
164 
165  return klass;
166 }
167 
168 void
172 {
173 #ifdef HB_NO_OT_SHAPE_FALLBACK
174  return;
175 #endif
176 
177  unsigned int count = buffer->len;
178  hb_glyph_info_t *info = buffer->info;
179  for (unsigned int i = 0; i < count; i++)
180  if (_hb_glyph_info_get_general_category (&info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) {
181  unsigned int combining_class = _hb_glyph_info_get_modified_combining_class (&info[i]);
182  combining_class = recategorize_combining_class (info[i].codepoint, combining_class);
183  _hb_glyph_info_set_modified_combining_class (&info[i], combining_class);
184  }
185 }
186 
187 
188 static void
189 zero_mark_advances (hb_buffer_t *buffer,
190  unsigned int start,
191  unsigned int end,
192  bool adjust_offsets_when_zeroing)
193 {
194  hb_glyph_info_t *info = buffer->info;
195  for (unsigned int i = start; i < end; i++)
196  if (_hb_glyph_info_get_general_category (&info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
197  {
198  if (adjust_offsets_when_zeroing)
199  {
200  buffer->pos[i].x_offset -= buffer->pos[i].x_advance;
201  buffer->pos[i].y_offset -= buffer->pos[i].y_advance;
202  }
203  buffer->pos[i].x_advance = 0;
204  buffer->pos[i].y_advance = 0;
205  }
206 }
207 
208 static inline void
209 position_mark (const hb_ot_shape_plan_t *plan HB_UNUSED,
210  hb_font_t *font,
212  hb_glyph_extents_t &base_extents,
213  unsigned int i,
214  unsigned int combining_class)
215 {
216  hb_glyph_extents_t mark_extents;
217  if (!font->get_glyph_extents (buffer->info[i].codepoint, &mark_extents))
218  return;
219 
220  hb_position_t y_gap = font->y_scale / 16;
221 
222  hb_glyph_position_t &pos = buffer->pos[i];
223  pos.x_offset = pos.y_offset = 0;
224 
225 
226  /* We don't position LEFT and RIGHT marks. */
227 
228  /* X positioning */
229  switch (combining_class)
230  {
233  if (buffer->props.direction == HB_DIRECTION_LTR) {
234  pos.x_offset += base_extents.x_bearing + base_extents.width - mark_extents.width / 2 - mark_extents.x_bearing;
235  break;
236  } else if (buffer->props.direction == HB_DIRECTION_RTL) {
237  pos.x_offset += base_extents.x_bearing - mark_extents.width / 2 - mark_extents.x_bearing;
238  break;
239  }
241 
242  default:
247  /* Center align. */
248  pos.x_offset += base_extents.x_bearing + (base_extents.width - mark_extents.width) / 2 - mark_extents.x_bearing;
249  break;
250 
254  /* Left align. */
255  pos.x_offset += base_extents.x_bearing - mark_extents.x_bearing;
256  break;
257 
261  /* Right align. */
262  pos.x_offset += base_extents.x_bearing + base_extents.width - mark_extents.width - mark_extents.x_bearing;
263  break;
264  }
265 
266  /* Y positioning */
267  switch (combining_class)
268  {
273  /* Add gap, fall-through. */
274  base_extents.height -= y_gap;
276 
279  pos.y_offset = base_extents.y_bearing + base_extents.height - mark_extents.y_bearing;
280  /* Never shift up "below" marks. */
281  if ((y_gap > 0) == (pos.y_offset > 0))
282  {
283  base_extents.height -= pos.y_offset;
284  pos.y_offset = 0;
285  }
286  base_extents.height += mark_extents.height;
287  break;
288 
293  /* Add gap, fall-through. */
294  base_extents.y_bearing += y_gap;
295  base_extents.height -= y_gap;
297 
300  pos.y_offset = base_extents.y_bearing - (mark_extents.y_bearing + mark_extents.height);
301  /* Don't shift down "above" marks too much. */
302  if ((y_gap > 0) != (pos.y_offset > 0))
303  {
304  int correction = -pos.y_offset / 2;
305  base_extents.y_bearing += correction;
306  base_extents.height -= correction;
307  pos.y_offset += correction;
308  }
309  base_extents.y_bearing -= mark_extents.height;
310  base_extents.height += mark_extents.height;
311  break;
312  }
313 }
314 
315 static inline void
316 position_around_base (const hb_ot_shape_plan_t *plan,
317  hb_font_t *font,
319  unsigned int base,
320  unsigned int end,
321  bool adjust_offsets_when_zeroing)
322 {
324 
325  buffer->unsafe_to_break (base, end);
326 
327  hb_glyph_extents_t base_extents;
328  if (!font->get_glyph_extents (buffer->info[base].codepoint,
329  &base_extents))
330  {
331  /* If extents don't work, zero marks and go home. */
332  zero_mark_advances (buffer, base + 1, end, adjust_offsets_when_zeroing);
333  return;
334  }
335  base_extents.y_bearing += buffer->pos[base].y_offset;
336  /* Use horizontal advance for horizontal positioning.
337  * Generally a better idea. Also works for zero-ink glyphs. See:
338  * https://github.com/harfbuzz/harfbuzz/issues/1532 */
339  base_extents.x_bearing = 0;
340  base_extents.width = font->get_glyph_h_advance (buffer->info[base].codepoint);
341 
342  unsigned int lig_id = _hb_glyph_info_get_lig_id (&buffer->info[base]);
343  /* Use integer for num_lig_components such that it doesn't convert to unsigned
344  * when we divide or multiply by it. */
345  int num_lig_components = _hb_glyph_info_get_lig_num_comps (&buffer->info[base]);
346 
347  hb_position_t x_offset = 0, y_offset = 0;
348  if (HB_DIRECTION_IS_FORWARD (buffer->props.direction)) {
349  x_offset -= buffer->pos[base].x_advance;
350  y_offset -= buffer->pos[base].y_advance;
351  }
352 
353  hb_glyph_extents_t component_extents = base_extents;
354  int last_lig_component = -1;
355  unsigned int last_combining_class = 255;
356  hb_glyph_extents_t cluster_extents = base_extents; /* Initialization is just to shut gcc up. */
357  hb_glyph_info_t *info = buffer->info;
358  for (unsigned int i = base + 1; i < end; i++)
359  if (_hb_glyph_info_get_modified_combining_class (&info[i]))
360  {
361  if (num_lig_components > 1) {
362  unsigned int this_lig_id = _hb_glyph_info_get_lig_id (&info[i]);
363  int this_lig_component = _hb_glyph_info_get_lig_comp (&info[i]) - 1;
364  /* Conditions for attaching to the last component. */
365  if (!lig_id || lig_id != this_lig_id || this_lig_component >= num_lig_components)
366  this_lig_component = num_lig_components - 1;
367  if (last_lig_component != this_lig_component)
368  {
369  last_lig_component = this_lig_component;
370  last_combining_class = 255;
371  component_extents = base_extents;
372  if (unlikely (horiz_dir == HB_DIRECTION_INVALID)) {
374  horiz_dir = plan->props.direction;
375  else
376  horiz_dir = hb_script_get_horizontal_direction (plan->props.script);
377  }
378  if (horiz_dir == HB_DIRECTION_LTR)
379  component_extents.x_bearing += (this_lig_component * component_extents.width) / num_lig_components;
380  else
381  component_extents.x_bearing += ((num_lig_components - 1 - this_lig_component) * component_extents.width) / num_lig_components;
382  component_extents.width /= num_lig_components;
383  }
384  }
385 
386  unsigned int this_combining_class = _hb_glyph_info_get_modified_combining_class (&info[i]);
387  if (last_combining_class != this_combining_class)
388  {
389  last_combining_class = this_combining_class;
390  cluster_extents = component_extents;
391  }
392 
393  position_mark (plan, font, buffer, cluster_extents, i, this_combining_class);
394 
395  buffer->pos[i].x_advance = 0;
396  buffer->pos[i].y_advance = 0;
397  buffer->pos[i].x_offset += x_offset;
398  buffer->pos[i].y_offset += y_offset;
399 
400  } else {
401  if (HB_DIRECTION_IS_FORWARD (buffer->props.direction)) {
402  x_offset -= buffer->pos[i].x_advance;
403  y_offset -= buffer->pos[i].y_advance;
404  } else {
405  x_offset += buffer->pos[i].x_advance;
406  y_offset += buffer->pos[i].y_advance;
407  }
408  }
409 }
410 
411 static inline void
412 position_cluster (const hb_ot_shape_plan_t *plan,
413  hb_font_t *font,
415  unsigned int start,
416  unsigned int end,
417  bool adjust_offsets_when_zeroing)
418 {
419  if (end - start < 2)
420  return;
421 
422  /* Find the base glyph */
423  hb_glyph_info_t *info = buffer->info;
424  for (unsigned int i = start; i < end; i++)
425  if (!_hb_glyph_info_is_unicode_mark (&info[i]))
426  {
427  /* Find mark glyphs */
428  unsigned int j;
429  for (j = i + 1; j < end; j++)
430  if (!_hb_glyph_info_is_unicode_mark (&info[j]))
431  break;
432 
433  position_around_base (plan, font, buffer, i, j, adjust_offsets_when_zeroing);
434 
435  i = j - 1;
436  }
437 }
438 
439 void
441  hb_font_t *font,
443  bool adjust_offsets_when_zeroing)
444 {
445 #ifdef HB_NO_OT_SHAPE_FALLBACK
446  return;
447 #endif
448 
449  if (!buffer->message (font, "start fallback mark"))
450  return;
451 
452  _hb_buffer_assert_gsubgpos_vars (buffer);
453 
454  unsigned int start = 0;
455  unsigned int count = buffer->len;
456  hb_glyph_info_t *info = buffer->info;
457  for (unsigned int i = 1; i < count; i++)
458  if (likely (!_hb_glyph_info_is_unicode_mark (&info[i]))) {
459  position_cluster (plan, font, buffer, start, i, adjust_offsets_when_zeroing);
460  start = i;
461  }
462  position_cluster (plan, font, buffer, start, count, adjust_offsets_when_zeroing);
463 
464  (void) buffer->message (font, "end fallback mark");
465 }
466 
467 
468 #ifndef HB_DISABLE_DEPRECATED
470 {
472  hb_buffer_t *buffer) :
473  font (font_), direction (buffer->props.direction) {}
474 
476  {
477  hb_position_t kern = 0;
479  direction,
480  &kern, &kern);
481  return kern;
482  }
483 
486 };
487 #endif
488 
489 /* Performs font-assisted kerning. */
490 void
492  hb_font_t *font,
494 {
495 #ifdef HB_NO_OT_SHAPE_FALLBACK
496  return;
497 #endif
498 
499 #ifndef HB_DISABLE_DEPRECATED
500  if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction) ?
501  !font->has_glyph_h_kerning_func () :
502  !font->has_glyph_v_kerning_func ())
503  return;
504 
505  if (!buffer->message (font, "start fallback kern"))
506  return;
507 
508  bool reverse = HB_DIRECTION_IS_BACKWARD (buffer->props.direction);
509 
510  if (reverse)
511  buffer->reverse ();
512 
515  machine.kern (font, buffer, plan->kern_mask, false);
516 
517  if (reverse)
518  buffer->reverse ();
519 
520  (void) buffer->message (font, "end fallback kern");
521 #endif
522 }
523 
524 
525 /* Adjusts width of various spaces. */
526 void
528  hb_font_t *font,
530 {
531  hb_glyph_info_t *info = buffer->info;
533  bool horizontal = HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction);
534  unsigned int count = buffer->len;
535  for (unsigned int i = 0; i < count; i++)
536  if (_hb_glyph_info_is_unicode_space (&info[i]) && !_hb_glyph_info_ligated (&info[i]))
537  {
538  /* If font had no ASCII space and we used the invisible glyph, give it a 1/4 EM default advance. */
539  if (buffer->invisible && info[i].codepoint == buffer->invisible)
540  {
541  if (horizontal)
542  pos[i].x_advance = +font->x_scale / 4;
543  else
544  pos[i].y_advance = -font->y_scale / 4;
545  }
546 
547  hb_unicode_funcs_t::space_t space_type = _hb_glyph_info_get_unicode_space_fallback_type (&info[i]);
548  hb_codepoint_t glyph;
549  typedef hb_unicode_funcs_t t;
550  switch (space_type)
551  {
552  case t::NOT_SPACE: /* Shouldn't happen. */
553  case t::SPACE:
554  break;
555 
556  case t::SPACE_EM:
557  case t::SPACE_EM_2:
558  case t::SPACE_EM_3:
559  case t::SPACE_EM_4:
560  case t::SPACE_EM_5:
561  case t::SPACE_EM_6:
562  case t::SPACE_EM_16:
563  if (horizontal)
564  pos[i].x_advance = +(font->x_scale + ((int) space_type)/2) / (int) space_type;
565  else
566  pos[i].y_advance = -(font->y_scale + ((int) space_type)/2) / (int) space_type;
567  break;
568 
569  case t::SPACE_4_EM_18:
570  if (horizontal)
571  pos[i].x_advance = (int64_t) +font->x_scale * 4 / 18;
572  else
573  pos[i].y_advance = (int64_t) -font->y_scale * 4 / 18;
574  break;
575 
576  case t::SPACE_FIGURE:
577  for (char u = '0'; u <= '9'; u++)
578  if (font->get_nominal_glyph (u, &glyph))
579  {
580  if (horizontal)
581  pos[i].x_advance = font->get_glyph_h_advance (glyph);
582  else
583  pos[i].y_advance = font->get_glyph_v_advance (glyph);
584  break;
585  }
586  break;
587 
588  case t::SPACE_PUNCTUATION:
589  if (font->get_nominal_glyph ('.', &glyph) ||
590  font->get_nominal_glyph (',', &glyph))
591  {
592  if (horizontal)
593  pos[i].x_advance = font->get_glyph_h_advance (glyph);
594  else
595  pos[i].y_advance = font->get_glyph_v_advance (glyph);
596  }
597  break;
598 
599  case t::SPACE_NARROW:
600  /* Half-space?
601  * Unicode doc https://unicode.org/charts/PDF/U2000.pdf says ~1/4 or 1/5 of EM.
602  * However, in my testing, many fonts have their regular space being about that
603  * size. To me, a percentage of the space width makes more sense. Half is as
604  * good as any. */
605  if (horizontal)
606  pos[i].x_advance /= 2;
607  else
608  pos[i].y_advance /= 2;
609  break;
610  }
611  }
612 }
613 
614 
615 #endif
small capitals from c petite p scientific f u
Definition: afcover.h:88
small capitals from c petite p scientific i
[1]
Definition: afcover.h:80
Definition: base.h:37
hb_direction_t hb_script_get_horizontal_direction(hb_script_t script)
Definition: hb-common.cc:551
void const void *obj HB_UNUSED
Definition: hb-debug.hh:180
void _hb_ot_shape_fallback_kern(const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer)
void _hb_ot_shape_fallback_spaces(const hb_ot_shape_plan_t *plan HB_UNUSED, hb_font_t *font, hb_buffer_t *buffer)
void _hb_ot_shape_fallback_mark_position_recategorize_marks(const hb_ot_shape_plan_t *plan HB_UNUSED, hb_font_t *font HB_UNUSED, hb_buffer_t *buffer)
void _hb_ot_shape_fallback_mark_position(const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer, bool adjust_offsets_when_zeroing)
#define HB_MODIFIED_COMBINING_CLASS_CCC16
Definition: hb-unicode.hh:291
#define HB_MODIFIED_COMBINING_CLASS_CCC24
Definition: hb-unicode.hh:299
#define HB_MODIFIED_COMBINING_CLASS_CCC122
Definition: hb-unicode.hh:344
#define HB_MODIFIED_COMBINING_CLASS_CCC21
Definition: hb-unicode.hh:296
#define HB_MODIFIED_COMBINING_CLASS_CCC31
Definition: hb-unicode.hh:314
#define HB_MODIFIED_COMBINING_CLASS_CCC23
Definition: hb-unicode.hh:298
#define HB_MODIFIED_COMBINING_CLASS_CCC32
Definition: hb-unicode.hh:315
#define HB_MODIFIED_COMBINING_CLASS_CCC17
Definition: hb-unicode.hh:292
#define HB_MODIFIED_COMBINING_CLASS_CCC130
Definition: hb-unicode.hh:352
#define HB_MODIFIED_COMBINING_CLASS_CCC30
Definition: hb-unicode.hh:313
#define HB_MODIFIED_COMBINING_CLASS_CCC33
Definition: hb-unicode.hh:316
#define HB_MODIFIED_COMBINING_CLASS_CCC103
Definition: hb-unicode.hh:339
#define HB_MODIFIED_COMBINING_CLASS_CCC129
Definition: hb-unicode.hh:351
#define HB_MODIFIED_COMBINING_CLASS_CCC13
Definition: hb-unicode.hh:288
#define HB_MODIFIED_COMBINING_CLASS_CCC27
Definition: hb-unicode.hh:310
#define HB_MODIFIED_COMBINING_CLASS_CCC19
Definition: hb-unicode.hh:294
#define HB_MODIFIED_COMBINING_CLASS_CCC11
Definition: hb-unicode.hh:286
#define HB_MODIFIED_COMBINING_CLASS_CCC26
Definition: hb-unicode.hh:301
#define HB_MODIFIED_COMBINING_CLASS_CCC29
Definition: hb-unicode.hh:312
#define HB_MODIFIED_COMBINING_CLASS_CCC20
Definition: hb-unicode.hh:295
#define HB_MODIFIED_COMBINING_CLASS_CCC25
Definition: hb-unicode.hh:300
#define HB_MODIFIED_COMBINING_CLASS_CCC14
Definition: hb-unicode.hh:289
#define HB_MODIFIED_COMBINING_CLASS_CCC118
Definition: hb-unicode.hh:343
#define HB_MODIFIED_COMBINING_CLASS_CCC34
Definition: hb-unicode.hh:317
#define HB_MODIFIED_COMBINING_CLASS_CCC18
Definition: hb-unicode.hh:293
#define HB_MODIFIED_COMBINING_CLASS_CCC132
Definition: hb-unicode.hh:353
#define HB_MODIFIED_COMBINING_CLASS_CCC107
Definition: hb-unicode.hh:340
#define HB_MODIFIED_COMBINING_CLASS_CCC22
Definition: hb-unicode.hh:297
#define HB_MODIFIED_COMBINING_CLASS_CCC28
Definition: hb-unicode.hh:311
#define HB_MODIFIED_COMBINING_CLASS_CCC35
Definition: hb-unicode.hh:318
#define HB_MODIFIED_COMBINING_CLASS_CCC12
Definition: hb-unicode.hh:287
#define HB_MODIFIED_COMBINING_CLASS_CCC15
Definition: hb-unicode.hh:290
#define HB_MODIFIED_COMBINING_CLASS_CCC36
Definition: hb-unicode.hh:321
#define HB_MODIFIED_COMBINING_CLASS_CCC10
Definition: hb-unicode.hh:285
#define HB_FALLTHROUGH
Definition: hb.hh:337
#define likely(expr)
Definition: hb.hh:250
#define unlikely(expr)
Definition: hb.hh:251
backing_store_ptr info
[4]
Definition: jmemsys.h:161
void
Definition: png.h:1080
GLuint GLuint end
GLenum GLenum GLsizei count
GLenum GLuint buffer
GLenum GLuint GLsizei const GLenum * props
GLuint start
GLint first
GLdouble GLdouble t
[9]
Definition: qopenglext.h:243
uint32_t hb_codepoint_t
Definition: hb-common.h:106
int32_t hb_position_t
Definition: hb-common.h:115
#define HB_DIRECTION_IS_FORWARD(dir)
Definition: hb-common.h:279
#define HB_DIRECTION_IS_BACKWARD(dir)
Definition: hb-common.h:288
hb_direction_t
Definition: hb-common.h:229
@ HB_DIRECTION_INVALID
Definition: hb-common.h:230
@ HB_DIRECTION_RTL
Definition: hb-common.h:232
@ HB_DIRECTION_LTR
Definition: hb-common.h:231
#define HB_DIRECTION_IS_HORIZONTAL(dir)
Definition: hb-common.h:261
@ HB_UNICODE_COMBINING_CLASS_BELOW
Definition: hb-unicode.h:257
@ HB_UNICODE_COMBINING_CLASS_ABOVE
Definition: hb-unicode.h:262
@ HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT
Definition: hb-unicode.h:252
@ HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE
Definition: hb-unicode.h:254
@ HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW
Definition: hb-unicode.h:253
@ HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW
Definition: hb-unicode.h:264
@ HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT
Definition: hb-unicode.h:258
@ HB_UNICODE_COMBINING_CLASS_BELOW_LEFT
Definition: hb-unicode.h:256
@ HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT
Definition: hb-unicode.h:263
@ HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT
Definition: hb-unicode.h:261
@ HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT
Definition: hb-unicode.h:255
@ HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE
Definition: hb-unicode.h:265
@ HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK
Definition: hb-unicode.h:105
QString base
HB_NO_SANITIZE_SIGNED_INTEGER_OVERFLOW void kern(hb_font_t *font, hb_buffer_t *buffer, hb_mask_t kern_mask, bool scale=true) const
Definition: hb-kern.hh:47
void get_glyph_kerning_for_direction(hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
Definition: hb-font.hh:550
hb_position_t x_bearing
Definition: hb-font.h:141
hb_position_t y_bearing
Definition: hb-font.h:142
hb_position_t height
Definition: hb-font.h:144
hb_position_t width
Definition: hb-font.h:143
hb_ot_shape_fallback_kern_driver_t(hb_font_t *font_, hb_buffer_t *buffer)
hb_position_t get_kerning(hb_codepoint_t first, hb_codepoint_t second) const
hb_mask_t kern_mask
Definition: hb-ot-shape.hh:77
hb_segment_properties_t props
Definition: hb-ot-shape.hh:63
hb_direction_t direction
Definition: hb-buffer.h:202