aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/gargoyle/fonts.cpp4
-rw-r--r--engines/gargoyle/fonts.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/engines/gargoyle/fonts.cpp b/engines/gargoyle/fonts.cpp
index 7cf4e1d4ac..4f298b0a8d 100644
--- a/engines/gargoyle/fonts.cpp
+++ b/engines/gargoyle/fonts.cpp
@@ -119,13 +119,13 @@ int Fonts::drawStringUni(const Point &pos, int fontIdx, const byte *rgb, const C
size_t Fonts::stringWidth(int fontIdx, const Common::String &text, int spw) {
// TODO: Handle spw
Graphics::Font *font = _fontTable[fontIdx];
- return font->getStringWidth(text);
+ return font->getStringWidth(text) * GLI_SUBPIX;
}
size_t Fonts::stringWidthUni(int fontIdx, const Common::U32String &text, int spw) {
// TODO: Handle spw
Graphics::Font *font = _fontTable[fontIdx];
- return font->getStringWidth(text);
+ return font->getStringWidth(text) * GLI_SUBPIX;
}
} // End of namespace Gargoyle
diff --git a/engines/gargoyle/fonts.h b/engines/gargoyle/fonts.h
index f2a6eb897d..dc0bfd887d 100644
--- a/engines/gargoyle/fonts.h
+++ b/engines/gargoyle/fonts.h
@@ -84,6 +84,7 @@ public:
* @param fontIdx Which font to use
* @param text Text to get the width of
* @param spw ???
+ * @returns Width of string multiplied by GLI_SUBPIX
*/
size_t stringWidth(int fontIdx, const Common::String &text, int spw = -1);
@@ -92,6 +93,7 @@ public:
* @param fontIdx Which font to use
* @param text Text to get the width of
* @param spw ???
+ * @returns Width of string multiplied by GLI_SUBPIX
*/
size_t stringWidthUni(int fontIdx, const Common::U32String &text, int spw = -1);
};