diff options
Diffstat (limited to 'engines/zvision/text/truetype_font.cpp')
-rw-r--r-- | engines/zvision/text/truetype_font.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/zvision/text/truetype_font.cpp b/engines/zvision/text/truetype_font.cpp index 7ad8d6db61..acb053ea8d 100644 --- a/engines/zvision/text/truetype_font.cpp +++ b/engines/zvision/text/truetype_font.cpp @@ -199,12 +199,12 @@ void StyledTTFont::drawChar(Graphics::Surface *dst, byte chr, int x, int y, uint if (_font) { _font->drawChar(dst, chr, x, y, color); if (_style & TTF_STYLE_UNDERLINE) { - int16 pos = floor(_font->getFontHeight() * 0.87); + int16 pos = (int16)floor(_font->getFontHeight() * 0.87); int thk = MAX((int)(_font->getFontHeight() * 0.05), 1); dst->fillRect(Common::Rect(x, y + pos, x + _font->getCharWidth(chr), y + pos + thk), color); } if (_style & TTF_STYLE_STRIKETHROUGH) { - int16 pos = floor(_font->getFontHeight() * 0.60); + int16 pos = (int16)floor(_font->getFontHeight() * 0.60); int thk = MAX((int)(_font->getFontHeight() * 0.05), 1); dst->fillRect(Common::Rect(x, y + pos, x + _font->getCharWidth(chr), y + pos + thk), color); } @@ -216,7 +216,7 @@ void StyledTTFont::drawString(Graphics::Surface *dst, const Common::String &str, Common::U32String u32str = convertUtf8ToUtf32(str); _font->drawString(dst, u32str, x, y, w, color, align); if (_style & TTF_STYLE_UNDERLINE) { - int16 pos = floor(_font->getFontHeight() * 0.87); + int16 pos = (int16)floor(_font->getFontHeight() * 0.87); int16 wd = MIN(_font->getStringWidth(u32str), w); int16 stX = x; if (align == Graphics::kTextAlignCenter) @@ -229,7 +229,7 @@ void StyledTTFont::drawString(Graphics::Surface *dst, const Common::String &str, dst->fillRect(Common::Rect(stX, y + pos, stX + wd, y + pos + thk), color); } if (_style & TTF_STYLE_STRIKETHROUGH) { - int16 pos = floor(_font->getFontHeight() * 0.60); + int16 pos = (int16)floor(_font->getFontHeight() * 0.60); int16 wd = MIN(_font->getStringWidth(u32str), w); int16 stX = x; if (align == Graphics::kTextAlignCenter) |