From bca14a3ab9c56ca3f684925479671835bda4e514 Mon Sep 17 00:00:00 2001 From: Allanis Date: Sat, 8 Mar 2014 01:57:19 +0000 Subject: [PATCH] [Change] Added more control over fonts. --- src/font.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/font.c b/src/font.c index 9d70d38..5dabf78 100644 --- a/src/font.c +++ b/src/font.c @@ -540,14 +540,16 @@ void gl_fontInit(glFont* font, const char* fname, const unsigned int h) { if(FT_New_Memory_Face(library, buf, bufsize, 0, &face)) WARN("FT_New_Memory_Face failed loading library from %s", fname); - /* FreeType is pretty nice and measures using 1/64 of a pixel, therfore expand. */ - if(FT_IS_SCALABLE(face)) + /* Try to resize. */ + if(FT_IS_SCALABLE(face)) { if(FT_Set_Char_Size(face, - 0, /* Same as width. */ + 0, /* Same as width. */ h << 6, /* In 1/64th of a pixel. */ - 96, - 96)) + 96, /* Create at 96 DPI. */ + 96)) /* Create at 96 DPI. */ WARN("FT_Set_Char_Size failed."); + } else + WARN("Font isn't resizable!"); /* Selected the character map. */ if(FT_Select_Charmap(face, FT_ENCODING_UNICODE))