summaryrefslogtreecommitdiff
path: root/indra/llrender/llfontgl.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-09-10 23:31:51 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-09-10 23:31:51 +0300
commit1b66e4673d9779a1c67cfb074bb15c597d1c5779 (patch)
tree1aa96c63f62c9dddec111eee5bb021ced19ea93d /indra/llrender/llfontgl.cpp
parent7d9b7e93ed0a157320ccc86d65f16e7fdfc8fbf1 (diff)
parente241670694959833feaa0e667222b337095eb683 (diff)
MergeMerged in lindenlab/viewer-release
Diffstat (limited to 'indra/llrender/llfontgl.cpp')
-rw-r--r--indra/llrender/llfontgl.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 8cd18c5fa1..86a4c35e6d 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -89,14 +89,24 @@ void LLFontGL::destroyGL()
mFontFreetype->destroyGL();
}
-BOOL LLFontGL::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 components, BOOL is_fallback)
+BOOL LLFontGL::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 components, BOOL is_fallback, S32 face_n)
{
if(mFontFreetype == reinterpret_cast<LLFontFreetype*>(NULL))
{
mFontFreetype = new LLFontFreetype;
}
- return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback);
+ return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback, face_n);
+}
+
+S32 LLFontGL::getNumFaces(const std::string& filename)
+{
+ if (mFontFreetype == reinterpret_cast<LLFontFreetype*>(NULL))
+ {
+ mFontFreetype = new LLFontFreetype;
+ }
+
+ return mFontFreetype->getNumFaces(filename);
}
static LLTrace::BlockTimerStatHandle FTM_RENDER_FONTS("Fonts");
@@ -860,10 +870,6 @@ void LLFontGL::destroyAllGL()
U8 LLFontGL::getStyleFromString(const std::string &style)
{
S32 ret = 0;
- if (style.find("NORMAL") != style.npos)
- {
- ret |= NORMAL;
- }
if (style.find("BOLD") != style.npos)
{
ret |= BOLD;
@@ -883,7 +889,7 @@ U8 LLFontGL::getStyleFromString(const std::string &style)
std::string LLFontGL::getStringFromStyle(U8 style)
{
std::string style_string;
- if (style & NORMAL)
+ if (style == NORMAL)
{
style_string += "|NORMAL";
}