#include <JPFont.h>
Inheritance diagram for JPFont:

Public Member Functions | |
| JPFont (ShapeFont *jpfont, unsigned int fontnum) | |
| virtual | ~JPFont () |
| int | getWidth (int c) |
| virtual int | getHeight () |
| virtual int | getBaseline () |
| virtual int | getBaselineSkip () |
| virtual void | getStringSize (const std::string &text, int &width, int &height) |
| virtual void | getTextSize (const std::string &text, int &resultwidth, int &resultheight, unsigned int &remaining, int width=0, int height=0, TextAlign align=TEXT_LEFT, bool u8specials=false) |
| virtual RenderedText * | renderText (const std::string &text, unsigned int &remaining, int width=0, int height=0, TextAlign align=TEXT_LEFT, bool u8specials=false, std::string::size_type cursor=std::string::npos) |
| ENABLE_RUNTIME_CLASSTYPE () | |
Protected Attributes | |
| unsigned int | fontnum |
| ShapeFont * | shapefont |
Definition at line 26 of file JPFont.h.
| JPFont::JPFont | ( | ShapeFont * | jpfont, | |
| unsigned int | fontnum | |||
| ) |
| JPFont::~JPFont | ( | ) | [virtual] |
Definition at line 37 of file JPFont.cpp.
| JPFont::ENABLE_RUNTIME_CLASSTYPE | ( | ) |
Reimplemented from Pentagram::Font.
| int JPFont::getBaseline | ( | ) | [virtual] |
get the baseline of the font (relative from the top)
Implements Pentagram::Font.
Definition at line 52 of file JPFont.cpp.
References ShapeFont::getBaseline(), and shapefont.
| int JPFont::getBaselineSkip | ( | ) | [virtual] |
get the baselineskip of the font (distance between two baselines)
Implements Pentagram::Font.
Definition at line 57 of file JPFont.cpp.
References ShapeFont::getBaselineSkip(), and shapefont.
| int JPFont::getHeight | ( | ) | [virtual] |
get the height of the font
Implements Pentagram::Font.
Definition at line 47 of file JPFont.cpp.
References ShapeFont::getHeight(), and shapefont.
Referenced by getStringSize().
| void JPFont::getStringSize | ( | const std::string & | text, | |
| int & | width, | |||
| int & | height | |||
| ) | [virtual] |
get the dimensions of a string (not containing any newlines)
| text | The string | |
| width | Returns the width | |
| height | Returns the height |
Implements Pentagram::Font.
Definition at line 63 of file JPFont.cpp.
References getHeight(), ShapeFont::getHlead(), getWidth(), shapefont, and Pentagram::shiftjis_to_ultima8().
| void JPFont::getTextSize | ( | const std::string & | text, | |
| int & | resultwidth, | |||
| int & | resultheight, | |||
| unsigned int & | remaining, | |||
| int | width = 0, |
|||
| int | height = 0, |
|||
| TextAlign | align = TEXT_LEFT, |
|||
| bool | u8specials = false | |||
| ) | [virtual] |
Definition at line 84 of file JPFont.cpp.
| int JPFont::getWidth | ( | int | c | ) |
Definition at line 42 of file JPFont.cpp.
References Shape::getFrame(), shapefont, and ShapeFrame::width.
Referenced by getStringSize().
| RenderedText * JPFont::renderText | ( | const std::string & | text, | |
| unsigned int & | remaining, | |||
| int | width = 0, |
|||
| int | height = 0, |
|||
| TextAlign | align = TEXT_LEFT, |
|||
| bool | u8specials = false, |
|||
| std::string::size_type | cursor = std::string::npos | |||
| ) | [virtual] |
unsigned int JPFont::fontnum [protected] |
ShapeFont* JPFont::shapefont [protected] |
Definition at line 58 of file JPFont.h.
Referenced by getBaseline(), getBaselineSkip(), getHeight(), getStringSize(), getWidth(), JPFont(), and renderText().
1.4.7