[Issue#] N_SE36590
[Problem] Width of any word, containing a complex character after a space, is wrong.
[Cause] There should be one harfBuzzRun created for one word. In the case where the word starts with
a complex character and there is a space before the word, the first glyph of the complex character
becomes one harfBuzzRun and the rest of the word is another harfBuzzRun.
The complex character is not reshaped as expected.
[Solution] Fix the parsing-logic used to collect the harfBuzzRuns, in function HarfBuzzShaper::collectHarfBuzzRuns.
Update the value of "nextScript" in the for-loop, soon after consuming each character.
[Developer] rashmi.s2@samsung.com
#define ENABLE_TIZEN_WRT_APP_URI_SCHEME 1 /*Sungman Kim(ssungmai.kim@samsung.com) : WRT app:// scheme support*/
#define ENABLE_TIZEN_SUPPORT_COMPLEX_FONTS_SHAPING 1 /* Hyeonji Kim(hyeonji.kim@samsung.com) : Support complex fonts shaping */
#define ENABLE_TIZEN_FALLBACK_FONTDATA 1 /* Hyeonji Kim(hyeonji.kim@samsung.com) : Add the fallback fontData to FontFallbackList */
+#define ENABLE_TIZEN_COLLECT_HARFBUZZRUN 1 /* Rashmi Shyamasundar(rashmi.s2@samsung.com) Create proper harfBuzzRun for a word which follows a space */
#define ENABLE_TIZEN_CONTEXTSHADOW_BLUR_NEON 0 /* use neon shadowblur function in ContextShadow.cpp <hyunki.baik@samsung.com> */
#define ENABLE_TIZEN_ON_AUTHENTICATION_REQUESTED 1 /* Sungman Kim(ssungmai.kim@samsung.com) : Implement to requested authentication signal handling method */
for (iterator.advance(clusterLength); iterator.consume(character, clusterLength); iterator.advance(clusterLength)) {
nextFontData = m_font->glyphDataForCharacter(character, false).fontData;
+#if ENABLE(TIZEN_COLLECT_HARFBUZZRUN)
+ nextScript = uscript_getScript(character, &errorCode);
+ if (nextFontData != currentFontData)
+ break;
+#else
if (nextFontData != currentFontData)
break;
nextScript = uscript_getScript(character, &errorCode);
+#endif
if (U_FAILURE(errorCode))
return false;
if ((currentScript != nextScript) && (currentScript != USCRIPT_INHERITED))