- Fixed bug #1189, which caused wide Asian UTF8 characters to be measured as
  narrow characters (thanks to Roy Zuo).
This commit is contained in:
Paul Beckingham 2013-03-02 18:22:21 -05:00
parent 914447c885
commit 6aa0277749
10 changed files with 45 additions and 36 deletions

View file

@ -1049,7 +1049,7 @@ std::string leftJustify (const int input, const int width)
////////////////////////////////////////////////////////////////////////////////
std::string leftJustify (const std::string& input, const int width)
{
return input + std::string (width - utf8_text_length (input), ' ');
return input + std::string (width - utf8_text_width (input), ' ');
}
////////////////////////////////////////////////////////////////////////////////
@ -1071,7 +1071,7 @@ std::string rightJustify (const int input, const int width)
////////////////////////////////////////////////////////////////////////////////
std::string rightJustify (const std::string& input, const int width)
{
return std::string (width - utf8_text_length (input), ' ') + input;
return std::string (width - utf8_text_width (input), ' ') + input;
}
////////////////////////////////////////////////////////////////////////////////