Public Member Functions | |
| TTFont (Graphics::Font *font, uint32 rgb, int bordersize, bool antiAliased, bool SJIS) | |
| int | getHeight () override |
| get the height of the font More... | |
| int | getBaseline () override |
| get the baseline of the font (relative from the top) More... | |
| int | getBaselineSkip () override |
| get the baselineskip of the font (distance between two baselines) More... | |
| bool | isAntialiased () |
| void | getStringSize (const Common::String &text, int32 &width, int32 &height) override |
| void | getTextSize (const Common::String &text, int32 &resultwidth, int32 &resultheight, unsigned int &remaining, int32 width=0, int32 height=0, TextAlign align=TEXT_LEFT, bool u8specials=false, bool pagebreaks=false) override |
| RenderedText * | renderText (const Common::String &text, unsigned int &remaining, int32 width=0, int32 height=0, TextAlign align=TEXT_LEFT, bool u8specials=false, bool pagebreaks=false, Common::String::size_type cursor=Common::String::npos) override |
Public Member Functions inherited from Ultima::Ultima8::Font | |
| virtual int | getHeight ()=0 |
| get the height of the font More... | |
| virtual int | getBaseline ()=0 |
| get the baseline of the font (relative from the top) More... | |
| virtual int | getBaselineSkip ()=0 |
| get the baselineskip of the font (distance between two baselines) More... | |
| virtual void | getStringSize (const Common::String &text, int32 &width, int32 &height)=0 |
| virtual RenderedText * | renderText (const Common::String &text, unsigned int &remaining, int32 width=0, int32 height=0, TextAlign align=TEXT_LEFT, bool u8specials=false, bool pagebreaks=false, Common::String::size_type cursor=Common::String::npos)=0 |
| virtual void | getTextSize (const Common::String &text, int32 &resultwidth, int32 &resultheight, unsigned int &remaining, int32 width=0, int32 height=0, TextAlign align=TEXT_LEFT, bool u8specials=false, bool pagebreaks=false) |
| void | setHighRes (bool hr) |
| bool | isHighRes () const |
Protected Member Functions | |
| void | addTextBorder (Graphics::ManagedSurface &textSurf, uint32 *texBuf, const Common::Rect32 &dims, int32 resultWidth, int32 resultHeight, uint32 borderColor) |
Protected Attributes | |
| Graphics::Font * | _ttfFont |
| uint32 | _color |
| int | _borderSize |
| bool | _antiAliased |
| bool | _SJIS |
| Graphics::PixelFormat | _PF_RGBA |
| uint16 | _bullet |
Protected Attributes inherited from Ultima::Ultima8::Font | |
| bool | _highRes |
Additional Inherited Members | |
Public Types inherited from Ultima::Ultima8::Font | |
| enum | TextAlign { TEXT_LEFT , TEXT_CENTER , TEXT_RIGHT } |
|
overridevirtual |
get the height of the font
Implements Ultima::Ultima8::Font.
|
overridevirtual |
get the baseline of the font (relative from the top)
Implements Ultima::Ultima8::Font.
|
overridevirtual |
get the baselineskip of the font (distance between two baselines)
Implements Ultima::Ultima8::Font.
|
overridevirtual |
get the dimensions of a string (not containing any newlines)
| text | The string |
| width | Returns the width |
| height | Returns the height |
Implements Ultima::Ultima8::Font.
|
overridevirtual |
get the dimensions of a rendered string
| text | The text |
| resultwidth | Returns the resulting width |
| resultheight | Returns the resulting height |
| remaining | Returns index of the first character not printed |
| width | The width of the target rectangle, or 0 for unlimited |
| height | The height of the target rectangle, or 0 for unlimited |
| align | Alignment of the text (left, right, center) |
| u8specials | If true, interpret the special characters U8 uses |
| pagebreaks | If true (and u8specials too), stop at U8 pagebreaks |
Reimplemented from Ultima::Ultima8::Font.
|
overridevirtual |
render a string
| text | The text |
| remaining | Returns index of the first character not printed |
| width | The width of the target rectangle, or 0 for unlimited |
| height | The height of the target rectangle, or 0 for unlimited |
| align | Alignment of the text (left, right, center) |
| u8specials | If true, interpret the special characters U8 uses |
| pagebreaks | If true (and u8specials too), stop at U8 pagebreaks |
Implements Ultima::Ultima8::Font.