LLFont Class Reference

#include <llfont.h>

Inheritance diagram for LLFont:

Inheritance graph
[legend]
Collaboration diagram for LLFont:

Collaboration graph
[legend]

List of all members.

Public Types

enum  {
  FIRST_CHAR = 32, NUM_CHARS = 127 - 32, LAST_CHAR_BASIC = 127, NUM_CHARS_FULL = 255 - 32,
  LAST_CHAR_FULL = 255
}

Public Member Functions

 LLFont (LLImageRaw *imagep=NULL)
virtual ~LLFont ()
virtual BOOL loadFace (const std::string &filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback)
void setFallbackFont (LLFontList *fontp)
void setCharToGlyphMap (llwchar wch, U32 glyph_index) const
void setRawImage (LLImageRaw *imagep)
virtual F32 getLineHeight () const
virtual F32 getAscenderHeight () const
virtual F32 getDescenderHeight () const
const LLFontGlyphInfogetMetrics (const llwchar wc) const
F32 getXAdvance (const llwchar wc) const
F32 getXKerning (const llwchar char_left, const llwchar char_right) const

Protected Types

typedef std::map< llwchar,
LLFontGlyphInfo * > 
char_glyph_info_map_t

Protected Member Functions

virtual BOOL hasGlyph (const llwchar wch) const
virtual BOOL addChar (const llwchar wch)
virtual BOOL addGlyph (const llwchar wch, const U32 glyph_index)
virtual BOOL addGlyphFromFont (LLFont *fontp, const llwchar wch, const U32 glyph_index)
virtual LLFontGlyphInfogetGlyphInfo (const llwchar wch) const
void insertGlyphInfo (llwchar wch, LLFontGlyphInfo *gi) const
void renderGlyph (const U32 glyph_index)
void resetBitmap ()
void setSubImageLuminanceAlpha (const U32 x, const U32 y, const U32 width, const U32 height, const U8 *data, S32 stride=0)

Protected Attributes

std::string mName
F32 mAscender
F32 mDescender
F32 mLineHeight
S32 mNumComponents
S32 mBitmapWidth
S32 mBitmapHeight
S32 mMaxCharWidth
S32 mMaxCharHeight
S32 mCurrentOffsetX
S32 mCurrentOffsetY
LLFT_Face mFTFace
BOOL mIsFallback
LLFontListmFallbackFontp
char_glyph_info_map_t mCharGlyphInfoMap
BOOL mValid

Private Attributes

LLPointer< LLImageRawmRawImagep


Detailed Description

Definition at line 94 of file llfont.h.


Member Typedef Documentation

typedef std::map<llwchar, LLFontGlyphInfo*> LLFont::char_glyph_info_map_t [protected]

Definition at line 178 of file llfont.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
FIRST_CHAR 
NUM_CHARS 
LAST_CHAR_BASIC 
NUM_CHARS_FULL 
LAST_CHAR_FULL 

Definition at line 133 of file llfont.h.


Constructor & Destructor Documentation

LLFont::LLFont ( LLImageRaw imagep = NULL  ) 

LLFont::~LLFont (  )  [virtual]

Definition at line 147 of file llfont.cpp.

References mCharGlyphInfoMap, mFTFace, mRawImagep, and NULL.


Member Function Documentation

BOOL LLFont::loadFace ( const std::string &  filename,
const F32  point_size,
const F32  vert_dpi,
const F32  horz_dpi,
const S32  components,
BOOL  is_fallback 
) [virtual]

Reimplemented in LLFontGL.

Definition at line 183 of file llfont.cpp.

References addGlyph(), FALSE, gFTLibrary, LLPointer< Type >::isNull(), llmin(), llround(), mAscender, mBitmapHeight, mBitmapWidth, mCurrentOffsetX, mCurrentOffsetY, mDescender, mFTFace, mIsFallback, mLineHeight, mMaxCharHeight, mMaxCharWidth, mName, mNumComponents, mRawImagep, NULL, S32, and TRUE.

Referenced by LLFontGL::loadFace(), and LLFontGL::loadFaceFallback().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFont::setFallbackFont ( LLFontList fontp  )  [inline]

Definition at line 107 of file llfont.h.

References mFallbackFontp.

Referenced by LLFontGL::loadFace().

Here is the caller graph for this function:

void LLFont::setCharToGlyphMap ( llwchar  wch,
U32  glyph_index 
) const

void LLFont::setRawImage ( LLImageRaw imagep  ) 

Definition at line 160 of file llfont.cpp.

References mRawImagep.

Referenced by LLFontGL::init().

Here is the caller graph for this function:

F32 LLFont::getLineHeight (  )  const [virtual]

Reimplemented in LLFontGL.

Definition at line 166 of file llfont.cpp.

References mLineHeight.

F32 LLFont::getAscenderHeight (  )  const [virtual]

Reimplemented in LLFontGL.

Definition at line 172 of file llfont.cpp.

References mAscender.

F32 LLFont::getDescenderHeight (  )  const [virtual]

Reimplemented in LLFontGL.

