diff --git a/charmap.txt b/charmap.txt index 3a2081e304f2..e2acfdf16b2c 100644 --- a/charmap.txt +++ b/charmap.txt @@ -46,6 +46,8 @@ LV = 34 '=' = 35 ';' = 36 V_D_ARROW = 38 +NBSP = 39 +'~' = 39 '¿' = 51 '¡' = 52 PK = 53 diff --git a/graphics/fonts/latin_narrow.png b/graphics/fonts/latin_narrow.png index 08652d45f489..434638ed1769 100644 Binary files a/graphics/fonts/latin_narrow.png and b/graphics/fonts/latin_narrow.png differ diff --git a/graphics/fonts/latin_narrower.png b/graphics/fonts/latin_narrower.png index 22847ef09953..2b92e411c3eb 100644 Binary files a/graphics/fonts/latin_narrower.png and b/graphics/fonts/latin_narrower.png differ diff --git a/graphics/fonts/latin_short.png b/graphics/fonts/latin_short.png index 7eba3e748bfd..98ad3c5cc3c9 100644 Binary files a/graphics/fonts/latin_short.png and b/graphics/fonts/latin_short.png differ diff --git a/graphics/fonts/latin_short_narrow.png b/graphics/fonts/latin_short_narrow.png index cf48712719ac..6bf1bae0cf26 100644 Binary files a/graphics/fonts/latin_short_narrow.png and b/graphics/fonts/latin_short_narrow.png differ diff --git a/graphics/fonts/latin_short_narrower.png b/graphics/fonts/latin_short_narrower.png index 9c79ae474fdc..830a90389f8f 100644 Binary files a/graphics/fonts/latin_short_narrower.png and b/graphics/fonts/latin_short_narrower.png differ diff --git a/graphics/fonts/latin_small.png b/graphics/fonts/latin_small.png index 371cd5a9684d..41bb38cff8c3 100644 Binary files a/graphics/fonts/latin_small.png and b/graphics/fonts/latin_small.png differ diff --git a/graphics/fonts/latin_small_narrow.png b/graphics/fonts/latin_small_narrow.png index 3a88def3adfe..ff07b857d7e9 100644 Binary files a/graphics/fonts/latin_small_narrow.png and b/graphics/fonts/latin_small_narrow.png differ diff --git a/graphics/fonts/latin_small_narrower.png b/graphics/fonts/latin_small_narrower.png index d03f1b8ad0e2..576dac01e4fb 100644 Binary files a/graphics/fonts/latin_small_narrower.png and b/graphics/fonts/latin_small_narrower.png differ diff --git a/include/constants/characters.h b/include/constants/characters.h index 3725cecce080..6ac3c5224c5d 100644 --- a/include/constants/characters.h +++ b/include/constants/characters.h @@ -54,6 +54,7 @@ #define CHAR_SEMICOLON 0x36 #define CHAR_BARD_WORD_DELIMIT 0x37 // Empty space to separate words in Bard's song #define CHAR_V_D_ARROW 0x38 +#define CHAR_NBSP 0x39 #define CHAR_INV_QUESTION_MARK 0x51 #define CHAR_INV_EXCL_MARK 0x52 #define CHAR_PK 0x53 diff --git a/src/battle_message.c b/src/battle_message.c index 51d41d947e08..76b9fde5cc3f 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3115,7 +3115,10 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst, u32 dstSize) { while (*toCpy != EOS) { - dst[dstID] = *toCpy; + if (*toCpy == CHAR_SPACE) + dst[dstID] = CHAR_NBSP; + else + dst[dstID] = *toCpy; dstID++; toCpy++; } diff --git a/src/fonts.c b/src/fonts.c index 2eb8ed062bfc..fba0dfb7a64d 100644 --- a/src/fonts.c +++ b/src/fonts.c @@ -5,7 +5,7 @@ ALIGNED(4) const u8 gFontSmallNarrowLatinGlyphWidths[] = { 3, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 4, 5, 5, 5, 5, 4, 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 5, 6, 3, - 3, 3, 3, 3, 8, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 8, 0, 3, 3, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 4, @@ -41,7 +41,7 @@ ALIGNED(4) const u8 gFontSmallLatinGl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, 4, 3, 7, 7, 7, 8, 8, 8, 8, 4, 5, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 4, @@ -257,7 +257,7 @@ ALIGNED(4) const u8 gFontShortNarrowLatinGlyphWidths[] = { 3, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 4, 4, 5, 5, 5, 8, 5, 5, 5, 5, 6, 5, 5, 3, 5, 5, 5, 5, 5, 4, 3, 4, 4, 5, 5, 5, 8, 5, 5, 5, 5, 6, 6, 9, 6, 6, 3, - 3, 3, 3, 3, 10, 8, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 10, 8, 5, 3, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 8, 8, 8, 8, 8, 8, 4, 6, 8, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 6, @@ -294,7 +294,7 @@ ALIGNED(4) const u8 gFontShortNarrowerLatinGlyphWidths[] = { 8, 4, 4, 4, 5, 5, 4, 4, 3, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 6, 4, 4, 4, 5, 4, 5, 8, 6, 6, 3, 3, 3, 3, 3, 8, 8, 3, 5, 5, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 3, 3, 3, 3, 3, 3, 5, 5, 4, 8, 8, 8, 7, 8, 8, 4, 4, 6, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 5, 3, 7, 7, 7, 7, 0, 0, 3, diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index b073ac226a87..c55ef489b3e3 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -1160,6 +1160,7 @@ static s32 TryMessage(s32 i, s32 n, const u8 *string) switch (string[j]) { case CHAR_SPACE: + case CHAR_NBSP: case CHAR_PROMPT_SCROLL: case CHAR_PROMPT_CLEAR: case CHAR_NEWLINE: