mirror of
https://github.com/XorTroll/Plutonium.git
synced 2024-11-23 09:29:47 +00:00
Fuck encodings, all my homies hate encodings
This commit is contained in:
parent
0777e00e65
commit
39aeb4ea0e
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,6 @@
|
||||
.vscode/
|
||||
build/
|
||||
out/
|
||||
lib/
|
||||
*.elf
|
||||
*.nacp
|
||||
*.nro
|
@ -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);
|
||||
};
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user