diff options
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp | 4 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-khmer.c | 4 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-myanmar.c | 6 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-shaper.h | 19 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-thai.c | 20 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c | 4 |
6 files changed, 25 insertions, 32 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp index bbf479e774..0dcddc4f7d 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp @@ -1880,12 +1880,12 @@ void HB_IndicAttributes(HB_Script script, const HB_UChar16 *text, hb_uint32 from while (i < len) { bool invalid; hb_uint32 boundary = indic_nextSyllableBoundary(script, text, from+i, end, &invalid) - from; - attributes[i].charStop = true; + attributes[i].graphemeBoundary = true; if (boundary > len-1) boundary = len; i++; while (i < boundary) { - attributes[i].charStop = false; + attributes[i].graphemeBoundary = false; ++uc; ++i; } diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-khmer.c b/src/3rdparty/harfbuzz/src/harfbuzz-khmer.c index 958069e866..1f3c7e2bce 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-khmer.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-khmer.c @@ -652,12 +652,12 @@ void HB_KhmerAttributes(HB_Script script, const HB_UChar16 *text, hb_uint32 from HB_Bool invalid; hb_uint32 boundary = khmer_nextSyllableBoundary( text, from+i, end, &invalid ) - from; - attributes[i].charStop = TRUE; + attributes[i].graphemeBoundary = TRUE; if ( boundary > len-1 ) boundary = len; i++; while ( i < boundary ) { - attributes[i].charStop = FALSE; + attributes[i].graphemeBoundary = FALSE; ++uc; ++i; } diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-myanmar.c b/src/3rdparty/harfbuzz/src/harfbuzz-myanmar.c index 1327b185b0..b18b83054d 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-myanmar.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-myanmar.c @@ -520,14 +520,14 @@ void HB_MyanmarAttributes(HB_Script script, const HB_UChar16 *text, hb_uint32 fr HB_Bool invalid; hb_uint32 boundary = myanmar_nextSyllableBoundary(text, from+i, end, &invalid) - from; - attributes[i].charStop = TRUE; - attributes[i].lineBreakType = HB_Break; + attributes[i].graphemeBoundary = TRUE; + attributes[i].lineBreak = TRUE; if (boundary > len-1) boundary = len; i++; while (i < boundary) { - attributes[i].charStop = FALSE; + attributes[i].graphemeBoundary = FALSE; ++uc; ++i; } diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h index 6dfcdd20a7..2ff52eaf30 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h @@ -126,21 +126,14 @@ typedef struct hb_uint8 bidiLevel; } HB_ScriptItem; -typedef enum { - HB_NoBreak, - HB_SoftHyphen, - HB_Break, - HB_ForcedBreak -} HB_LineBreakType; - typedef struct { - /*HB_LineBreakType*/ hb_bitfield lineBreakType :2; - /*HB_Bool*/ hb_bitfield whiteSpace :1; /* A unicode whitespace character, except NBSP, ZWNBSP */ - /*HB_Bool*/ hb_bitfield charStop :1; /* Valid cursor position (for left/right arrow) */ - /*HB_Bool*/ hb_bitfield wordBoundary :1; - /*HB_Bool*/ hb_bitfield sentenceBoundary :1; - hb_bitfield unused :2; + hb_bitfield graphemeBoundary : 1; /* Valid cursor position (for left/right arrow) */ + hb_bitfield wordBreak : 1; + hb_bitfield sentenceBoundary : 1; + hb_bitfield lineBreak : 1; + hb_bitfield whiteSpace : 1; /* A unicode whitespace character */ + hb_bitfield unused : 3; } HB_CharAttributes; void HB_GetTailoredCharAttributes(const HB_UChar16 *string, hb_uint32 stringLength, diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c index ecb722d984..70c1d57ff1 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c @@ -395,8 +395,8 @@ static void HB_ThaiAssignAttributes(const HB_UChar16 *string, hb_uint32 len, HB_ to_tis620(string, len, cstr); for (i = 0; i < len; ++i) { - attributes[i].lineBreakType = HB_NoBreak; - attributes[i].wordBoundary = FALSE; + attributes[i].lineBreak = FALSE; + attributes[i].wordBreak = FALSE; } if (len > 128) { @@ -410,29 +410,29 @@ static void HB_ThaiAssignAttributes(const HB_UChar16 *string, hb_uint32 len, HB_ } if (break_positions) { - attributes[0].wordBoundary = TRUE; + attributes[0].wordBreak = TRUE; numbreaks = th_brk((const unsigned char *)cstr, break_positions, brp_size); for (i = 0; i < numbreaks; ++i) { - attributes[break_positions[i]].wordBoundary = TRUE; - attributes[break_positions[i]].lineBreakType = HB_Break; + attributes[break_positions[i]].wordBreak = TRUE; + attributes[break_positions[i]].lineBreak = TRUE; } if (break_positions != brp) free(break_positions); } - /* manage charStop */ + /* manage grapheme boundaries */ i = 0; while (i < len) { cell_length = th_next_cell((const unsigned char *)cstr + i, len - i, &tis_cell, true); - attributes[i].charStop = true; + attributes[i].graphemeBoundary = true; for (j = 1; j < cell_length; j++) - attributes[i + j].charStop = false; + attributes[i + j].graphemeBoundary = false; - /* Set charStop for SARA AM */ + /* Set graphemeBoundary for SARA AM */ if (cstr[i + cell_length - 1] == (char)0xd3) - attributes[i + cell_length - 1].charStop = true; + attributes[i + cell_length - 1].graphemeBoundary = true; i += cell_length; } diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c b/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c index e0c263d426..c3570974b3 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c @@ -260,12 +260,12 @@ void HB_TibetanAttributes(HB_Script script, const HB_UChar16 *text, hb_uint32 fr HB_Bool invalid; hb_uint32 boundary = tibetan_nextSyllableBoundary(text, from+i, end, &invalid) - from; - attributes[i].charStop = TRUE; + attributes[i].graphemeBoundary = TRUE; if (boundary > len-1) boundary = len; i++; while (i < boundary) { - attributes[i].charStop = FALSE; + attributes[i].graphemeBoundary = FALSE; ++uc; ++i; } |