aboutsummaryrefslogtreecommitdiff
path: root/graphics/fonts/ttf.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2012-07-30 21:31:14 +0200
committerJohannes Schickel2012-08-09 03:13:00 +0200
commitb4196e48b16c458ef6564a051495525ff5a282f0 (patch)
tree6d02c90d9c874789b67ce3081998b219cb9624f2 /graphics/fonts/ttf.cpp
parent5521261fdebb9388026457d7c2a92ad6abc149f1 (diff)
downloadscummvm-rg350-b4196e48b16c458ef6564a051495525ff5a282f0.tar.gz
scummvm-rg350-b4196e48b16c458ef6564a051495525ff5a282f0.tar.bz2
scummvm-rg350-b4196e48b16c458ef6564a051495525ff5a282f0.zip
GRAPHICS: Add a DPI parameter to loadTTFFont.
Will be used by WME.
Diffstat (limited to 'graphics/fonts/ttf.cpp')
-rw-r--r--graphics/fonts/ttf.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/graphics/fonts/ttf.cpp b/graphics/fonts/ttf.cpp
index 96241e923c..2b1dca1eae 100644
--- a/graphics/fonts/ttf.cpp
+++ b/graphics/fonts/ttf.cpp
@@ -101,7 +101,7 @@ public:
TTFFont();
virtual ~TTFFont();
- bool load(Common::SeekableReadStream &stream, int size, bool monochrome, const uint32 *mapping);
+ bool load(Common::SeekableReadStream &stream, int size, uint dpi, bool monochrome, const uint32 *mapping);
virtual int getFontHeight() const;
@@ -157,7 +157,7 @@ TTFFont::~TTFFont() {
}
}
-bool TTFFont::load(Common::SeekableReadStream &stream, int size, bool monochrome, const uint32 *mapping) {
+bool TTFFont::load(Common::SeekableReadStream &stream, int size, uint dpi, bool monochrome, const uint32 *mapping) {
if (!g_ttf.isInitialized())
return false;
@@ -195,7 +195,7 @@ bool TTFFont::load(Common::SeekableReadStream &stream, int size, bool monochrome
// Check whether we have kerning support
_hasKerning = (FT_HAS_KERNING(_face) != 0);
- if (FT_Set_Char_Size(_face, 0, size * 64, 0, 0)) {
+ if (FT_Set_Char_Size(_face, 0, size * 64, dpi, dpi)) {
delete[] _ttfFile;
_ttfFile = 0;
@@ -462,10 +462,10 @@ bool TTFFont::cacheGlyph(Glyph &glyph, FT_UInt &slot, uint chr) {
return true;
}
-Font *loadTTFFont(Common::SeekableReadStream &stream, int size, bool monochrome, const uint32 *mapping) {
+Font *loadTTFFont(Common::SeekableReadStream &stream, int size, uint dpi, bool monochrome, const uint32 *mapping) {
TTFFont *font = new TTFFont();
- if (!font->load(stream, size, monochrome, mapping)) {
+ if (!font->load(stream, size, dpi, monochrome, mapping)) {
delete font;
return 0;
}