From ccd5a108e995f5ed527939d9758057dbdeb15209 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 12 Oct 2019 15:01:39 -0400 Subject: [PATCH] v0.7.5b: fixed various errors with android font setup/splitting --- .../android/AndroidPlatformSupport.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidPlatformSupport.java b/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidPlatformSupport.java index a10e6c4fb..4cf32eed5 100644 --- a/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidPlatformSupport.java +++ b/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidPlatformSupport.java @@ -315,9 +315,7 @@ public class AndroidPlatformSupport extends PlatformSupport { parameters.characters = ""; parameters.packer = packer; - BitmapFont font = generator.generateFont(parameters); - font.getData().missingGlyph = font.getData().getGlyph('�'); - fonts.get(generator).put(size, font); + fonts.get(generator).put(size, generator.generateFont(parameters)); } return fonts.get(generator).get(size); @@ -329,7 +327,7 @@ public class AndroidPlatformSupport extends PlatformSupport { "(?<=\\p{InHiragana})|(?=\\p{InHiragana})|" + "(?<=\\p{InKatakana})|(?=\\p{InKatakana})|" + "(?<=\\p{InCJK_Unified_Ideographs})|(?=\\p{InCJK_Unified_Ideographs})|" + - "(?<=\\p{InCJK_Symbols_and_Punctuation})|(?=\\p{InCJK_Symbols_and_Punctuation})|"); + "(?<=\\p{InCJK_Symbols_and_Punctuation})|(?=\\p{InCJK_Symbols_and_Punctuation})"); //additionally splits on words, so that each word can be arranged individually private Pattern regularsplitterMultiline = Pattern.compile( @@ -337,7 +335,7 @@ public class AndroidPlatformSupport extends PlatformSupport { "(?<=\\p{InHiragana})|(?=\\p{InHiragana})|" + "(?<=\\p{InKatakana})|(?=\\p{InKatakana})|" + "(?<=\\p{InCJK_Unified_Ideographs})|(?=\\p{InCJK_Unified_Ideographs})|" + - "(?<=\\p{InCJK_Symbols_and_Punctuation})|(?=\\p{InCJK_Symbols_and_Punctuation})|"); + "(?<=\\p{InCJK_Symbols_and_Punctuation})|(?=\\p{InCJK_Symbols_and_Punctuation})"); //splits on each group of hangul syllables. Needed for weird android 6.0 font files private Pattern android6KRSplitter = Pattern.compile(