[Change] Added more control over fonts.

This commit is contained in:
Allanis 2014-03-08 01:57:19 +00:00
parent 69d3fb1825
commit bca14a3ab9

View File

@ -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. */
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))