diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-01-08 18:58:40 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-01-08 18:58:40 +0200 |
commit | 340de48dbfc5e9aecb6ef540b3d5d3e333bbbaa4 (patch) | |
tree | 0d2385ef254bf4a28aa169a7f7e22ebd8311bd9e | |
parent | c3159160fa3f3091f06b32bc41a57bc2969903eb (diff) | |
download | minetest-340de48dbfc5e9aecb6ef540b3d5d3e333bbbaa4.tar.gz minetest-340de48dbfc5e9aecb6ef540b3d5d3e333bbbaa4.tar.bz2 minetest-340de48dbfc5e9aecb6ef540b3d5d3e333bbbaa4.zip |
continued.
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index e6445f4a3..eacf08c75 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1440,9 +1440,13 @@ int main(int argc, char *argv[]) gui::IGUIFont* font = guienv->getFont(porting::getDataPath("fontlucida.png").c_str());
if(font)
skin->setFont(font);
+ else
+ dstream<<"WARNING: Font file was not found."
+ " Using default font."<<std::endl;
// If font was not found, this will get us one
font = skin->getFont();
-
+ assert(font);
+
u32 text_height = font->getDimension(L"Hello, world!").Height;
dstream<<"text_height="<<text_height<<std::endl;
|