summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.h4
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-thai.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
index 2ff52eaf30..5a3329dd4b 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
@@ -133,7 +133,9 @@ typedef struct {
hb_bitfield sentenceBoundary : 1;
hb_bitfield lineBreak : 1;
hb_bitfield whiteSpace : 1; /* A unicode whitespace character */
- hb_bitfield unused : 3;
+ hb_bitfield wordStart : 1;
+ hb_bitfield wordEnd : 1;
+ hb_bitfield unused : 1;
} 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 70c1d57ff1..f62a1b7159 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
@@ -395,8 +395,10 @@ 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].lineBreak = FALSE;
attributes[i].wordBreak = FALSE;
+ attributes[i].wordStart = FALSE;
+ attributes[i].wordEnd = FALSE;
+ attributes[i].lineBreak = FALSE;
}
if (len > 128) {
@@ -411,11 +413,17 @@ static void HB_ThaiAssignAttributes(const HB_UChar16 *string, hb_uint32 len, HB_
if (break_positions) {
attributes[0].wordBreak = TRUE;
+ attributes[0].wordStart = TRUE;
+ attributes[0].wordEnd = FALSE;
numbreaks = th_brk((const unsigned char *)cstr, break_positions, brp_size);
for (i = 0; i < numbreaks; ++i) {
attributes[break_positions[i]].wordBreak = TRUE;
+ attributes[break_positions[i]].wordStart = TRUE;
+ attributes[break_positions[i]].wordEnd = TRUE;
attributes[break_positions[i]].lineBreak = TRUE;
}
+ if (numbreaks > 0)
+ attributes[break_positions[numbreaks - 1]].wordStart = FALSE;
if (break_positions != brp)
free(break_positions);