[fixes #2] Greatly increased font quality!

This commit is contained in:
Allanis 2014-03-07 23:51:58 +00:00
parent 9bb41430e6
commit 5de9171093

View File

@ -435,7 +435,7 @@ static void glFontMakeDList(FT_Face face, char ch, GLuint list_base,
double x, y; double x, y;
if(FT_Load_Glyph(face, FT_Get_Char_Index(face, ch), if(FT_Load_Glyph(face, FT_Get_Char_Index(face, ch),
FT_LOAD_FORCE_AUTOHINT)) FT_LOAD_DEFAULT))
WARN("FT_Load_Glyph failed"); WARN("FT_Load_Glyph failed");
if(FT_Get_Glyph(face->glyph, &glyph)) if(FT_Get_Glyph(face->glyph, &glyph))
@ -463,8 +463,8 @@ static void glFontMakeDList(FT_Face face, char ch, GLuint list_base,
} }
/* Create the GL texture. */ /* Create the GL texture. */
glBindTexture(GL_TEXTURE_2D, tex_base[(int)ch]); glBindTexture(GL_TEXTURE_2D, tex_base[(int)ch]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_LUMINANCE_ALPHA, glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_LUMINANCE_ALPHA,
GL_UNSIGNED_BYTE, expanded_data); GL_UNSIGNED_BYTE, expanded_data);