mirror of
https://github.com/joel16/VITA-Homebrew-Sorter.git
synced 2024-11-26 21:00:27 +00:00
imGui: Use Japanese font to support both jap+english characters
This commit is contained in:
parent
812a31d1f0
commit
e67a3bdd95
@ -210,21 +210,8 @@ bool ImGui_ImplVitaGL_CreateDeviceObjects() {
|
||||
font_config.OversampleV = 1;
|
||||
font_config.PixelSnapH = 1;
|
||||
|
||||
SceUID font = 0;
|
||||
font = sceIoOpen("sa0:/data/font/pvf/ltn0.pvf", SCE_O_RDONLY, 0);
|
||||
if (font < 0)
|
||||
return false;
|
||||
|
||||
SceOff font_size = sceIoLseek(font, 0, SEEK_END);
|
||||
unsigned char *font_buf = new unsigned char[font_size];
|
||||
|
||||
sceIoLseek(font, 0, SCE_SEEK_SET);
|
||||
sceIoRead(font, font_buf, font_size);
|
||||
sceIoClose(font);
|
||||
|
||||
io.Fonts->AddFontFromMemoryTTF(font_buf, font_size, 20.0f, &font_config, io.Fonts->GetGlyphRangesDefault());
|
||||
io.Fonts->AddFontFromFileTTF("sa0:/data/font/pvf/jpn0.pvf", 20.0f, &font_config, io.Fonts->GetGlyphRangesJapanese());
|
||||
io.Fonts->GetTexDataAsRGBA32(static_cast<unsigned char **>(&pixels), &width, &height);
|
||||
delete[] font_buf;
|
||||
|
||||
// Upload texture to graphics system
|
||||
GLint last_texture;
|
||||
|
Loading…
Reference in New Issue
Block a user