Set proper polygon mode in FTPixmapFont, to fix rendering on OS X. Fix courtesy of Duncan Murdoch, from SF patch #2023536.
diff --git a/src/FTFont/FTPixmapFont.cpp b/src/FTFont/FTPixmapFont.cpp
index 0c11fd5..7f9c623 100644
--- a/src/FTFont/FTPixmapFont.cpp
+++ b/src/FTFont/FTPixmapFont.cpp
@@ -85,11 +85,15 @@ inline FTPoint FTPixmapFontImpl::RenderI(const T* string, const int len,
int renderMode)
{
// Protect GL_TEXTURE_2D and glPixelTransferf()
- glPushAttrib(GL_ENABLE_BIT | GL_PIXEL_MODE_BIT | GL_COLOR_BUFFER_BIT);
+ glPushAttrib(GL_ENABLE_BIT | GL_PIXEL_MODE_BIT | GL_COLOR_BUFFER_BIT
+ | GL_POLYGON_BIT);
// Protect glPixelStorei() calls (made by FTPixmapGlyphImpl::RenderImpl).
glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
+ // Needed on OSX
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+
glDisable(GL_TEXTURE_2D);
GLfloat ftglColour[4];