#include #include #include #include #include FT_FREETYPE_H //See also libnx pl.h. //TODO: Finish this. //This requires the switch-freetype package. //Freetype code here is based on the example code from freetype docs. int main(int argc, char **argv) { Result rc=0; //u32* framebuf; u32 i; u64 LanguageCode=0; PlFontData fonts[PlSharedFontType_Total]; size_t total_fonts=0; FT_Error ret; FT_Library library; FT_Face face; FT_UInt glyph_index; gfxInitDefault(); consoleInit(NULL); rc = setInitialize(); if (R_SUCCEEDED(rc)) rc = setGetSystemLanguage(&LanguageCode); setExit(); if (R_FAILED(rc)) printf("Failed to get system-language: 0x%x\n", rc); if (R_SUCCEEDED(rc)) { rc = plInitialize(); if (R_FAILED(rc)) printf("plInitialize() faild: 0x%x\n", rc); if (R_SUCCEEDED(rc)) { rc = plGetSharedFont(LanguageCode, fonts, PlSharedFontType_Total, &total_fonts); if (R_FAILED(rc)) printf("plGetSharedFont() failed: 0x%x\n", rc); if (R_SUCCEEDED(rc)) { printf("total_fonts: %lu\n", total_fonts); for (i=0; i