Browse Source

Fixed TrueTypeFont incorrectly handling display mode changes.

rude 16 years ago
parent
commit
d7d3766cea
3 changed files with 18 additions and 21 deletions
  1. 0 3
      src/modules/graphics/opengl/TrueTypeFont.cpp
  2. 2 2
      src/scripts/graphics.lua
  3. 16 16
      src/scripts/graphics.lua.h

+ 0 - 3
src/modules/graphics/opengl/TrueTypeFont.cpp

@@ -228,9 +228,6 @@ namespace opengl
 		FT_Done_Face(face);
 		FT_Done_FreeType(library); //all done
 
-		// Free data.
-		data->release();
-
 		return true;
 	}
 

+ 2 - 2
src/scripts/graphics.lua

@@ -20,7 +20,7 @@ freely, subject to the following restrictions:
 
 love.graphics.print = function (...)
 	if not love.graphics.getFont() then 
-		love.graphics.setFont(love._vera, 12)
+		love.graphics.setFont(love._vera_ttf, 12)
 	end
 	love.graphics.print1(...)
 	love.graphics.print = love.graphics.print1
@@ -28,7 +28,7 @@ end
 
 love.graphics.printf = function (...)
 	if not love.graphics.getFont() then 
-		love.graphics.setFont(love._vera, 12)
+		love.graphics.setFont(love._vera_ttf, 12)
 	end
 	love.graphics.printf1(...)
 	love.graphics.printf = love.graphics.printf1

+ 16 - 16
src/scripts/graphics.lua.h

@@ -55,22 +55,22 @@ static const unsigned char B1[]={
 111,116, 32,108,111,118,101, 46,103,114, 97,112,104,105, 99,115, 46,103,101,116,
  70,111,110,116, 40, 41, 32,116,104,101,110, 32, 13, 10,  9,  9,108,111,118,101,
  46,103,114, 97,112,104,105, 99,115, 46,115,101,116, 70,111,110,116, 40,108,111,
-118,101, 46, 95,118,101,114, 97, 44, 32, 49, 50, 41, 13, 10,  9,101,110,100, 13,
- 10,  9,108,111,118,101, 46,103,114, 97,112,104,105, 99,115, 46,112,114,105,110,
-116, 49, 40, 46, 46, 46, 41, 13, 10,  9,108,111,118,101, 46,103,114, 97,112,104,
-105, 99,115, 46,112,114,105,110,116, 32, 61, 32,108,111,118,101, 46,103,114, 97,
-112,104,105, 99,115, 46,112,114,105,110,116, 49, 13, 10,101,110,100, 13, 10, 13,
- 10,108,111,118,101, 46,103,114, 97,112,104,105, 99,115, 46,112,114,105,110,116,
-102, 32, 61, 32,102,117,110, 99,116,105,111,110, 32, 40, 46, 46, 46, 41, 13, 10,
-  9,105,102, 32,110,111,116, 32,108,111,118,101, 46,103,114, 97,112,104,105, 99,
-115, 46,103,101,116, 70,111,110,116, 40, 41, 32,116,104,101,110, 32, 13, 10,  9,
-  9,108,111,118,101, 46,103,114, 97,112,104,105, 99,115, 46,115,101,116, 70,111,
-110,116, 40,108,111,118,101, 46, 95,118,101,114, 97, 44, 32, 49, 50, 41, 13, 10,
-  9,101,110,100, 13, 10,  9,108,111,118,101, 46,103,114, 97,112,104,105, 99,115,
- 46,112,114,105,110,116,102, 49, 40, 46, 46, 46, 41, 13, 10,  9,108,111,118,101,
- 46,103,114, 97,112,104,105, 99,115, 46,112,114,105,110,116,102, 32, 61, 32,108,
-111,118,101, 46,103,114, 97,112,104,105, 99,115, 46,112,114,105,110,116,102, 49,
- 13, 10,101,110,100, 13, 10, 13, 10,
+118,101, 46, 95,118,101,114, 97, 95,116,116,102, 44, 32, 49, 50, 41, 13, 10,  9,
+101,110,100, 13, 10,  9,108,111,118,101, 46,103,114, 97,112,104,105, 99,115, 46,
+112,114,105,110,116, 49, 40, 46, 46, 46, 41, 13, 10,  9,108,111,118,101, 46,103,
+114, 97,112,104,105, 99,115, 46,112,114,105,110,116, 32, 61, 32,108,111,118,101,
+ 46,103,114, 97,112,104,105, 99,115, 46,112,114,105,110,116, 49, 13, 10,101,110,
+100, 13, 10, 13, 10,108,111,118,101, 46,103,114, 97,112,104,105, 99,115, 46,112,
+114,105,110,116,102, 32, 61, 32,102,117,110, 99,116,105,111,110, 32, 40, 46, 46,
+ 46, 41, 13, 10,  9,105,102, 32,110,111,116, 32,108,111,118,101, 46,103,114, 97,
+112,104,105, 99,115, 46,103,101,116, 70,111,110,116, 40, 41, 32,116,104,101,110,
+ 32, 13, 10,  9,  9,108,111,118,101, 46,103,114, 97,112,104,105, 99,115, 46,115,
+101,116, 70,111,110,116, 40,108,111,118,101, 46, 95,118,101,114, 97, 95,116,116,
+102, 44, 32, 49, 50, 41, 13, 10,  9,101,110,100, 13, 10,  9,108,111,118,101, 46,
+103,114, 97,112,104,105, 99,115, 46,112,114,105,110,116,102, 49, 40, 46, 46, 46,
+ 41, 13, 10,  9,108,111,118,101, 46,103,114, 97,112,104,105, 99,115, 46,112,114,
+105,110,116,102, 32, 61, 32,108,111,118,101, 46,103,114, 97,112,104,105, 99,115,
+ 46,112,114,105,110,116,102, 49, 13, 10,101,110,100, 13, 10, 13, 10,
 };
 
  if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"graphics.lua")==0) lua_call(L, 0, 0);