ScummVM API documentation
Sherlock::Fonts Class Reference
Inheritance diagram for Sherlock::Fonts:
Sherlock::BaseSurface Sherlock::Screen Sherlock::Surface Sherlock::Scalpel::ScalpelScreen Sherlock::Tattoo::TattooScreen Sherlock::Scalpel::TsAGE::ObjectSurface Sherlock::Scalpel::Scalpel3DOScreen

Public Member Functions

void setFont (int fontNum)
 
int stringWidth (const Common::String &str)
 
int stringHeight (const Common::String &str)
 
int charWidth (const char *str, int &idx)
 
int charWidth (char ch)
 
int charHeight (unsigned char c)
 
int fontHeight () const
 
int widestChar () const
 
int fontNumber () const
 
Common::Array< Common::StringwordWrap (const Common::String &str, uint maxWidth, Common::String &rem, uint maxChars=Common::String::npos, uint maxLines=Common::String::npos, bool skipHeadAt=false)
 
Common::Array< Common::StringwordWrap (const Common::String &str, uint maxWidth, uint maxChars=Common::String::npos, uint maxLines=Common::String::npos, bool skipHeadAt=false)
 

Static Public Member Functions

static void setVm (SherlockEngine *vm)
 
static void freeFont ()
 
static bool isModifiedEucCn ()
 
static bool isBig5 ()
 
static Common::String unescape (const Common::String &in)
 

Static Public Attributes

static const int kChineseWidth = 16
 
static const int kChineseHeight = 16
 

Static Protected Member Functions

static void writeString (BaseSurface *surface, const Common::String &str, const Common::Point &pt, int overrideColor=0)
 

Static Protected Attributes

static SherlockEngine_vm
 

Member Function Documentation

◆ setVm()

static void Sherlock::Fonts::setVm ( SherlockEngine vm)
static

Initialise the font manager

◆ freeFont()

static void Sherlock::Fonts::freeFont ( )
static

Frees the font manager

◆ setFont()

void Sherlock::Fonts::setFont ( int  fontNum)

Set the font to use for writing text on the screen

◆ stringWidth()

int Sherlock::Fonts::stringWidth ( const Common::String str)

Returns the width of a string in pixels

◆ stringHeight()

int Sherlock::Fonts::stringHeight ( const Common::String str)

Returns the height of a string in pixels (i.e. the tallest displayed character)

◆ charWidth() [1/2]

int Sherlock::Fonts::charWidth ( const char *  str,
int &  idx 
)

Returns the width of a character in pixels

◆ charWidth() [2/2]

int Sherlock::Fonts::charWidth ( char  ch)

Returns the width of a character in pixels

◆ charHeight()

int Sherlock::Fonts::charHeight ( unsigned char  c)

Returns the width of a character in pixels

◆ fontHeight()

int Sherlock::Fonts::fontHeight ( ) const
inline

Return the font height

◆ widestChar()

int Sherlock::Fonts::widestChar ( ) const
inline

Return the width of the widest character in the font

◆ fontNumber()

int Sherlock::Fonts::fontNumber ( ) const
inline

Return the currently active font number


The documentation for this class was generated from the following file: