[Scummvm-cvs-logs] SF.net SVN: scummvm:[55224] scummvm/trunk/graphics/fonts

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Thu Jan 13 15:45:15 CET 2011


Revision: 55224
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55224&view=rev
Author:   mthreepwood
Date:     2011-01-13 14:45:14 +0000 (Thu, 13 Jan 2011)

Log Message:
-----------
GRAPHICS: Use the pixel height instead of the ascent as the WinFont height

Modified Paths:
--------------
    scummvm/trunk/graphics/fonts/winfont.cpp
    scummvm/trunk/graphics/fonts/winfont.h

Modified: scummvm/trunk/graphics/fonts/winfont.cpp
===================================================================
--- scummvm/trunk/graphics/fonts/winfont.cpp	2011-01-13 11:47:17 UTC (rev 55223)
+++ scummvm/trunk/graphics/fonts/winfont.cpp	2011-01-13 14:45:14 UTC (rev 55224)
@@ -40,7 +40,6 @@
 
 void WinFont::close() {
 	_pixHeight = 0;
-	_ascent = 0;
 	_maxWidth = 0;
 	_firstChar = 0;
 	_lastChar = 0;
@@ -185,7 +184,7 @@
 	/* uint16 points = */ stream.readUint16LE();
 	/* uint16 vertRes = */ stream.readUint16LE();
 	/* uint16 horizRes = */ stream.readUint16LE();
-	_ascent = stream.readUint16LE();
+	/* uint16 ascent = */ stream.readUint16LE();
 	/* uint16 internalLeading = */ stream.readUint16LE();
 	/* uint16 externalLeading = */ stream.readUint16LE();
 	/* byte italic = */ stream.readByte();

Modified: scummvm/trunk/graphics/fonts/winfont.h
===================================================================
--- scummvm/trunk/graphics/fonts/winfont.h	2011-01-13 11:47:17 UTC (rev 55223)
+++ scummvm/trunk/graphics/fonts/winfont.h	2011-01-13 14:45:14 UTC (rev 55224)
@@ -63,7 +63,7 @@
 	void close();
 
 	// Font API
-	int getFontHeight() const { return _ascent; }
+	int getFontHeight() const { return _pixHeight; }
 	int getMaxCharWidth() const { return _maxWidth; }
 	int getCharWidth(byte chr) const;
 	void drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const;
@@ -74,7 +74,6 @@
 	uint16 characterToIndex(byte character) const;
 
 	uint16 _pixHeight;
-	uint16 _ascent;
 	uint16 _maxWidth;
 	byte _firstChar;
 	byte _lastChar;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list