/* * $Id: font.h,v 1.1.1.1 2002/08/18 17:28:53 aeneas Exp $ * Copyright (c) 2002, Dominik Schnitzer * * JFK - JFK Fucking Killerz, a massive multiplayer 2d shoot'em-up game * http://relax.ath.cx/jfk/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef JFK_FONT_H #define JFK_FONT_H #include #include "output.h" using namespace std; namespace JFK { namespace client { class font { public: /* Load the given font */ font(output* outp, string file); ~font(); /* Draw a string on the given position */ void draw_text(int x, int y, string text); int get_height() { return char_height; }; int get_width() { return char_width; }; int get_textwidth(string text); private: output *out; static const int MAX_CHARS = 95; int char_width; int char_height; image fontset; }; } } #endif /* JFK_FONT_H */