Definition at line 178 of file llfont.cpp.

References mDescender.

const LLFontGlyphInfo& LLFont::getMetrics ( const llwchar  wc  )  const

F32 LLFont::getXAdvance ( const llwchar  wc  )  const

F32 LLFont::getXKerning ( const llwchar  char_left,
const llwchar  char_right 
) const

Definition at line 605 of file llfont.cpp.

References get_if_there(), llassert, llverify, mCharGlyphInfoMap, mFTFace, LLFontGlyphInfo::mGlyphIndex, mIsFallback, and NULL.

Referenced by LLFontGL::charFromPixelOffset(), LLFontGL::firstDrawableChar(), LLFontGL::getWidthF32(), LLFontGL::maxDrawableChars(), and LLFontGL::render().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLFont::hasGlyph ( const llwchar  wch  )  const [protected, virtual]

Definition at line 326 of file llfont.cpp.

References FALSE, getGlyphInfo(), llassert, mIsFallback, LLFontGlyphInfo::mIsRendered, and TRUE.

Referenced by LLFontGL::render().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLFont::addChar ( const llwchar  wch  )  [protected, virtual]

Reimplemented in LLFontGL.

Definition at line 340 of file llfont.cpp.

References addGlyph(), addGlyphFromFont(), FALSE, llassert, mCharGlyphInfoMap, mFallbackFontp, mFTFace, mIsFallback, NULL, and TRUE.

Referenced by LLFontGL::addChar().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLFont::addGlyph ( const llwchar  wch,
const U32  glyph_index 
) [protected, virtual]

Definition at line 515 of file llfont.cpp.

References addGlyphFromFont().

Referenced by addChar(), loadFace(), and resetBitmap().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLFont::addGlyphFromFont ( LLFont fontp,
const llwchar  wch,
const U32  glyph_index 
) [protected, virtual]

LLFontGlyphInfo * LLFont::getGlyphInfo ( const llwchar  wch  )  const [protected, virtual]

Definition at line 315 of file llfont.cpp.

References mCharGlyphInfoMap, and NULL.

Referenced by getXAdvance(), hasGlyph(), and LLFontGL::render().

Here is the caller graph for this function:

void LLFont::insertGlyphInfo ( llwchar  wch,
LLFontGlyphInfo gi 
) const [protected]

Definition at line 381 of file llfont.cpp.

References mCharGlyphInfoMap.

Referenced by addGlyphFromFont(), and getXAdvance().

Here is the caller graph for this function:

void LLFont::renderGlyph ( const U32  glyph_index  )  [protected]

Definition at line 592 of file llfont.cpp.

References gFontRenderMode, llassert, mFTFace, and NULL.

Referenced by addGlyphFromFont(), and getXAdvance().

Here is the caller graph for this function:

void LLFont::resetBitmap (  )  [protected]

Definition at line 297 of file llfont.cpp.

References addGlyph(), FALSE, llendl, llinfos, mCharGlyphInfoMap, mCurrentOffsetX, mCurrentOffsetY, and mRawImagep.

Referenced by addGlyphFromFont(), and LLFontGL::reset().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFont::setSubImageLuminanceAlpha ( const U32  x,
const U32  y,
const U32  width,
const U32  height,
const U8 data,
S32  stride = 0 
) [protected]

Definition at line 624 of file llfont.cpp.

References i, j, llassert, mIsFallback, and mRawImagep.

Referenced by addGlyphFromFont().

Here is the caller graph for this function:


Member Data Documentation

std::string LLFont::mName [protected]

Definition at line 160 of file llfont.h.

Referenced by loadFace().

F32 LLFont::mAscender [protected]

F32 LLFont::mDescender [protected]

F32 LLFont::mLineHeight [protected]

Definition at line 163 of file llfont.h.

Referenced by LLFontGL::getLineHeight(), getLineHeight(), LLFont(), loadFace(), and LLFontGL::render().

Definition at line 165 of file llfont.h.

Referenced by addGlyphFromFont(), LLFont(), and loadFace().

Definition at line 166 of file llfont.h.

Referenced by LLFont(), and loadFace().

Definition at line 167 of file llfont.h.

Referenced by addGlyphFromFont(), LLFont(), and loadFace().

Definition at line 168 of file llfont.h.

Referenced by getXAdvance(), LLFont(), and loadFace().

Definition at line 169 of file llfont.h.

Referenced by addGlyphFromFont(), LLFont(), and loadFace().

Definition at line 170 of file llfont.h.

Referenced by addGlyphFromFont(), LLFont(), loadFace(), and resetBitmap().

Definition at line 171 of file llfont.h.

Referenced by addGlyphFromFont(), LLFont(), loadFace(), and resetBitmap().

Definition at line 176 of file llfont.h.

Referenced by addChar(), getXAdvance(), LLFont(), and setFallbackFont().

BOOL LLFont::mValid [protected]

Definition at line 181 of file llfont.h.

Referenced by LLFont().


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

Generated on Fri May 16 08:47:57 2008 for SecondLife by  doxygen 1.5.5