JPFont.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 2006 The Pentagram team
00003 
00004 This program is free software; you can redistribute it and/or
00005 modify it under the terms of the GNU General Public License
00006 as published by the Free Software Foundation; either version 2
00007 of the License, or (at your option) any later version.
00008 
00009 This program is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 GNU General Public License for more details.
00013 
00014 You should have received a copy of the GNU General Public License
00015 along with this program; if not, write to the Free Software
00016 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00017 */
00018 
00019 #ifndef JPFONT_H
00020 #define JPFONT_H
00021 
00022 #include "Font.h"
00023 
00024 class ShapeFont;
00025 
00026 class JPFont : public Pentagram::Font
00027 {
00028 public:
00029         JPFont(ShapeFont* jpfont, unsigned int fontnum);
00030         virtual ~JPFont();
00031 
00032         int getWidth(int c);
00033 
00034         virtual int getHeight();
00035         virtual int getBaseline();
00036         virtual int getBaselineSkip();
00037 
00038         virtual void getStringSize(const std::string& text,
00039                                                            int& width, int& height);
00040         virtual void getTextSize(const std::string& text,
00041                                                          int& resultwidth, int& resultheight,
00042                                                          unsigned int& remaining,
00043                                                          int width=0, int height=0,
00044                                                          TextAlign align=TEXT_LEFT, bool u8specials=false);
00045 
00046         virtual RenderedText* renderText(const std::string& text,
00047                                                                          unsigned int& remaining,
00048                                                                          int width=0, int height=0,
00049                                                                          TextAlign align=TEXT_LEFT,
00050                                                                          bool u8specials=false,
00051                                                                          std::string::size_type cursor
00052                                                                                         =std::string::npos);
00053 
00054         ENABLE_RUNTIME_CLASSTYPE();
00055 protected:
00056 
00057         unsigned int fontnum;
00058         ShapeFont* shapefont;
00059 };
00060 
00061 
00062 #endif

Generated on Fri Jul 27 22:27:22 2007 for pentagram by  doxygen 1.4.7