diff options
author | Martin Kiewitz | 2015-06-12 18:48:44 +0200 |
---|---|---|
committer | Martin Kiewitz | 2015-06-12 18:48:44 +0200 |
commit | 9bacb0491814b285a8931a9cf9e53497530e052f (patch) | |
tree | 928c339896625026d9e2036d1277ebc531344fba | |
parent | 143cc1a1f92263997a395b1d42f08ecb4810f8ad (diff) | |
download | scummvm-rg350-9bacb0491814b285a8931a9cf9e53497530e052f.tar.gz scummvm-rg350-9bacb0491814b285a8931a9cf9e53497530e052f.tar.bz2 scummvm-rg350-9bacb0491814b285a8931a9cf9e53497530e052f.zip |
SHERLOCK: font class
-rw-r--r-- | engines/sherlock/fonts.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/sherlock/fonts.cpp b/engines/sherlock/fonts.cpp index 31c44dd4bf..57241bfa00 100644 --- a/engines/sherlock/fonts.cpp +++ b/engines/sherlock/fonts.cpp @@ -104,6 +104,9 @@ int Fonts::stringHeight(const Common::String &str) { } int Fonts::charWidth(unsigned char c) { + if (!_font) + return 0; + if (c == ' ') return 5; else if (Common::isPrint(c)) @@ -114,6 +117,10 @@ int Fonts::charWidth(unsigned char c) { int Fonts::charHeight(unsigned char c) { int idx = c - 33; + + if (!_font) + return 0; + if (c == ' ') idx = 0; else if (c == 225) |