[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3979 - trunk/pingus/src
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r3979 - trunk/pingus/src |
Date: |
Thu, 26 Feb 2009 17:07:56 +0100 |
Author: grumbel
Date: 2009-02-26 17:07:56 +0100 (Thu, 26 Feb 2009)
New Revision: 3979
Modified:
trunk/pingus/src/string_format.cpp
Log:
Fixed bug in line width calculation, Chinese translation should now work
completly
Modified: trunk/pingus/src/string_format.cpp
===================================================================
--- trunk/pingus/src/string_format.cpp 2009-02-26 16:07:14 UTC (rev 3978)
+++ trunk/pingus/src/string_format.cpp 2009-02-26 16:07:56 UTC (rev 3979)
@@ -69,20 +69,20 @@
std::string text = StringFormat::normalize(text_);
UTF8::iterator beg(text);
- int line_width = 0;
+ float line_width = 0;
std::ostringstream out;
for(UTF8::iterator it(text); !it.done(); ++it)
{
std::string word = UTF8::substr(beg, it+1);
- int word_width = font.get_width(word);
+ float word_width = font.get_width(word);
if (UTF8::is_linebreak_character(*it))
{
if ((line_width + word_width) > width)
{
out << "\n" << word;
- line_width = 0;
+ line_width = word_width;
}
else
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3979 - trunk/pingus/src,
grumbel at BerliOS <=