From 095384b90faf0e0fdd28840f9c2cb2bafe95c210 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 13 Jan 2011 14:45:14 +0000 Subject: GRAPHICS: Use the pixel height instead of the ascent as the WinFont height svn-id: r55224 --- graphics/fonts/winfont.cpp | 3 +-- graphics/fonts/winfont.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'graphics') diff --git a/graphics/fonts/winfont.cpp b/graphics/fonts/winfont.cpp index c66e578040..98b8032a9b 100644 --- a/graphics/fonts/winfont.cpp +++ b/graphics/fonts/winfont.cpp @@ -40,7 +40,6 @@ WinFont::~WinFont() { void WinFont::close() { _pixHeight = 0; - _ascent = 0; _maxWidth = 0; _firstChar = 0; _lastChar = 0; @@ -185,7 +184,7 @@ bool WinFont::loadFromFNT(Common::SeekableReadStream &stream) { /* 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(); diff --git a/graphics/fonts/winfont.h b/graphics/fonts/winfont.h index 0600527643..b23455e2d5 100644 --- a/graphics/fonts/winfont.h +++ b/graphics/fonts/winfont.h @@ -63,7 +63,7 @@ public: 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 @@ private: uint16 characterToIndex(byte character) const; uint16 _pixHeight; - uint16 _ascent; uint16 _maxWidth; byte _firstChar; byte _lastChar; -- cgit v1.2.3