Fuck encodings, all my homies hate encodings

This commit is contained in:
xor 2022-02-11 15:09:57 +01:00
parent 0777e00e65
commit 39aeb4ea0e
3 changed files with 4 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,6 +1,6 @@
.vscode/
build/
out/
lib/
*.elf
*.nacp
*.nro

View File

@ -79,7 +79,7 @@ namespace pu::ttf {
return this->font_size;
}
sdl2::Font FindValidFontFor(const char ch);
sdl2::Font FindValidFontFor(const Uint16 ch);
std::pair<u32, u32> GetTextDimensions(const std::string &str);
sdl2::Texture RenderText(const std::string &str, const ui::Color clr);
};

View File

@ -57,8 +57,8 @@ namespace pu::ttf {
}
}
sdl2::Font Font::FindValidFontFor(const char ch) {
for(auto &[idx, font] : this->font_faces) {
sdl2::Font Font::FindValidFontFor(const Uint16 ch) {
for(const auto &[idx, font] : this->font_faces) {
if(TTF_GlyphIsProvided(font->font, ch)) {
return font->font;
}