LLFontGL Class Reference

#include <llfontgl.h>

Inheritance diagram for LLFontGL:

Inheritance graph
[legend]
Collaboration diagram for LLFontGL:

Collaboration graph
[legend]
List of all members.

Public Types

 LEFT = 0
 RIGHT = 1
 HCENTER = 2
 TOP = 3
 VCENTER = 4
 BASELINE = 5
 BOTTOM = 6
 NORMAL = 0
 BOLD = 1
 ITALIC = 2
 UNDERLINE = 4
 DROP_SHADOW = 8
 DROP_SHADOW_SOFT = 16
enum  HAlign { LEFT = 0, RIGHT = 1, HCENTER = 2 }
enum  VAlign { TOP = 3, VCENTER = 4, BASELINE = 5, BOTTOM = 6 }
enum  StyleFlags {
  NORMAL = 0, BOLD = 1, ITALIC = 2, UNDERLINE = 4,
  DROP_SHADOW = 8, DROP_SHADOW_SOFT = 16
}

Public Member Functions

 LLFontGL ()
 LLFontGL (const LLFontGL &source)
 ~LLFontGL ()
void init ()
void reset ()
LLFontGLoperator= (const LLFontGL &source)
BOOL loadFace (const LLString &filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi)
S32 renderUTF8 (const LLString &text, const S32 begin_offset, S32 x, S32 y, const LLColor4 &color) const
S32 renderUTF8 (const LLString &text, const S32 begin_offset, S32 x, S32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style=NORMAL) const
S32 renderUTF8 (const LLString &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, S32 max_chars, S32 max_pixels, F32 *right_x, BOOL use_ellipses) const
S32 render (const LLWString &text, const S32 begin_offset, F32 x, F32 y, const LLColor4 &color) const
S32 render (const LLWString &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign=LEFT, VAlign valign=BASELINE, U8 style=NORMAL, S32 max_chars=S32_MAX, S32 max_pixels=S32_MAX, F32 *right_x=NULL, BOOL use_embedded=FALSE, BOOL use_ellipses=FALSE) const
F32 getLineHeight () const
F32 getAscenderHeight () const
F32 getDescenderHeight () const
virtual S32 getWidth (const LLString &utf8text) const
virtual S32 getWidth (const llwchar *wchars) const
virtual S32 getWidth (const LLString &utf8text, const S32 offset, const S32 max_chars) const
virtual S32 getWidth (const llwchar *wchars, const S32 offset, const S32 max_chars, BOOL use_embedded=FALSE) const
virtual F32 getWidthF32 (const LLString &utf8text) const
virtual F32 getWidthF32 (const llwchar *wchars) const
virtual F32 getWidthF32 (const LLString &text, const S32 offset, const S32 max_chars) const
virtual F32 getWidthF32 (const llwchar *wchars, const S32 offset, const S32 max_chars, BOOL use_embedded=FALSE) const
virtual S32 maxDrawableChars (const llwchar *wchars, F32 max_pixels, S32 max_chars=S32_MAX, BOOL end_on_word_boundary=FALSE, const BOOL use_embedded=FALSE, F32 *drawn_pixels=NULL) const
virtual S32 firstDrawableChar (const llwchar *wchars, F32 max_pixels, S32 text_len, S32 start_pos=S32_MAX, S32 max_chars=S32_MAX) const
virtual S32 charFromPixelOffset (const llwchar *wchars, const S32 char_offset, F32 x, F32 max_pixels=F32_MAX, S32 max_chars=S32_MAX, BOOL round=TRUE, BOOL use_embedded=FALSE) const
LLImageGLgetImageGL () const
void addEmbeddedChar (llwchar wc, LLImageGL *image, const LLString &label)
void addEmbeddedChar (llwchar wc, LLImageGL *image, const LLWString &label)
void removeEmbeddedChar (llwchar wc)

Static Public Member Functions

static U8 getStyleFromString (const LLString &style)
static BOOL initDefaultFonts (F32 screen_dpi, F32 x_scale, F32 y_scale, const LLString &monospace_file, F32 monospace_size, const LLString &sansserif_file, const LLString &sansserif_fallback_file, F32 ss_fallback_scale, F32 small_size, F32 medium_size, F32 large_size, F32 huge_size, const LLString &sansserif_bold_file, F32 bold_size, const LLString &app_dir=LLString::null)
static void destroyDefaultFonts ()
static void destroyGL ()
static bool loadFaceFallback (LLFontList *fontp, const LLString &fontname, const F32 point_size)
static bool loadFace (LLFontGL *fontp, const LLString &fontname, const F32 point_size, LLFontList *fallback_fontp)
static LLString nameFromFont (const LLFontGL *fontp)
static LLFontGLfontFromName (const LLString &name)
static LLString nameFromHAlign (LLFontGL::HAlign align)
static LLFontGL::HAlign hAlignFromName (const LLString &name)
static LLString nameFromVAlign (LLFontGL::VAlign align)
static LLFontGL::VAlign vAlignFromName (const LLString &name)

Static Public Attributes

static F32 sVertDPI = 96.f
static F32 sHorizDPI = 96.f
static F32 sScaleX = 1.f
static F32 sScaleY = 1.f
static LLString sAppDir
static LLFontGLsMonospace = NULL
static LLFontGLsSansSerifSmall = NULL
static LLFontListsSSSmallFallback = NULL
static LLFontGLsSansSerif = NULL
static LLFontListsSSFallback = NULL
static LLFontGLsSansSerifBig = NULL
static LLFontListsSSBigFallback = NULL
static LLFontGLsSansSerifHuge = NULL
static LLFontListsSSHugeFallback = NULL
static LLFontGLsSansSerifBold = NULL
static LLFontListsSSBoldFallback = NULL
static LLColor4 sShadowColor
static LLCoordFont sCurOrigin
static std::vector< LLCoordFontsOriginStack

Protected Types

typedef std::map< llwchar,
embedded_data_t * > 
embedded_map_t

Protected Member Functions

const embedded_data_tgetEmbeddedCharData (const llwchar wch) const
F32 getEmbeddedCharAdvance (const embedded_data_t *ext_data) const
void clearEmbeddedChars ()
void renderQuad (const LLRectf &screen_rect, const LLRectf &uv_rect, F32 slant_amt) const
void drawGlyph (const LLRectf &screen_rect, const LLRectf &uv_rect, const LLColor4 &color, U8 style, F32 drop_shadow_fade) const
BOOL addChar (const llwchar wch)

Static Protected Member Functions

static LLString getFontPathLocal ()
static LLString getFontPathSystem ()

Protected Attributes

LLPointer< LLImageRawmRawImageGLp
LLPointer< LLImageGLmImageGLp
embedded_map_t mEmbeddedChars

Friends

class LLTextBillboard
class LLHUDText

Classes

struct  embedded_data_t

Detailed Description

Definition at line 44 of file llfontgl.h.


Member Typedef Documentation

typedef std::map<llwchar,embedded_data_t*> LLFontGL::embedded_map_t [protected]

Definition at line 252 of file llfontgl.h.


Member Enumeration Documentation

enum LLFontGL::HAlign

Enumerator:
LEFT 
RIGHT 
HCENTER 

Definition at line 47 of file llfontgl.h.

enum LLFontGL::StyleFlags

Enumerator:
NORMAL 
BOLD 
ITALIC 
UNDERLINE 
DROP_SHADOW 
DROP_SHADOW_SOFT 

Definition at line 64 of file llfontgl.h.

enum LLFontGL::VAlign

Enumerator:
TOP 
VCENTER 
BASELINE 
BOTTOM 

Definition at line 55 of file llfontgl.h.


Constructor & Destructor Documentation

LLFontGL::LLFontGL (  ) 

Definition at line 123 of file llfontgl.cpp.

References clearEmbeddedChars(), and init().

Referenced by initDefaultFonts().

LLFontGL::LLFontGL ( const LLFontGL source  ) 

Definition at line 130 of file llfontgl.cpp.

References llendl, and llerrs.

LLFontGL::~LLFontGL (  ) 

Definition at line 135 of file llfontgl.cpp.

References clearEmbeddedChars(), mImageGLp, mRawImageGLp, and NULL.


Member Function Documentation

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

Reimplemented from LLFont.

Definition at line 519 of file llfontgl.cpp.

References LLFont::addChar(), FALSE, mImageGLp, mRawImageGLp, stop_glerror, and TRUE.

void LLFontGL::addEmbeddedChar ( llwchar  wc,
LLImageGL image,
const LLWString label 
)

Definition at line 1293 of file llfontgl.cpp.

References mEmbeddedChars.

void LLFontGL::addEmbeddedChar ( llwchar  wc,
LLImageGL image,
const LLString label 
)

Definition at line 1287 of file llfontgl.cpp.

References utf8str_to_wstring().

S32 LLFontGL::charFromPixelOffset ( const llwchar wchars,
const S32  char_offset,
F32  x,
F32  max_pixels = F32_MAX,
S32  max_chars = S32_MAX,
BOOL  round = TRUE,
BOOL  use_embedded = FALSE 
) const [virtual]

Definition at line 1149 of file llfontgl.cpp.

References EXT_KERNING, f, getEmbeddedCharAdvance(), getEmbeddedCharData(), LLFont::getXAdvance(), LLFont::getXKerning(), i, llfloor(), llmin(), NULL, S32, S32_MAX, and sScaleX.

Referenced by LLTextEditor::changeLine(), LLTextEditor::getCursorPosFromLocalCoord(), and LLLineEditor::setCursorAtLocalPos().

