| Index: Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp
|
| diff --git a/Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp b/Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp
|
| index 8f4915a54c0bf6776e9c2654246d666bb0bb5363..1baf56deed3c783c2be46e9332326f501318587c 100644
|
| --- a/Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp
|
| +++ b/Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp
|
| @@ -617,6 +617,7 @@ static inline bool collectCandidateRuns(const UChar* normalizedBuffer,
|
| const SimpleFontData* currentFontData = nextFontData;
|
| UScriptCode currentScript = nextScript;
|
|
|
| + UChar32 lastCharacter = character;
|
| for (iterator.advance(clusterLength); iterator.consume(character, clusterLength); iterator.advance(clusterLength)) {
|
| if (Character::treatAsZeroWidthSpace(character))
|
| continue;
|
| @@ -631,9 +632,12 @@ static inline bool collectCandidateRuns(const UChar* normalizedBuffer,
|
| nextScript = uscript_getScript(character, &errorCode);
|
| if (U_FAILURE(errorCode))
|
| return false;
|
| + if (lastCharacter == zeroWidthJoiner)
|
| + currentFontData = nextFontData;
|
| if ((nextFontData != currentFontData) || ((currentScript != nextScript) && (nextScript != USCRIPT_INHERITED) && (!uscript_hasScript(character, currentScript))))
|
| break;
|
| currentCharacterPosition = iterator.characters();
|
| + lastCharacter = character;
|
| }
|
|
|
| CandidateRun run = { character, startIndexOfCurrentRun, iterator.currentCharacter(), currentFontData, currentScript };
|
|
|