summaryrefslogtreecommitdiff
path: root/indra/llrender/llfontregistry.h
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-04-14 23:17:36 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-04-15 22:27:56 +0300
commit6ee601c642b3a4fa182334eb1ca015d71d6eaedd (patch)
tree08f58a6dd7f430a21b63d87be5b73ed7fbae5508 /indra/llrender/llfontregistry.h
parent45f8e60cb4ec113e0bf07f28f84405e25ba356fd (diff)
#2023 Load from a variable font
WIP, beacsue variable fonts are not yeat included.
Diffstat (limited to 'indra/llrender/llfontregistry.h')
-rw-r--r--indra/llrender/llfontregistry.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llrender/llfontregistry.h b/indra/llrender/llfontregistry.h
index a5fa9f338a..fcbb2667e4 100644
--- a/indra/llrender/llfontregistry.h
+++ b/indra/llrender/llfontregistry.h
@@ -43,21 +43,23 @@ enum class EFontHinting : S32
struct LLFontFileInfo
{
- LLFontFileInfo(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::function<bool(llwchar)>& char_functor = nullptr)
+ LLFontFileInfo(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::function<bool(llwchar)>& char_functor = nullptr)
: FileName(file_name)
, CharFunctor(char_functor)
, mHinting(hinting)
, mFlags(flags)
, mSizeDelta(size_delta)
+ , mWeight(weight)
{
}
- LLFontFileInfo(const LLFontFileInfo& ffi, EFontHinting hinting, S32 flags, F32 size_delta)
+ LLFontFileInfo(const LLFontFileInfo& ffi, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight)
: FileName(ffi.FileName)
, CharFunctor(ffi.CharFunctor)
, mHinting(hinting)
, mFlags(flags)
, mSizeDelta(size_delta)
+ , mWeight(weight)
{
}
@@ -65,6 +67,7 @@ struct LLFontFileInfo
std::function<bool(llwchar)> CharFunctor;
EFontHinting mHinting;
S32 mFlags;
+ S32 mWeight; // -1 - default, whatever is in the file.
// Not all fonts are the same size, Ex: dejavu is bigger than inter,
// so in some cases we want to adjust relative sizes to make characters
@@ -91,10 +94,10 @@ public:
const std::string& getSize() const { return mSize; }
void setSize(const std::string& size) { mSize = size; }
- void addFontFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::string& char_functor = LLStringUtil::null);
+ void addFontFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::string& char_functor = LLStringUtil::null);
const font_file_info_vec_t & getFontFiles() const { return mFontFiles; }
void setFontFiles(const font_file_info_vec_t& font_files) { mFontFiles = font_files; }
- void addFontCollectionFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::string& char_functor = LLStringUtil::null);
+ void addFontCollectionFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::string& char_functor = LLStringUtil::null);
const font_file_info_vec_t& getFontCollectionFiles() const { return mFontCollectionFiles; }
void setFontCollectionFiles(const font_file_info_vec_t& font_collection_files) { mFontCollectionFiles = font_collection_files; }