void LLFontGL::clearEmbeddedChars (  )  [protected]

Definition at line 1281 of file llfontgl.cpp.

References mEmbeddedChars.

Referenced by LLFontGL(), and ~LLFontGL().

void LLFontGL::destroyDefaultFonts (  )  [static]

Definition at line 447 of file llfontgl.cpp.

References NULL, sMonospace, sSansSerif, sSansSerifBig, sSansSerifBold, sSansSerifHuge, sSansSerifSmall, sSSBigFallback, sSSBoldFallback, sSSFallback, sSSHugeFallback, and sSSSmallFallback.

Referenced by LLViewerWindow::~LLViewerWindow().

void LLFontGL::destroyGL (  )  [static]

Definition at line 484 of file llfontgl.cpp.

References mImageGLp, sMonospace, sSansSerif, sSansSerifBig, sSansSerifBold, sSansSerifHuge, and sSansSerifSmall.

Referenced by LLViewerWindow::initFonts(), and LLViewerWindow::stopGL().

void LLFontGL::drawGlyph ( const LLRectf screen_rect,
const LLRectf uv_rect,
const LLColor4 color,
U8  style,
F32  drop_shadow_fade 
) const [protected]

Definition at line 1329 of file llfontgl.cpp.

References BOLD, BOLD_OFFSET, DROP_SHADOW, DROP_SHADOW_SOFT, DROP_SHADOW_SOFT_STRENGTH, f, glBegin, glColor4fv, glEnd, ITALIC, LLFont::mAscender, LLColor4::mV, renderQuad(), S32, sShadowColor, LLRectBase< Type >::translate(), and VALPHA.

Referenced by render().

S32 LLFontGL::firstDrawableChar ( const llwchar wchars,
F32  max_pixels,
S32  text_len,
S32  start_pos = S32_MAX,
S32  max_chars = S32_MAX 
) const [virtual]

Definition at line 1075 of file llfontgl.cpp.

References EXT_KERNING, f, getEmbeddedCharAdvance(), getEmbeddedCharData(), LLFont::getXAdvance(), LLFont::getXKerning(), i, llfloor(), llmin(), S32, sScaleX, and start.

Referenced by LLLineEditor::setCursor().

LLFontGL * LLFontGL::fontFromName ( const LLString name  )  [static]

Definition at line 1437 of file llfontgl.cpp.

References font_name, NULL, sMonospace, sSansSerif, sSansSerifBig, sSansSerifBold, sSansSerifHuge, and sSansSerifSmall.

Referenced by LLView::selectFont().

F32 LLFontGL::getAscenderHeight (  )  const [inline, virtual]

Reimplemented from LLFont.

Definition at line 160 of file llfontgl.h.

References llround(), LLFont::mAscender, and sScaleY.

F32 LLFontGL::getDescenderHeight (  )  const [inline, virtual]

Reimplemented from LLFont.

Definition at line 161 of file llfontgl.h.

References llround(), LLFont::mDescender, and sScaleY.

F32 LLFontGL::getEmbeddedCharAdvance ( const embedded_data_t ext_data  )  const [protected]

Definition at line 1266 of file llfontgl.cpp.

References EXT_X_BEARING, LLImageGL::getWidth(), getWidthF32(), gExtCharFont, LLFontGL::embedded_data_t::mImage, LLFontGL::embedded_data_t::mLabel, and sScaleX.

Referenced by charFromPixelOffset(), firstDrawableChar(), getWidthF32(), and maxDrawableChars().

const LLFontGL::embedded_data_t * LLFontGL::getEmbeddedCharData ( const llwchar  wch  )  const [protected]

Definition at line 1254 of file llfontgl.cpp.

References mEmbeddedChars, and NULL.

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

LLString LLFontGL::getFontPathLocal (  )  [static, protected]

Definition at line 199 of file llfontgl.cpp.

References sAppDir.

Referenced by loadFace(), and loadFaceFallback().

LLString LLFontGL::getFontPathSystem (  )  [static, protected]

Definition at line 166 of file llfontgl.cpp.

References llendl, llformat(), llwarns, and NULL.

Referenced by loadFace(), and loadFaceFallback().

LLImageGL * LLFontGL::getImageGL (  )  const

Definition at line 872 of file llfontgl.cpp.

References mImageGLp.

F32 LLFontGL::getLineHeight (  )  const [inline, virtual]

Reimplemented from LLFont.

Definition at line 159 of file llfontgl.h.

References llround(), LLFont::mLineHeight, and sScaleY.

