Added an optional font hinting argument to love.graphics.newFont / love.font.newRasterizer when loading TrueType fonts. Resolves issue #963.

Accepted values are "normal", "light", "mono", and "none".
This commit is contained in:
Alex Szpakowski
2015-03-07 22:05:37 -04:00
parent afcad4defc
commit 4ef0d257e9
15 changed files with 187 additions and 32 deletions
+1 -1
View File
@@ -195,7 +195,7 @@ void Graphics::checkSetDefaultFont()
if (!fontmodule)
throw love::Exception("Font module has not been loaded.");
StrongRef<font::Rasterizer> r(fontmodule->newTrueTypeRasterizer(12));
StrongRef<font::Rasterizer> r(fontmodule->newTrueTypeRasterizer(12, font::TrueTypeRasterizer::HINTING_NORMAL));
r->release();
defaultFont.set(newFont(r.get()));
+1 -1
View File
@@ -137,7 +137,7 @@ void Image::generateMipmaps()
{
// Driver bug: http://www.opengl.org/wiki/Common_Mistakes#Automatic_mipmap_generation
#if defined(LOVE_WINDOWS) || defined(LOVE_LINUX)
if (gl.getVendor() == OpenGL::VENDOR_ATI_AMD)
if (gl.getVendor() == OpenGL::VENDOR_AMD)
glEnable(GL_TEXTURE_2D);
#endif
+1 -1
View File
@@ -160,7 +160,7 @@ void OpenGL::initVendor()
// http://feedback.wildfiregames.com/report/opengl/feature/GL_VENDOR
// http://stackoverflow.com/questions/2093594/opengl-extensions-available-on-different-android-devices
if (strstr(vstr, "ATI Technologies"))
vendor = VENDOR_ATI_AMD;
vendor = VENDOR_AMD;
else if (strstr(vstr, "NVIDIA"))
vendor = VENDOR_NVIDIA;
else if (strstr(vstr, "Intel"))
+1 -1
View File
@@ -72,7 +72,7 @@ public:
// OpenGL GPU vendors.
enum Vendor
{
VENDOR_ATI_AMD,
VENDOR_AMD,
VENDOR_NVIDIA,
VENDOR_INTEL,
VENDOR_MESA_SOFT, // Software renderer.