mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
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:
@@ -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()));
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
// OpenGL GPU vendors.
|
||||
enum Vendor
|
||||
{
|
||||
VENDOR_ATI_AMD,
|
||||
VENDOR_AMD,
|
||||
VENDOR_NVIDIA,
|
||||
VENDOR_INTEL,
|
||||
VENDOR_MESA_SOFT, // Software renderer.
|
||||
|
||||
Reference in New Issue
Block a user