projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Messaging subsystem rewrite, step I
[supertux.git]
/
src
/
video
/
font.cpp
diff --git
a/src/video/font.cpp
b/src/video/font.cpp
index
c385576
..
7394441
100644
(file)
--- a/
src/video/font.cpp
+++ b/
src/video/font.cpp
@@
-28,6
+28,7
@@
#include "screen.hpp"
#include "font.hpp"
#include "drawing_context.hpp"
#include "screen.hpp"
#include "font.hpp"
#include "drawing_context.hpp"
+#include "msg.hpp"
Font::Font(const std::string& file, const std::string& shadowfile,
int w, int h, int shadowsize)
Font::Font(const std::string& file, const std::string& shadowfile,
int w, int h, int shadowsize)
@@
-64,7
+65,7
@@
Font::get_text_width(const std::string& text) const
if(hl == 0)
hl = text.size();
if(hl == 0)
hl = text.size();
- for (uint i = 0; i < text.size(); i++)
+ for (u
nsigned
int i = 0; i < text.size(); i++)
if ((unsigned char) text[i] > 0xC2 && (unsigned char) text[i] < 0xC6)
hl--; // control characters are a WASTE.
if ((unsigned char) text[i] > 0xC2 && (unsigned char) text[i] < 0xC6)
hl--; // control characters are a WASTE.
@@
-210,17
+211,13
@@
Font::draw_chars(Surface* pchars, const std::string& text, const Vector& pos,
if(c >= 0x80) {
font_index -= 32;
if(c <= 0xa0) {
if(c >= 0x80) {
font_index -= 32;
if(c <= 0xa0) {
-#ifdef DEBUG
- std::cout << "Unsupported utf-8 character '" << c << "' found\n";
-#endif
+ msg_debug << "Unsupported utf-8 character '" << c << "' found" << std::endl;
font_index = 0;
}
}
if(font_index < 0 || font_index >= (ssize_t) char_count) {
font_index = 0;
}
}
if(font_index < 0 || font_index >= (ssize_t) char_count) {
-#ifdef DEBUG
- std::cout << "Unsupported utf-8 character found\n";
-#endif
+ msg_debug << "Unsupported utf-8 character found" << std::endl;
font_index = 0;
}
font_index = 0;
}