From 012d4bafbb44f3717fa4f7bfdddeb83eb6e906f2 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 31 Oct 2018 20:45:15 -0700 Subject: GLK: Fix placement of input cursor --- engines/gargoyle/fonts.cpp | 4 ++-- engines/gargoyle/fonts.h | 2 ++ 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); }; -- cgit v1.2.3