From 74b4d912a5ffda1abaedd5a58976260623a279e2 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Tue, 24 Apr 2018 19:33:55 -0400 Subject: [PATCH] More freetype impl in shared_font. --- graphics/shared_font/source/main.c | 41 +++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/graphics/shared_font/source/main.c b/graphics/shared_font/source/main.c index 17f5aad..56ac2bb 100644 --- a/graphics/shared_font/source/main.c +++ b/graphics/shared_font/source/main.c @@ -7,7 +7,10 @@ //See also libnx pl.h. -//TODO: Actually use the font-data. +//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) { @@ -18,6 +21,10 @@ int main(int argc, char **argv) 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); @@ -46,6 +53,38 @@ int main(int argc, char **argv) for (i=0; i