summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-vowel-constraints.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-vowel-constraints.cc')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-vowel-constraints.cc88
1 files changed, 41 insertions, 47 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-vowel-constraints.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-vowel-constraints.cc
index 2f8041323a..1037626998 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-vowel-constraints.cc
+++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-vowel-constraints.cc
@@ -2,15 +2,16 @@
/*
* The following functions are generated by running:
*
- * ./gen-vowel-constraints.py use Scripts.txt
+ * ./gen-vowel-constraints.py ms-use/IndicShapingInvalidCluster.txt Scripts.txt
*
* on files with these headers:
*
- * # Copied from https://docs.microsoft.com/en-us/typography/script-development/use
- * # On October 23, 2018; with documentd dated 02/07/2018.
+ * # IndicShapingInvalidCluster.txt
+ * # Date: 2015-03-12, 21:17:00 GMT [AG]
+ * # Date: 2019-11-08, 23:22:00 GMT [AG]
*
- * # Scripts-12.0.0.txt
- * # Date: 2019-01-28, 22:16:47 GMT
+ * # Scripts-13.0.0.txt
+ * # Date: 2020-01-22, 00:07:43 GMT
*/
#include "hb.hh"
@@ -22,15 +23,15 @@
static void
_output_dotted_circle (hb_buffer_t *buffer)
{
- hb_glyph_info_t &dottedcircle = buffer->output_glyph (0x25CCu);
- _hb_glyph_info_reset_continuation (&dottedcircle);
+ (void) buffer->output_glyph (0x25CCu);
+ _hb_glyph_info_reset_continuation (&buffer->prev());
}
static void
_output_with_dotted_circle (hb_buffer_t *buffer)
{
_output_dotted_circle (buffer);
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
}
void
@@ -50,7 +51,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
*
* https://github.com/harfbuzz/harfbuzz/issues/1019
*/
- bool processed = false;
buffer->clear_output ();
unsigned int count = buffer->len;
switch ((unsigned) buffer->props.script)
@@ -96,16 +96,14 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
buffer->idx + 2 < count &&
0x0907u == buffer->cur (2).codepoint)
{
- buffer->next_glyph ();
- buffer->next_glyph ();
- _output_dotted_circle (buffer);
+ (void) buffer->next_glyph ();
+ matched = true;
}
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_BENGALI:
@@ -124,10 +122,9 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
matched = 0x09E2u == buffer->cur (1).codepoint;
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_GURMUKHI:
@@ -161,10 +158,9 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
}
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_GUJARATI:
@@ -186,10 +182,9 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
matched = 0x0ABEu == buffer->cur (1).codepoint;
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_ORIYA:
@@ -205,10 +200,23 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
matched = 0x0B57u == buffer->cur (1).codepoint;
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
+ if (matched) _output_with_dotted_circle (buffer);
+ }
+ break;
+
+ case HB_SCRIPT_TAMIL:
+ for (buffer->idx = 0; buffer->idx + 1 < count && buffer->successful;)
+ {
+ bool matched = false;
+ if (0x0B85u == buffer->cur ().codepoint &&
+ 0x0BC2u == buffer->cur (1).codepoint)
+ {
+ matched = true;
+ }
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_TELUGU:
@@ -229,10 +237,9 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
matched = 0x0C55u == buffer->cur (1).codepoint;
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_KANNADA:
@@ -248,10 +255,9 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
matched = 0x0CCCu == buffer->cur (1).codepoint;
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_MALAYALAM:
@@ -275,10 +281,9 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
}
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_SINHALA:
@@ -305,16 +310,15 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
switch (buffer->cur (1).codepoint)
{
case 0x0DCAu: case 0x0DD9u: case 0x0DDAu: case 0x0DDCu:
- case 0x0DDDu:
+ case 0x0DDDu: case 0x0DDEu:
matched = true;
break;
}
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_BRAHMI:
@@ -333,10 +337,9 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
matched = 0x11042u == buffer->cur (1).codepoint;
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_KHUDAWADI:
@@ -355,10 +358,9 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
}
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_TIRHUTA:
@@ -382,10 +384,9 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
}
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_MODI:
@@ -403,10 +404,9 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
}
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
case HB_SCRIPT_TAKRI:
@@ -427,21 +427,15 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
matched = 0x116B2u == buffer->cur (1).codepoint;
break;
}
- buffer->next_glyph ();
+ (void) buffer->next_glyph ();
if (matched) _output_with_dotted_circle (buffer);
}
- processed = true;
break;
default:
break;
}
- if (processed)
- {
- if (buffer->idx < count)
- buffer->next_glyph ();
- buffer->swap_buffers ();
- }
+ buffer->swap_buffers ();
}