/* GG is a GUI for OpenGL. Copyright (C) 2003-2008 T. Zachary Laine This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA If you do not wish to comply with the terms of the LGPL please contact the author as other terms are available for a fee. Zach Laine whatwasthataddress@gmail.com */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "DefaultFont.h" #include using namespace GG; StyleFactory::StyleFactory() {} StyleFactory::~StyleFactory() {} std::shared_ptr StyleFactory::DefaultFont(unsigned int pts/* = 12*/) const { if (GetFontManager().HasFont(DefaultFontName(), pts)) { return GUI::GetGUI()->GetFont(DefaultFontName(), pts, std::vector()); } else { std::vector bytes; VeraTTFBytes(bytes); return GUI::GetGUI()->GetFont(DefaultFontName(), pts, bytes); } } std::shared_ptr StyleFactory::DefaultFont(unsigned int pts, const UnicodeCharset* first, const UnicodeCharset* last) const { if (GetFontManager().HasFont(DefaultFontName(), pts, first, last)) { return GUI::GetGUI()->GetFont(DefaultFontName(), pts, std::vector(), first, last); } else { std::vector bytes; VeraTTFBytes(bytes); return GUI::GetGUI()->GetFont(DefaultFontName(), pts, bytes, first, last); } } // Don't translate, just pass the key. std::string StyleFactory::Translate(const std::string& key) const { return key; } std::shared_ptr