1.[VD] Fix special character and vowel signs of khmer(Thai,Myanmar) show boxes issue.
Currently,the HarfBuzz buffer of native app use
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS cluster level,
Chromium use default cluster level:
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES.
The difference between the two cluster level is like below:
when input special character and vowel signs of khmer(Thai,Myanmar)
(the special character which not included in the khmer(Thai,Myanmar)font):
MONOTONE_CHARACTERS level: two unicode will split two clusters
MONOTONE_GRAPHEMES level: two unicode will bind one cluster,
cause can't get valid glyph, and show boxes.
To keep same behaviour to native app,set the HarfBuzz buffer cluster
level to HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS.
Migrated from aura:
https://review.tizen.org/gerrit/#/c/282743
2.[VD] Perform fallback font for private use unicode
Private-use characters are most commonly used in East Asia, particularly
in Japan, China, and Korea, to extend the available characters in various
standards and vendor character sets.
Refer:
https://www.unicode.org/faq/private_use.html
On VD, Private-use characters are been used, need perform fallback font for it,
or else will cause can not show the correct glyph, but showed as a box.
refer:
https://review.tizen.org/gerrit/#/c/286928
Change-Id: Idc62e49117f676b90bd1ea9867afb8197f003c39
Signed-off-by: liuxd <xd123.liu@samsung.com>
// http://www.unicode.org/faq/private_use.html#nonchar1 - See also
// crbug.com/862352 where performing fallback for U+FFFE causes a memory
// regression.
- if (Character::IsPrivateUse(lookup_char) ||
+ if (
+#if !BUILDFLAG(IS_TIZEN_TV)
+ Character::IsPrivateUse(lookup_char) ||
+#endif
Character::IsNonCharacter(lookup_char))
return nullptr;
base::ElapsedTimer timer;
hb_buffer_set_script(buffer, ICUScriptToHBScript(current_run_script));
hb_buffer_set_direction(buffer, direction);
+#if BUILDFLAG(IS_TIZEN_TV)
+ if (current_run_script == USCRIPT_KHMER ||
+ current_run_script == USCRIPT_THAI ||
+ current_run_script == USCRIPT_MYANMAR) {
+ hb_buffer_set_cluster_level(buffer,
+ HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS);
+ }
+#endif
+
hb_font_t* hb_font =
face->GetScaledFont(std::move(current_font_range_set),
HB_DIRECTION_IS_VERTICAL(direction)