LLInitParam/LLUI Params enhancement
Specialized param handling for common linden types And pre-viewer-interesting modernized llinitparam.* (includes llsdparam.cpp update)
This commit is contained in:
@@ -1046,6 +1046,13 @@ std::string LLFontGL::nameFromFont(const LLFontGL* fontp)
|
||||
return fontp->getFontDesc().getName();
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
std::string LLFontGL::sizeFromFont(const LLFontGL* fontp)
|
||||
{
|
||||
return fontp->getFontDesc().getSize();
|
||||
}
|
||||
|
||||
// static
|
||||
std::string LLFontGL::nameFromHAlign(LLFontGL::HAlign align)
|
||||
{
|
||||
@@ -1162,6 +1169,41 @@ LLFontGL* LLFontGL::getFont(const LLFontDescriptor& desc)
|
||||
return sFontRegistry->getFont(desc);
|
||||
}
|
||||
|
||||
// static
|
||||
LLFontGL* LLFontGL::getFontByName(const std::string& name)
|
||||
{
|
||||
// check for most common fonts first
|
||||
if (name == "SANSSERIF")
|
||||
{
|
||||
return getFontSansSerif();
|
||||
}
|
||||
else if (name == "SANSSERIF_SMALL")
|
||||
{
|
||||
return getFontSansSerifSmall();
|
||||
}
|
||||
else if (name == "SANSSERIF_BIG")
|
||||
{
|
||||
return getFontSansSerifBig();
|
||||
}
|
||||
else if (name == "SMALL" || name == "OCRA")
|
||||
{
|
||||
// *BUG: Should this be "MONOSPACE"? Do we use "OCRA" anymore?
|
||||
// Does "SMALL" mean "SERIF"?
|
||||
return getFontMonospace();
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
LLFontGL* LLFontGL::getFontDefault()
|
||||
{
|
||||
return getFontSansSerif(); // Fallback to sans serif as default font
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
std::string LLFontGL::getFontPathSystem()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user