Referenced by LLToolView::addTool(), LLFolderView::arrange(), LLAlertDialog::createDialog(), LLHoverView::draw(), LLFrameStatView::draw(), LLFolderView::draw(), LLFolderViewItem::draw(), LLConsole::draw(), LLTextEditor::drawClippedSegment(), LLTextEditor::drawCursor(), LLViewerWindow::drawMouselookInstructions(), LLTextEditor::drawSelectionBackground(), LLTextEditor::drawText(), LLTextBox::drawText(), LLScrollListText::drawToWidth(), LLWorldMapView::drawTracking(), LLTextEditor::getCursorPosFromLocalCoord(), LLScrollListText::getHeight(), LLFolderViewItem::getItemHeight(), LLMenuItemGL::getNominalHeight(), LLNotifyBox::getNotifyTipRect(), LLTextBox::getTextPixelHeight(), LLNotifyBox::LLNotifyBox(), LLTextEditor::LLTextEditor(), LLHUDText::renderText(), LLTextEditor::reshape(), LLConsole::reshape(), LLCheckBoxCtrl::reshape(), LLDragHandleTop::reshapeTitleBox(), LLFolderView::scrollToShowItem(), LLAlertDialog::setCheckBox(), LLUploadDialog::setMessage(), LLFolderView::startRenamingSelectedItem(), and LLHUDText::updateSize().

U8 LLFontGL::getStyleFromString ( const LLString style  )  [static]

Definition at line 93 of file llfontgl.cpp.

References BOLD, DROP_SHADOW, DROP_SHADOW_SOFT, ITALIC, NORMAL, S32, and UNDERLINE.

Referenced by LLScrollListCtrl::addElement(), and LLTextBox::fromXML().

S32 LLFontGL::getWidth ( const llwchar wchars,
const S32  offset,
const S32  max_chars,
BOOL  use_embedded = FALSE 
) const [virtual]

Definition at line 894 of file llfontgl.cpp.

References getWidthF32(), llround(), and width.

S32 LLFontGL::getWidth ( const LLString utf8text,
const S32  offset,
const S32  max_chars 
) const [virtual]

Definition at line 888 of file llfontgl.cpp.

References getWidth(), and utf8str_to_wstring().

S32 LLFontGL::getWidth ( const llwchar wchars  )  const [virtual]

Definition at line 883 of file llfontgl.cpp.

References getWidth(), and S32_MAX.

S32 LLFontGL::getWidth ( const LLString utf8text  )  const [virtual]

Definition at line 877 of file llfontgl.cpp.

References S32_MAX, and utf8str_to_wstring().

Referenced by LLTabContainer::addTabPanel(), LLToolView::addTool(), LLMenuGL::arrange(), LLTextEditor::changeLine(), LLAlertDialog::createDialog(), LLMenuItemBranchDownGL::draw(), LLMenuItemGL::draw(), LLMemoryView::draw(), LLLineEditor::draw(), LLHoverView::draw(), LLFrameStatView::draw(), LLFolderViewItem::draw(), LLFastTimerView::draw(), LLConsole::draw(), LLViewerWindow::drawMouselookInstructions(), LLTextEditor::drawSelectionBackground(), LLScrollListText::drawToWidth(), LLLineEditor::findPixelNearestPos(), LLSliderCtrl::fromXML(), LLMenuItemBranchDownGL::getNominalWidth(), LLMenuItemGL::getNominalWidth(), LLTextBox::getTextPixelWidth(), getWidth(), LLButton::init(), LLSliderCtrl::LLSliderCtrl(), LLFloaterPay::processPayPriceReply(), LLFolderViewItem::refresh(), LLCheckBoxCtrl::reshape(), LLDragHandleTop::reshapeTitleBox(), LLAlertDialog::setCheckBox(), LLLineEditor::setCursor(), LLSliderCtrl::setLabelArg(), LLUploadDialog::setMessage(), LLTabContainer::setPanelTitle(), LLTabContainer::setTabImage(), LLColumnHeader::showList(), LLTextEditor::updateLineStartList(), and LLScrollListCtrl::updateMaxContentWidth().

F32 LLFontGL::getWidthF32 ( const llwchar wchars,
const S32  offset,
const S32  max_chars,
BOOL  use_embedded = FALSE 
) const [virtual]

Definition at line 917 of file llfontgl.cpp.

References EXT_KERNING, f, getEmbeddedCharAdvance(), getEmbeddedCharData(), LLFont::getXAdvance(), LLFont::getXKerning(), i, LLFont::LAST_CHAR_FULL, llfloor(), NULL, S32, and sScaleX.

F32 LLFontGL::getWidthF32 ( const LLString text,
const S32  offset,
const S32  max_chars 
) const [virtual]

Definition at line 911 of file llfontgl.cpp.

References getWidthF32(), and utf8str_to_wstring().

F32 LLFontGL::getWidthF32 ( const llwchar wchars  )  const [virtual]

Definition at line 906 of file llfontgl.cpp.

References getWidthF32(), and S32_MAX.

F32 LLFontGL::getWidthF32 ( const LLString utf8text  )  const [virtual]

Definition at line 900 of file llfontgl.cpp.

References S32_MAX, and utf8str_to_wstring().

Referenced by LLMenuItemBranchDownGL::draw(), LLFolderViewItem::draw(), LLTextEditor::drawCursor(), LLWorldMapView::drawTracking(), getEmbeddedCharAdvance(), LLHUDText::LLHUDTextSegment::getWidth(), getWidth(), getWidthF32(), LLHUDConnector::render(), render(), LLManip::renderTickText(), and LLManip::renderTickValue().

LLFontGL::HAlign LLFontGL::hAlignFromName ( const LLString name  )  [static]

Definition at line 1477 of file llfontgl.cpp.

References HCENTER, LEFT, and RIGHT.

Referenced by LLButton::fromXML(), and LLView::selectFontHAlign().

void LLFontGL::init (  ) 

Definition at line 142 of file llfontgl.cpp.

References FALSE, LLPointer< Type >::isNull(), mImageGLp, mRawImageGLp, and LLFont::setRawImage().

Referenced by LLFontGL(), and reset().

BOOL LLFontGL::initDefaultFonts ( F32  screen_dpi,
F32  x_scale,
F32  y_scale,
const LLString monospace_file,
F32  monospace_size,
const LLString sansserif_file,
const LLString sansserif_fallback_file,
F32  ss_fallback_scale,
F32  small_size,
F32  medium_size,
F32  large_size,
F32  huge_size,
const LLString sansserif_bold_file,
F32  bold_size,
const LLString app_dir = LLString::null 
) [static]

Definition at line 279 of file llfontgl.cpp.

References FALSE, llfloor(), LLFontGL(), loadFace(), loadFaceFallback(), NULL, reset(), sAppDir, sHorizDPI, sMonospace, sSansSerif, sSansSerifBig, sSansSerifBold, sSansSerifHuge, sSansSerifSmall, sScaleX, sScaleY, sSSBigFallback, sSSBoldFallback, sSSFallback, sSSHugeFallback, sSSSmallFallback, and sVertDPI.

Referenced by LLViewerWindow::initFonts().

BOOL LLFontGL::loadFace ( const LLString filename,
const F32  point_size,
const F32  vert_dpi,
const F32  horz_dpi 
)

Definition at line 507 of file llfontgl.cpp.

References FALSE, LLFont::loadFace(), mImageGLp, mRawImageGLp, and TRUE.

bool LLFontGL::loadFace ( LLFontGL fontp,
const LLString fontname,
const F32  point_size,
LLFontList fallback_fontp 
) [static]

Definition at line 258 of file llfontgl.cpp.

References getFontPathLocal(), getFontPathSystem(), llendl, llwarns, loadFace(), LLFont::setFallbackFont(), sHorizDPI, and sVertDPI.

Referenced by initDefaultFonts(), and loadFace().

bool LLFontGL::loadFaceFallback ( LLFontList fontp,
const LLString fontname,
const F32  point_size 
) [static]

Definition at line 220 of file llfontgl.cpp.

References LLFontList::addAtEnd(), getFontPathLocal(), getFontPathSystem(), llendl, LLFont::LLFont(), llwarns, NULL, sHorizDPI, sVertDPI, and TRUE.

Referenced by initDefaultFonts().

S32 LLFontGL::maxDrawableChars ( const llwchar wchars,
F32  max_pixels,
S32  max_chars = S32_MAX,
BOOL  end_on_word_boundary = FALSE,
const BOOL  use_embedded = FALSE,
F32 drawn_pixels = NULL 
) const [virtual]

Definition at line 964 of file llfontgl.cpp.

References EXT_KERNING, f, FALSE, getEmbeddedCharAdvance(), getEmbeddedCharData(), LLFont::getXAdvance(), LLFont::getXKerning(), i, llassert, llceil(), llfloor(), NULL, S32, sScaleX, and TRUE.

Referenced by LLHUDText::addLine(), LLConsole::addQueuedLines(), LLProgressView::draw(), LLNotifyBox::getNotifyTipRect(), LLLineEditor::setCursor(), LLHUDText::setLabel(), LLTextBox::setWrappedText(), and LLTextEditor::updateLineStartList().

LLString LLFontGL::nameFromFont ( const LLFontGL fontp  )  [static]

Definition at line 1404 of file llfontgl.cpp.

References sMonospace, sSansSerif, sSansSerifBig, sSansSerifBold, sSansSerifHuge, and sSansSerifSmall.

Referenced by LLTextEditor::getXML(), LLTextBox::getXML(), LLLineEditor::getXML(), LLCheckBoxCtrl::getXML(), and LLButton::getXML().

LLString LLFontGL::nameFromHAlign ( LLFontGL::HAlign  align  )  [static]

Definition at line 1468 of file llfontgl.cpp.

References HCENTER, LEFT, and RIGHT.

Referenced by LLTextBox::getXML(), LLJoystick::getXML(), and LLButton::getXML().

