Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fonts without UTF8 characters do not compile #4

Open
SomeRanDev opened this issue Aug 8, 2023 · 1 comment
Open

Fonts without UTF8 characters do not compile #4

SomeRanDev opened this issue Aug 8, 2023 · 1 comment

Comments

@SomeRanDev
Copy link

Whenever I use a font without utf8 characters, the assert at include/bn_sprite_font.h:119 fails at compile-time. It fixes itself if I add just a single utf8 character, so not a huge deal... but the assert message is very confusing, and it took me a bit to figure out what was happening, so figured I'd report.

To replicate, I've attached the font I'm using. Just drop in example project and the error will occur:
madou_futo_maru_gothic.zip


Attaching error message to help anyone with similar error search for this

in 'constexpr' expansion of '((bn::sprite_font*)this)->bn::sprite_font::sprite_font((* & item), (* & utf8_characters_ref), (* & character_widths_ref), 0)'
butano/include/bn_assert.h:133:25: error: call to non-'constexpr' function 'void __assert_func(const char*, int, const char*, const char*)'
  133 |                         assert(condition); \
      |                         ^~~~~~
butano/include/bn_sprite_font.h:119:9: note: in expansion of macro 'BN_ASSERT'
  119 |         BN_ASSERT(character_widths_ref.empty() ||
devkitARM/arm-none-eabi/include/assert.h:41:6: note: 'void __assert_func(const char*, int, const char*, const char*)' declared here
   41 | void __assert_func (const char *, int, const char *, const char *)
      |      ^~~~~~~~~~~~~
make[2]: *** [/devkitARM/base_rules:39: FontLoader.o] Error 1
make[1]: *** [/butano/butano.mak:207: build] Error 2
make: *** [/butano/butano.mak:202: all] Error 2
@6TELOIV
Copy link

6TELOIV commented Dec 13, 2023

Getting the same error here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants