#include <llfontgl.h>
Public Types | |
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 () |
LLFontGL & | operator= (const LLFontGL &source) |
BOOL | loadFace (const std::string &filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback) |
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 |
LLImageGL * | getImageGL () 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 LLFontGL * | fontFromName (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 void | setFontDisplay (BOOL flag) |
Static Public Attributes | |
static F32 | sVertDPI = 96.f |
static F32 | sHorizDPI = 96.f |
static F32 | sScaleX = 1.f |
static F32 | sScaleY = 1.f |
static BOOL | sDisplayFont = TRUE |
static LLString | sAppDir |
static LLFontGL * | sMonospace = NULL |
static LLFontList * | sMonospaceFallback = NULL |
static LLFontGL * | sSansSerifSmall = NULL |
static LLFontList * | sSSSmallFallback = NULL |
static LLFontGL * | sSansSerif = NULL |
static LLFontList * | sSSFallback = NULL |
static LLFontGL * | sSansSerifBig = NULL |
static LLFontList * | sSSBigFallback = NULL |
static LLFontGL * | sSansSerifHuge = NULL |
static LLFontList * | sSSHugeFallback = NULL |
static LLFontGL * | sSansSerifBold = NULL |
static LLFontList * | sSSBoldFallback = NULL |
static LLColor4 | sShadowColor |
static LLCoordFont | sCurOrigin |
static std::vector< LLCoordFont > | sOriginStack |
Protected Types | |
typedef std::map< llwchar, embedded_data_t * > | embedded_map_t |
Protected Member Functions | |
const embedded_data_t * | getEmbeddedCharData (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< LLImageRaw > | mRawImageGLp |
LLPointer< LLImageGL > | mImageGLp |
embedded_map_t | mEmbeddedChars |
Friends | |
class | LLTextBillboard |
class | LLHUDText |
Classes | |
struct | embedded_data_t |
Definition at line 44 of file llfontgl.h.
typedef std::map<llwchar,embedded_data_t*> LLFontGL::embedded_map_t [protected] |
Definition at line 258 of file llfontgl.h.
enum LLFontGL::HAlign |
enum LLFontGL::VAlign |
enum LLFontGL::StyleFlags |
Definition at line 64 of file llfontgl.h.
LLFontGL::LLFontGL | ( | ) |
Definition at line 126 of file llfontgl.cpp.
References clearEmbeddedChars(), and init().
Referenced by initDefaultFonts().
LLFontGL::LLFontGL | ( | const LLFontGL & | source | ) |
LLFontGL::~LLFontGL | ( | ) |
Definition at line 138 of file llfontgl.cpp.
References clearEmbeddedChars(), mImageGLp, mRawImageGLp, and NULL.
Definition at line 96 of file llfontgl.cpp.
References BOLD, DROP_SHADOW, DROP_SHADOW_SOFT, ITALIC, NORMAL, S32, and UNDERLINE.
Referenced by LLScrollListCtrl::addElement(), and LLTextBox::fromXML().
void LLFontGL::init | ( | void | ) |
Definition at line 145 of file llfontgl.cpp.
References FALSE, LLPointer< Type >::isNull(), mImageGLp, mRawImageGLp, and LLFont::setRawImage().
Referenced by LLFontGL(), and reset().
void LLFontGL::reset | ( | ) |
Definition at line 162 of file llfontgl.cpp.
References init(), and LLFont::resetBitmap().
Referenced by initDefaultFonts().
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 282 of file llfontgl.cpp.
References FALSE, llfloor(), LLFontGL(), loadFace(), loadFaceFallback(), NULL, reset(), sAppDir, sHorizDPI, sMonospace, sMonospaceFallback, sSansSerif, sSansSerifBig, sSansSerifBold, sSansSerifHuge, sSansSerifSmall, sScaleX, sScaleY, sSSBigFallback, sSSBoldFallback, sSSFallback, sSSHugeFallback, sSSSmallFallback, and sVertDPI.
Referenced by LLViewerWindow::initFonts().
void LLFontGL::destroyDefaultFonts | ( | ) | [static] |
Definition at line 464 of file llfontgl.cpp.
References NULL, sMonospace, sMonospaceFallback, sSansSerif, sSansSerifBig, sSansSerifBold, sSansSerifHuge, sSansSerifSmall, sSSBigFallback, sSSBoldFallback, sSSFallback, sSSHugeFallback, and sSSSmallFallback.
Referenced by LLViewerWindow::~LLViewerWindow().
void LLFontGL::destroyGL | ( | ) | [static] |
Definition at line 504 of file llfontgl.cpp.
References mImageGLp, sMonospace, sSansSerif, sSansSerifBig, sSansSerifBold, sSansSerifHuge, and sSansSerifSmall.
Referenced by LLViewerWindow::initFonts(), and LLViewerWindow::stopGL().
bool LLFontGL::loadFaceFallback | ( | LLFontList * | fontp, | |
const LLString & | fontname, | |||
const F32 | point_size | |||
) | [static] |
Definition at line 223 of file llfontgl.cpp.
References LLFontList::addAtEnd(), getFontPathLocal(), getFontPathSystem(), LL_ENDL, LL_INFOS_ONCE, LLFont::LLFont(), LLFont::loadFace(), NULL, sHorizDPI, sVertDPI, and TRUE.
Referenced by initDefaultFonts().
bool LLFontGL::loadFace | ( | LLFontGL * | fontp, | |
const LLString & | fontname, | |||
const F32 | point_size, | |||
LLFontList * | fallback_fontp | |||
) | [static] |
Definition at line 261 of file llfontgl.cpp.
References FALSE, getFontPathLocal(), getFontPathSystem(), LL_ENDL, LL_WARNS, loadFace(), LLFont::setFallbackFont(), sHorizDPI, and sVertDPI.
Referenced by initDefaultFonts(), and loadFace().
BOOL LLFontGL::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 from LLFont.
Definition at line 527 of file llfontgl.cpp.
References FALSE, LLFont::loadFace(), mImageGLp, mRawImageGLp, and TRUE.
S32 LLFontGL::renderUTF8 | ( | const LLString & | text, | |
const S32 | begin_offset, | |||
S32 | x, | |||
S32 | y, | |||
const LLColor4 & | color | |||
) | const [inline] |
Definition at line 105 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().
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 114 of file llfontgl.h.
References FALSE, NULL, renderUTF8(), and S32_MAX.
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 557 of file llfontgl.cpp.
References render(), and utf8str_to_wstring().
S32 LLFontGL::render | ( | const LLWString & | text, | |
const S32 | begin_offset, | |||
F32 | x, | |||
F32 | y, | |||
const LLColor4 & | color | |||
) | const [inline] |
Definition at line 137 of file llfontgl.h.
References BASELINE, FALSE, LEFT, NORMAL, NULL, and S32_MAX.
Referenced by LLProgressView::draw(), LLConsole::draw(), LLScrollListText::draw(), LLMenuItemBranchDownGL::draw(), LLMenuItemGL::draw(), LLLineEditor::draw(), LLButton::draw(), LLTextEditor::drawClippedSegment(), LLTextEditor::drawCursor(), LLTextBox::drawText(), hud_render_text(), render(), and renderUTF8().
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 570 of file llfontgl.cpp.
References BASELINE, LLGLImmediate::begin(), LLImageGL::bind(), LLGLImmediate::blendFunc(), BOLD, BOTTOM, LLColor4::calcHSL(), clamp_rescale(), LLGLImmediate::color4fv(), drawGlyph(), DROP_SHADOW, DROP_SHADOW_SOFT, LLGLImmediate::end(), EXT_KERNING, EXT_X_BEARING, EXT_Y_BEARING, FALSE, LLFastTimer::FTM_RENDER_FONTS, getEmbeddedCharData(), LLFont::getGlyphInfo(), LLImageGL::getHeight(), LLImageGL::getWidth(), getWidthF32(), LLFont::getXKerning(), gGL, LLFont::hasGlyph(), HCENTER, i, LLFont::LAST_CHAR_FULL, LEFT, LLVertexBuffer::LINES, 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, LLGLImmediate::popMatrix(), LLGLImmediate::pushMatrix(), render(), renderUTF8(), RIGHT, S32, S32_MAX, sCurOrigin, sDisplayFont, sScaleX, sScaleY, TOP, LLGLImmediate::translatef(), TRUE, UNDERLINE, utf8str_to_wstring(), VCENTER, LLGLImmediate::vertex2f(), and LLColor4::white.
F32 LLFontGL::getLineHeight | ( | ) | const [inline, virtual] |
Reimplemented from LLFont.
Definition at line 161 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(), LLScrollListText::draw(), LLFloater::draw(), LLTextEditor::drawClippedSegment(), LLTextEditor::drawCursor(), LLViewerWindow::drawMouselookInstructions(), LLTextEditor::drawPreeditMarker(), LLTextEditor::drawSelectionBackground(), LLTextEditor::drawText(), LLTextBox::drawText(), LLWorldMapView::drawTracking(), LLTextEditor::getCursorPosFromLocalCoord(), LLScrollListText::getHeight(), LLFolderViewItem::getItemHeight(), LLFastTimerView::getLegendIndex(), LLMenuItemGL::getNominalHeight(), LLNotifyBox::getNotifyTipRect(), LLTextEditor::getPreeditFontSize(), LLLineEditor::getPreeditFontSize(), LLTextEditor::getPreeditLocation(), LLTextBox::getTextPixelHeight(), LLNotifyBox::LLNotifyBox(), LLTextEditor::LLTextEditor(), LLHUDText::renderText(), LLConsole::reshape(), LLTextEditor::reshape(), LLCheckBoxCtrl::reshape(), LLDragHandleTop::reshapeTitleBox(), LLFolderView::scrollToShowItem(), LLAlertDialog::setCheckBox(), LLUploadDialog::setMessage(), LLFolderView::startRenamingSelectedItem(), and LLHUDText::updateSize().
F32 LLFontGL::getAscenderHeight | ( | ) | const [inline, virtual] |
Reimplemented from LLFont.
Definition at line 162 of file llfontgl.h.
References llround(), LLFont::mAscender, and sScaleY.
F32 LLFontGL::getDescenderHeight | ( | ) | const [inline, virtual] |
Reimplemented from LLFont.
Definition at line 163 of file llfontgl.h.
References llround(), LLFont::mDescender, and sScaleY.
Definition at line 904 of file llfontgl.cpp.
References S32_MAX, and utf8str_to_wstring().
Referenced by LLTabContainer::addTabPanel(), LLToolView::addTool(), LLMenuGL::arrange(), LLScrollListCtrl::calcColumnWidths(), LLTextEditor::changeLine(), LLAlertDialog::createDialog(), LLMemoryView::draw(), LLHoverView::draw(), LLFrameStatView::draw(), LLFolderViewItem::draw(), LLFastTimerView::draw(), LLConsole::draw(), LLScrollListText::draw(), LLMenuItemBranchDownGL::draw(), LLMenuItemGL::draw(), LLLineEditor::draw(), LLViewerWindow::drawMouselookInstructions(), LLTextEditor::drawPreeditMarker(), LLTextEditor::drawSelectionBackground(), LLLineEditor::findPixelNearestPos(), LLSliderCtrl::fromXML(), LLMultiSliderCtrl::fromXML(), LLScrollListText::getContentWidth(), LLMenuItemBranchDownGL::getNominalWidth(), LLMenuItemGL::getNominalWidth(), LLTextEditor::getPreeditLocation(), LLTextBox::getTextPixelWidth(), getWidth(), LLButton::init(), LLMultiSliderCtrl::LLMultiSliderCtrl(), LLSliderCtrl::LLSliderCtrl(), LLFloaterPay::processPayPriceReply(), LLFolderViewItem::refresh(), LLCheckBoxCtrl::reshape(), LLDragHandleTop::reshapeTitleBox(), LLAlertDialog::setCheckBox(), LLLineEditor::setCursor(), LLSliderCtrl::setLabelArg(), LLMultiSliderCtrl::setLabelArg(), LLUploadDialog::setMessage(), LLTabContainer::setPanelTitle(), LLTabContainer::setTabImage(), LLColumnHeader::showList(), and LLTextEditor::updateLineStartList().
Definition at line 910 of file llfontgl.cpp.
References getWidth(), and S32_MAX.
S32 LLFontGL::getWidth | ( | const LLString & | utf8text, | |
const S32 | offset, | |||
const S32 | max_chars | |||
) | const [virtual] |
Definition at line 915 of file llfontgl.cpp.
References getWidth(), and utf8str_to_wstring().
S32 LLFontGL::getWidth | ( | const llwchar * | wchars, | |
const S32 | offset, | |||
const S32 | max_chars, | |||
BOOL | use_embedded = FALSE | |||
) | const [virtual] |
Definition at line 921 of file llfontgl.cpp.
References getWidthF32(), and llround().
Definition at line 927 of file llfontgl.cpp.
References S32_MAX, and utf8str_to_wstring().
Referenced by LLFolderViewItem::draw(), LLTextEditor::drawCursor(), LLWorldMapView::drawTracking(), getEmbeddedCharAdvance(), LLHUDText::LLHUDTextSegment::getWidth(), getWidth(), getWidthF32(), render(), LLManip::renderTickText(), and LLManip::renderTickValue().
Definition at line 933 of file llfontgl.cpp.
References getWidthF32(), and S32_MAX.
F32 LLFontGL::getWidthF32 | ( | const LLString & | text, | |
const S32 | offset, | |||
const S32 | max_chars | |||
) | const [virtual] |
Definition at line 938 of file llfontgl.cpp.
References getWidthF32(), and utf8str_to_wstring().
F32 LLFontGL::getWidthF32 | ( | const llwchar * | wchars, | |
const S32 | offset, | |||
const S32 | max_chars, | |||
BOOL | use_embedded = FALSE | |||
) | const [virtual] |
Definition at line 944 of file llfontgl.cpp.
References EXT_KERNING, getEmbeddedCharAdvance(), getEmbeddedCharData(), LLFont::getXAdvance(), LLFont::getXKerning(), i, LLFont::LAST_CHAR_FULL, llfloor(), NULL, S32, and sScaleX.
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 991 of file llfontgl.cpp.
References EXT_KERNING, 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().
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 1102 of file llfontgl.cpp.
References EXT_KERNING, getEmbeddedCharAdvance(), getEmbeddedCharData(), LLFont::getXAdvance(), LLFont::getXKerning(), i, llfloor(), llmin(), S32, and sScaleX.
Referenced by LLLineEditor::setCursor().
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 1176 of file llfontgl.cpp.
References EXT_KERNING, getEmbeddedCharAdvance(), getEmbeddedCharData(), LLFont::getXAdvance(), LLFont::getXKerning(), i, llfloor(), llmin(), NULL, S32, S32_MAX, and sScaleX.
Referenced by LLTextEditor::changeLine(), LLTextEditor::getCursorPosFromLocalCoord(), and LLLineEditor::setCursorAtLocalPos().
LLImageGL * LLFontGL::getImageGL | ( | ) | const |
Definition at line 1314 of file llfontgl.cpp.
References utf8str_to_wstring().
Referenced by LLEmbeddedItems::bindEmbeddedChars().
void LLFontGL::removeEmbeddedChar | ( | llwchar | wc | ) |
Definition at line 1326 of file llfontgl.cpp.
References mEmbeddedChars.
Referenced by LLEmbeddedItems::unbindEmbeddedChars().
Definition at line 1431 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().
Definition at line 1464 of file llfontgl.cpp.
References NULL.
Referenced by LLView::selectFont().
LLString LLFontGL::nameFromHAlign | ( | LLFontGL::HAlign | align | ) | [static] |
Definition at line 1495 of file llfontgl.cpp.
References HCENTER, LEFT, and RIGHT.
Referenced by LLJoystick::getXML(), LLTextBox::getXML(), and LLButton::getXML().
LLFontGL::HAlign LLFontGL::hAlignFromName | ( | const LLString & | name | ) | [static] |
Definition at line 1504 of file llfontgl.cpp.
References HCENTER, LEFT, and RIGHT.
Referenced by LLButton::fromXML(), and LLView::selectFontHAlign().
LLString LLFontGL::nameFromVAlign | ( | LLFontGL::VAlign | align | ) | [static] |
LLFontGL::VAlign LLFontGL::vAlignFromName | ( | const LLString & | name | ) | [static] |
Definition at line 1534 of file llfontgl.cpp.
References BASELINE, BOTTOM, TOP, and VCENTER.
Referenced by LLView::selectFontVAlign().
static void LLFontGL::setFontDisplay | ( | BOOL | flag | ) | [inline, static] |
Definition at line 207 of file llfontgl.h.
References sDisplayFont.
Referenced by LLViewerWindow::thumbnailSnapshot().
const LLFontGL::embedded_data_t * LLFontGL::getEmbeddedCharData | ( | const llwchar | wch | ) | const [protected] |
Definition at line 1281 of file llfontgl.cpp.
References mEmbeddedChars, and NULL.
Referenced by charFromPixelOffset(), firstDrawableChar(), getWidthF32(), maxDrawableChars(), and render().
F32 LLFontGL::getEmbeddedCharAdvance | ( | const embedded_data_t * | ext_data | ) | const [protected] |
Definition at line 1293 of file llfontgl.cpp.
References EXT_X_BEARING, LLImageGL::getWidth(), getWidthF32(), LLFontGL::embedded_data_t::mImage, LLFontGL::embedded_data_t::mLabel, and sScaleX.
Referenced by charFromPixelOffset(), firstDrawableChar(), getWidthF32(), and maxDrawableChars().
void LLFontGL::clearEmbeddedChars | ( | ) | [protected] |
Definition at line 1308 of file llfontgl.cpp.
References mEmbeddedChars.
Referenced by LLFontGL(), and ~LLFontGL().
void LLFontGL::renderQuad | ( | const LLRectf & | screen_rect, | |
const LLRectf & | uv_rect, | |||
F32 | slant_amt | |||
) | const [protected] |
Definition at line 1337 of file llfontgl.cpp.
References gGL, llfont_round_x(), llfont_round_y(), LLRectBase< Type >::mBottom, LLRectBase< Type >::mLeft, LLRectBase< Type >::mRight, LLRectBase< Type >::mTop, LLGLImmediate::texCoord2f(), and LLGLImmediate::vertex2f().
Referenced by drawGlyph().
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 1356 of file llfontgl.cpp.
References LLGLImmediate::begin(), BOLD, BOLD_OFFSET, LLGLImmediate::color4fv(), DROP_SHADOW, DROP_SHADOW_SOFT, DROP_SHADOW_SOFT_STRENGTH, LLGLImmediate::end(), gGL, ITALIC, LLFont::mAscender, LLColor4::mV, LLVertexBuffer::QUADS, renderQuad(), S32, sShadowColor, LLRectBase< Type >::translate(), and VALPHA.
Referenced by render().
Reimplemented from LLFont.
Definition at line 541 of file llfontgl.cpp.
References LLFont::addChar(), FALSE, mImageGLp, mRawImageGLp, stop_glerror, and TRUE.
LLString LLFontGL::getFontPathLocal | ( | ) | [static, protected] |
Definition at line 202 of file llfontgl.cpp.
Referenced by loadFace(), and loadFaceFallback().
LLString LLFontGL::getFontPathSystem | ( | ) | [static, protected] |
Definition at line 169 of file llfontgl.cpp.
References llendl, llformat(), llwarns, and NULL.
Referenced by loadFace(), and loadFaceFallback().
friend class LLTextBillboard [friend] |
Definition at line 247 of file llfontgl.h.
friend class LLHUDText [friend] |
Definition at line 248 of file llfontgl.h.
F32 LLFontGL::sVertDPI = 96.f [static] |
Definition at line 223 of file llfontgl.h.
Referenced by initDefaultFonts(), loadFace(), and loadFaceFallback().
F32 LLFontGL::sHorizDPI = 96.f [static] |
Definition at line 224 of file llfontgl.h.
Referenced by initDefaultFonts(), loadFace(), and loadFaceFallback().
F32 LLFontGL::sScaleX = 1.f [static] |
Definition at line 225 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 226 of file llfontgl.h.
Referenced by getAscenderHeight(), getDescenderHeight(), getLineHeight(), hud_render_text(), initDefaultFonts(), and render().
BOOL LLFontGL::sDisplayFont = TRUE [static] |
LLString LLFontGL::sAppDir [static] |
LLFontGL * LLFontGL::sMonospace = NULL [static] |
Definition at line 230 of file llfontgl.h.
Referenced by destroyDefaultFonts(), destroyGL(), LLDebugText::draw(), LLVelocityBar::draw(), LLGLTexMemBar::draw(), LLTextureBar::draw(), LLStatBar::draw(), LLMemoryView::draw(), LLFrameStatView::draw(), LLFastTimerView::draw(), LLFastTimerView::getLegendIndex(), initDefaultFonts(), LLFloaterTestImpl::LLFloaterTestImpl(), LLGLTexMemBar::LLGLTexMemBar(), LLResMgr::LLResMgr(), nameFromFont(), and LLConsole::setFontSize().
LLFontList * LLFontGL::sMonospaceFallback = NULL [static] |
Definition at line 231 of file llfontgl.h.
Referenced by destroyDefaultFonts(), and initDefaultFonts().
LLFontGL * LLFontGL::sSansSerifSmall = NULL [static] |
Definition at line 233 of file llfontgl.h.
Referenced by LLPieMenu::append(), LLPieMenu::appendPieMenu(), LLPieMenu::appendSeparator(), LLScrollListCtrl::calcColumnWidths(), destroyDefaultFonts(), destroyGL(), LLWorldMapView::draw(), LLView::drawDebugRect(), LLWorldMapView::drawTracking(), LLSliderCtrl::fromXML(), LLMultiSliderCtrl::fromXML(), initDefaultFonts(), LLColorSwatchCtrl::LLColorSwatchCtrl(), LLComboBox::LLComboBox(), LLFloaterEditUI::LLFloaterEditUI(), LLFloaterTestImpl::LLFloaterTestImpl(), LLLineEditor::LLLineEditor(), LLNotifyBox::LLNotifyBox(), LLResMgr::LLResMgr(), LLTextureCtrl::LLTextureCtrl(), nameFromFont(), LLStatusBar::refresh(), LLColumnHeader::showList(), and LLComboBox::updateLayout().
LLFontList * LLFontGL::sSSSmallFallback = NULL [static] |
Definition at line 234 of file llfontgl.h.
Referenced by destroyDefaultFonts(), and initDefaultFonts().
LLFontGL * LLFontGL::sSansSerif = NULL [static] |
Definition at line 235 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(), LLVOAvatar::idleUpdate(), LLButton::init(), LLTabContainer::initButtons(), initDefaultFonts(), LLFloaterScriptDebugOutput::initFloater(), LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(), LLFloaterTestImpl::LLFloaterTestImpl(), LLGroupNotifyBox::LLGroupNotifyBox(), LLNotifyBox::LLNotifyBox(), LLResMgr::LLResMgr(), LLScrollbar::LLScrollbar(), LLSpinCtrl::LLSpinCtrl(), LLTextEditor::LLTextEditor(), nameFromFont(), LLPanelLandObjects::processParcelObjectOwnersReply(), LLViewerObject::processUpdateMessage(), LLTracker::renderBeacon(), LLManipTranslate::renderSnapGuides(), LLManipScale::renderSnapGuides(), LLViewerObject::setDebugText(), LLButton::setFont(), and LLConsole::setFontSize().
LLFontList * LLFontGL::sSSFallback = NULL [static] |
Definition at line 236 of file llfontgl.h.
Referenced by destroyDefaultFonts(), and initDefaultFonts().
LLFontGL * LLFontGL::sSansSerifBig = NULL [static] |
Definition at line 237 of file llfontgl.h.
Referenced by destroyDefaultFonts(), destroyGL(), LLViewerWindow::draw(), LLVOAvatar::idleUpdate(), initDefaultFonts(), LLResMgr::LLResMgr(), nameFromFont(), and LLConsole::setFontSize().
LLFontList * LLFontGL::sSSBigFallback = NULL [static] |
Definition at line 238 of file llfontgl.h.
Referenced by destroyDefaultFonts(), and initDefaultFonts().
LLFontGL * LLFontGL::sSansSerifHuge = NULL [static] |
Definition at line 239 of file llfontgl.h.
Referenced by destroyDefaultFonts(), destroyGL(), initDefaultFonts(), LLGroupNotifyBox::LLGroupNotifyBox(), nameFromFont(), and LLConsole::setFontSize().
LLFontList * LLFontGL::sSSHugeFallback = NULL [static] |
Definition at line 240 of file llfontgl.h.
Referenced by destroyDefaultFonts(), and initDefaultFonts().
LLFontGL * LLFontGL::sSansSerifBold = NULL [static] |
Definition at line 242 of file llfontgl.h.
Referenced by destroyDefaultFonts(), destroyGL(), initDefaultFonts(), and nameFromFont().
LLFontList * LLFontGL::sSSBoldFallback = NULL [static] |
Definition at line 243 of file llfontgl.h.
Referenced by destroyDefaultFonts(), and initDefaultFonts().
LLColor4 LLFontGL::sShadowColor [static] |
LLPointer<LLImageRaw> LLFontGL::mRawImageGLp [protected] |
Definition at line 256 of file llfontgl.h.
Referenced by addChar(), init(), loadFace(), and ~LLFontGL().
LLPointer<LLImageGL> LLFontGL::mImageGLp [protected] |
Definition at line 257 of file llfontgl.h.
Referenced by addChar(), destroyGL(), getImageGL(), init(), loadFace(), render(), and ~LLFontGL().
embedded_map_t LLFontGL::mEmbeddedChars [protected] |
Definition at line 259 of file llfontgl.h.
Referenced by clearEmbeddedChars(), getEmbeddedCharData(), and removeEmbeddedChar().
LLCoordFont LLFontGL::sCurOrigin [static] |
Definition at line 262 of file llfontgl.h.
Referenced by LLWebBrowserCtrl::draw(), gl_rect_2d_offset_local(), LLUI::loadIdentity(), LLUI::popMatrix(), LLUI::pushMatrix(), render(), render_ui_2d(), and LLUI::translate().
std::vector< LLCoordFont > LLFontGL::sOriginStack [static] |