LLString LLFontGL::nameFromVAlign ( LLFontGL::VAlign  align  )  [static]

Definition at line 1497 of file llfontgl.cpp.

References BASELINE, BOTTOM, TOP, and VCENTER.

LLFontGL & LLFontGL::operator= ( const LLFontGL source  ) 

Definition at line 501 of file llfontgl.cpp.

References llendl, and llerrs.

void LLFontGL::removeEmbeddedChar ( llwchar  wc  ) 

Definition at line 1299 of file llfontgl.cpp.

References mEmbeddedChars.

S32 LLFontGL::render ( const LLWString text,
S32  begin_offset,
F32  x,
F32  y,
const LLColor4 color,
HAlign  halign = LEFT,
VAlign  valign = BASELINE,
U8  style = NORMAL,
S32  max_chars = S32_MAX,
S32  max_pixels = S32_MAX,
F32 right_x = NULL,
BOOL  use_embedded = FALSE,
BOOL  use_ellipses = FALSE 
) const

Definition at line 548 of file llfontgl.cpp.

References BASELINE, LLImageGL::bind(), BOLD, BOTTOM, LLColor4::calcHSL(), clamp_rescale(), drawGlyph(), DROP_SHADOW, DROP_SHADOW_SOFT, EXT_KERNING, EXT_X_BEARING, EXT_Y_BEARING, f, FALSE, LLFastTimer::FTM_RENDER_FONTS, getEmbeddedCharData(), LLFont::getGlyphInfo(), LLImageGL::getHeight(), LLImageGL::getWidth(), getWidthF32(), LLFont::getXKerning(), gExtCharFont, glBegin, glBlendFunc, glColor4fv, glEnd, glPopMatrix, glTranslatef, glVertex2f, LLFont::hasGlyph(), HCENTER, i, LLFont::LAST_CHAR_FULL, LEFT, llceil(), llendl, llerrs, llfloor(), llmax(), llmin(), llround(), LLFont::mAscender, LLFont::mDescender, LLFontGlyphInfo::mHeight, LLFontGL::embedded_data_t::mImage, mImageGLp, LLFontGL::embedded_data_t::mLabel, LLFont::mLineHeight, LLColor4::mV, LLFontGlyphInfo::mWidth, LLCoord::mX, LLFontGlyphInfo::mXAdvance, LLFontGlyphInfo::mXBearing, LLFontGlyphInfo::mXBitmapOffset, LLCoord::mY, LLFontGlyphInfo::mYAdvance, LLFontGlyphInfo::mYBearing, LLFontGlyphInfo::mYBitmapOffset, LLCoordFont::mZ, NORMAL, NULL, PAD_AMT, PIXEL_CORRECTION_DISTANCE, render(), renderUTF8(), RIGHT, S32, S32_MAX, sCurOrigin, sSansSerif, sSansSerifBold, sScaleX, sScaleY, t, TOP, TRUE, UNDERLINE, utf8str_to_wstring(), VCENTER, and LLColor4::white.

S32 LLFontGL::render ( const LLWString text,
const S32  begin_offset,
F32  x,
F32  y,
const LLColor4 color 
) const [inline]

Definition at line 135 of file llfontgl.h.

References BASELINE, FALSE, LEFT, NORMAL, NULL, and S32_MAX.

Referenced by LLProgressView::draw(), LLMenuItemBranchDownGL::draw(), LLMenuItemGL::draw(), LLLineEditor::draw(), LLConsole::draw(), LLButton::draw(), LLTextEditor::drawClippedSegment(), LLTextEditor::drawCursor(), LLTextBox::drawText(), LLScrollListText::drawToWidth(), hud_render_text(), render(), and renderUTF8().

void LLFontGL::renderQuad ( const LLRectf screen_rect,
const LLRectf uv_rect,
F32  slant_amt 
) const [protected]

Definition at line 1310 of file llfontgl.cpp.

References glVertex2f, llfont_round_x(), llfont_round_y(), LLRectBase< Type >::mBottom, LLRectBase< Type >::mLeft, LLRectBase< Type >::mRight, and LLRectBase< Type >::mTop.

Referenced by drawGlyph().

S32 LLFontGL::renderUTF8 ( const LLString text,
S32  begin_offset,
F32  x,
F32  y,
const LLColor4 color,
HAlign  halign,
VAlign  valign,
U8  style,
S32  max_chars,
S32  max_pixels,
F32 right_x,
BOOL  use_ellipses 
) const

Definition at line 535 of file llfontgl.cpp.

References render(), and utf8str_to_wstring().

S32 LLFontGL::renderUTF8 ( const LLString text,
const S32  begin_offset,
S32  x,
S32  y,
const LLColor4 color,
HAlign  halign,
VAlign  valign,
U8  style = NORMAL 
) const [inline]

