Avoid workarounds for old version of ICU and Harfbuzz. (flutter/engine#4024)

This commit is contained in:
Chinmay Garde
2017-08-28 13:28:09 -07:00
committed by GitHub
parent e4cc8f5e41
commit 725938c95b
2 changed files with 0 additions and 17 deletions

View File

@@ -33,27 +33,16 @@ bool isNewEmoji(uint32_t c) {
}
bool isEmoji(uint32_t c) {
#if WIP_NEEDS_ICU_UPDATE
return false;
#else // WIP_NEEDS_ICU_UPDATE
return isNewEmoji(c) || u_hasBinaryProperty(c, UCHAR_EMOJI);
#endif // WIP_NEEDS_ICU_UPDATE
}
bool isEmojiModifier(uint32_t c) {
#if WIP_NEEDS_ICU_UPDATE
return false;
#else // WIP_NEEDS_ICU_UPDATE
// Emoji modifier are not expected to change, so there's a small change we
// need to customize this.
return u_hasBinaryProperty(c, UCHAR_EMOJI_MODIFIER);
#endif // WIP_NEEDS_ICU_UPDATE
}
bool isEmojiBase(uint32_t c) {
#if WIP_NEEDS_ICU_UPDATE
return false;
#else // WIP_NEEDS_ICU_UPDATE
// These two characters were removed from Emoji_Modifier_Base in Emoji 4.0,
// but we need to keep them as emoji modifier bases since there are fonts and
// user-generated text out there that treats these as potential emoji bases.
@@ -68,7 +57,6 @@ bool isEmojiBase(uint32_t c) {
return true;
}
return u_hasBinaryProperty(c, UCHAR_EMOJI_MODIFIER_BASE);
#endif // WIP_NEEDS_ICU_UPDATE
}
UCharDirection emojiBidiOverride(const void* /* context */, UChar32 c) {

View File

@@ -787,10 +787,6 @@ static const hb_codepoint_t CHAR_HYPHEN = 0x2010; /* HYPHEN */
static inline hb_codepoint_t determineHyphenChar(hb_codepoint_t preferredHyphen,
hb_font_t* font) {
#if WIP_NEEDS_ICU_UPDATE
(void)CHAR_HYPHEN;
return 0x002D; // HYPHEN-MINUS
#else // WIP_NEEDS_ICU_UPDATE
hb_codepoint_t glyph;
if (preferredHyphen == 0x058A /* ARMENIAN_HYPHEN */
|| preferredHyphen == 0x05BE /* HEBREW PUNCTUATION MAQAF */
@@ -813,7 +809,6 @@ static inline hb_codepoint_t determineHyphenChar(hb_codepoint_t preferredHyphen,
}
}
return preferredHyphen;
#endif // WIP_NEEDS_ICU_UPDATE
}
static inline void addHyphenToHbBuffer(hb_buffer_t* buffer,