v0.7.5c: fixed hangul chars not always splitting correctly on android 6

This commit is contained in:
Evan Debenham 2019-10-16 13:01:21 -04:00
parent 7aedf906e7
commit b4eb0bdb70

View File

@ -383,10 +383,10 @@ public class AndroidPlatformSupport extends PlatformSupport {
"(?<=\\p{InCJK_Symbols_and_Punctuation})|(?=\\p{InCJK_Symbols_and_Punctuation})|" + "(?<=\\p{InCJK_Symbols_and_Punctuation})|(?=\\p{InCJK_Symbols_and_Punctuation})|" +
"(?<=\\p{InHalfwidth_and_Fullwidth_Forms})|(?=\\p{InHalfwidth_and_Fullwidth_Forms})"); "(?<=\\p{InHalfwidth_and_Fullwidth_Forms})|(?=\\p{InHalfwidth_and_Fullwidth_Forms})");
//splits on each group of hangul syllables. Needed for weird android 6.0 font files //splits on each non-hangul character. Needed for weird android 6.0 font files
private Pattern android6KRSplitter = Pattern.compile( private Pattern android6KRSplitter = Pattern.compile(
"(?<= )|(?= )|(?<=\n)|(?=\n)|(?<=_)|(?=_)|" + "(?<= )|(?= )|(?<=\n)|(?=\n)|(?<=_)|(?=_)|" +
"(?!\\p{InHangul_Syllables})"); "(?!\\p{InHangul_Syllables})|(?<!\\p{InHangul_Syllables})");
@Override @Override
public String[] splitforTextBlock(String text, boolean multiline) { public String[] splitforTextBlock(String text, boolean multiline) {