Definition at line 112 of file llfontgl.h.

References FALSE, NULL, renderUTF8(), and S32_MAX.

S32 LLFontGL::renderUTF8 ( const LLString text,
const S32  begin_offset,
S32  x,
S32  y,
const LLColor4 color 
) const [inline]

Definition at line 103 of file llfontgl.h.

References BASELINE, FALSE, LEFT, NORMAL, NULL, and S32_MAX.

Referenced by LLWorldMapView::draw(), LLViewerWindow::draw(), LLDebugText::draw(), LLVelocityBar::draw(), LLGLTexMemBar::draw(), LLTextureBar::draw(), LLStatBar::draw(), LLProgressView::draw(), LLPreviewTexture::draw(), LLPanelInventory::draw(), LLMemoryView::draw(), LLHoverView::draw(), LLFrameStatView::draw(), LLFolderView::draw(), LLFolderViewItem::draw(), LLFastTimerView::draw(), LLContainerView::draw(), LLView::drawDebugRect(), LLWorldMapView::drawIconName(), LLViewerWindow::drawMouselookInstructions(), LLWorldMapView::drawTracking(), render(), and renderUTF8().

void LLFontGL::reset (  ) 

Definition at line 159 of file llfontgl.cpp.

References init(), and LLFont::resetBitmap().

Referenced by initDefaultFonts().

LLFontGL::VAlign LLFontGL::vAlignFromName ( const LLString name  )  [static]

Definition at line 1507 of file llfontgl.cpp.

References BASELINE, BOTTOM, TOP, and VCENTER.

Referenced by LLView::selectFontVAlign().


Friends And Related Function Documentation

friend class LLHUDText [friend]

Definition at line 242 of file llfontgl.h.

friend class LLTextBillboard [friend]

Definition at line 241 of file llfontgl.h.


Member Data Documentation

embedded_map_t LLFontGL::mEmbeddedChars [protected]

Definition at line 253 of file llfontgl.h.

Referenced by addEmbeddedChar(), clearEmbeddedChars(), getEmbeddedCharData(), and removeEmbeddedChar().

LLPointer<LLImageGL> LLFontGL::mImageGLp [protected]

Definition at line 251 of file llfontgl.h.

Referenced by addChar(), destroyGL(), getImageGL(), init(), loadFace(), render(), and ~LLFontGL().

LLPointer<LLImageRaw> LLFontGL::mRawImageGLp [protected]

Definition at line 250 of file llfontgl.h.

Referenced by addChar(), init(), loadFace(), and ~LLFontGL().

LLString LLFontGL::sAppDir [static]

Definition at line 223 of file llfontgl.h.

Referenced by getFontPathLocal(), and initDefaultFonts().

LLCoordFont LLFontGL::sCurOrigin [static]

Definition at line 256 of file llfontgl.h.

Referenced by gl_rect_2d_offset_local(), LLLocalClipRect::LLLocalClipRect(), LLUI::loadIdentity(), LLUI::popMatrix(), LLUI::pushMatrix(), render(), render_ui_2d(), LLUI::setScissorRegionLocal(), and LLUI::translate().

F32 LLFontGL::sHorizDPI = 96.f [static]

Definition at line 220 of file llfontgl.h.

Referenced by initDefaultFonts(), loadFace(), and loadFaceFallback().

LLFontGL * LLFontGL::sMonospace = NULL [static]

Definition at line 225 of file llfontgl.h.

Referenced by destroyDefaultFonts(), destroyGL(), LLDebugText::draw(), LLVelocityBar::draw(), LLGLTexMemBar::draw(), LLTextureBar::draw(), LLStatBar::draw(), LLMemoryView::draw(), LLFrameStatView::draw(), LLFastTimerView::draw(), fontFromName(), LLFastTimerView::getLegendIndex(), initDefaultFonts(), LLFloaterTestImpl::LLFloaterTestImpl(), LLGLTexMemBar::LLGLTexMemBar(), LLResMgr::LLResMgr(), nameFromFont(), and LLConsole::setFontSize().

std::vector< LLCoordFont > LLFontGL::sOriginStack [static]

Definition at line 257 of file llfontgl.h.

Referenced by LLUI::popMatrix(), and LLUI::pushMatrix().

LLFontGL * LLFontGL::sSansSerif = NULL [static]

Definition at line 229 of file llfontgl.h.

Referenced by LLToolPlacerPanel::addButton(), LLToolView::addTool(), LLMenuGL::arrange(), LLFloater::buildButtons(), LLAlertDialog::createDialog(), destroyDefaultFonts(), destroyGL(), LLProgressView::draw(), LLPreviewTexture::draw(), LLPanelInventory::draw(), LLWorldMapView::drawIconName(), fontFromName(), LLVOAvatar::idleUpdate(), LLFloaterScriptDebugOutput::init(), LLButton::init(), LLTabContainer::initButtons(), initDefaultFonts(), LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(), LLFloaterTestImpl::LLFloaterTestImpl(), LLGroupNotifyBox::LLGroupNotifyBox(), LLNotifyBox::LLNotifyBox(), LLResMgr::LLResMgr(), LLScrollbar::LLScrollbar(), LLSpinCtrl::LLSpinCtrl(), LLTextEditor::LLTextEditor(), nameFromFont(), LLPanelLandObjects::processParcelObjectOwnersReply(), LLViewerObject::processUpdateMessage(), LLHUDConnector::render(), render(), LLTracker::renderBeacon(), LLManipTranslate::renderSnapGuides(), LLManipScale::renderSnapGuides(), LLViewerObject::setDebugText(), LLButton::setFont(), and LLConsole::setFontSize().

LLFontGL * LLFontGL::sSansSerifBig = NULL [static]

Definition at line 231 of file llfontgl.h.

Referenced by destroyDefaultFonts(), destroyGL(), LLViewerWindow::draw(), fontFromName(), LLVOAvatar::idleUpdate(), initDefaultFonts(), LLResMgr::LLResMgr(), nameFromFont(), and LLConsole::setFontSize().

LLFontGL * LLFontGL::sSansSerifBold = NULL [static]

Definition at line 236 of file llfontgl.h.

Referenced by destroyDefaultFonts(), destroyGL(), fontFromName(), initDefaultFonts(), nameFromFont(), and render().

LLFontGL * LLFontGL::sSansSerifHuge = NULL [static]

Definition at line 233 of file llfontgl.h.

Referenced by destroyDefaultFonts(), destroyGL(), fontFromName(), initDefaultFonts(), LLGroupNotifyBox::LLGroupNotifyBox(), nameFromFont(), and LLConsole::setFontSize().

LLFontGL * LLFontGL::sSansSerifSmall = NULL [static]

Definition at line 227 of file llfontgl.h.

Referenced by LLPieMenu::append(), LLPieMenu::appendMenu(), LLPieMenu::appendSeparator(), destroyDefaultFonts(), destroyGL(), LLWorldMapView::draw(), LLView::drawDebugRect(), LLWorldMapView::drawTracking(), fontFromName(), LLSliderCtrl::fromXML(), initDefaultFonts(), LLColorSwatchCtrl::LLColorSwatchCtrl(), LLComboBox::LLComboBox(), LLFloaterEditUI::LLFloaterEditUI(), LLFloaterTestImpl::LLFloaterTestImpl(), LLLineEditor::LLLineEditor(), LLNotifyBox::LLNotifyBox(), LLResMgr::LLResMgr(), LLTextBox::LLTextBox(), LLTextureCtrl::LLTextureCtrl(), nameFromFont(), LLStatusBar::refresh(), LLComboBox::setAllowTextEntry(), LLColumnHeader::showList(), and LLScrollListCtrl::updateMaxContentWidth().

F32 LLFontGL::sScaleX = 1.f [static]

Definition at line 221 of file llfontgl.h.

Referenced by charFromPixelOffset(), firstDrawableChar(), getEmbeddedCharAdvance(), getWidthF32(), hud_render_text(), initDefaultFonts(), maxDrawableChars(), and render().

F32 LLFontGL::sScaleY = 1.f [static]

Definition at line 222 of file llfontgl.h.

Referenced by getAscenderHeight(), getDescenderHeight(), getLineHeight(), hud_render_text(), initDefaultFonts(), and render().

LLColor4 LLFontGL::sShadowColor [static]

Definition at line 239 of file llfontgl.h.

Referenced by drawGlyph(), and LLUI::initClass().

LLFontList * LLFontGL::sSSBigFallback = NULL [static]

Definition at line 232 of file llfontgl.h.

Referenced by destroyDefaultFonts(), and initDefaultFonts().

LLFontList * LLFontGL::sSSBoldFallback = NULL [static]

Definition at line 237 of file llfontgl.h.

Referenced by destroyDefaultFonts(), and initDefaultFonts().

LLFontList * LLFontGL::sSSFallback = NULL [static]

Definition at line 230 of file llfontgl.h.

Referenced by destroyDefaultFonts(), and initDefaultFonts().

LLFontList * LLFontGL::sSSHugeFallback = NULL [static]

Definition at line 234 of file llfontgl.h.

Referenced by destroyDefaultFonts(), and initDefaultFonts().

LLFontList * LLFontGL::sSSSmallFallback = NULL [static]

Definition at line 228 of file llfontgl.h.

Referenced by destroyDefaultFonts(), and initDefaultFonts().

F32 LLFontGL::sVertDPI = 96.f [static]

Definition at line 219 of file llfontgl.h.

Referenced by initDefaultFonts(), loadFace(), and loadFaceFallback().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:22 2010 for Second Life Viewer by  doxygen 1.4.7