Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7269f7a
viewer#2023 Google Inter
akleshchev Aug 8, 2023
ce45474
viewer#2023 Google Inter #2
akleshchev Feb 17, 2025
2cd88c6
Update accordion ctrl; change default selection color
maxim-productengine Aug 21, 2025
b03a92c
Update icons textures
maxim-productengine Sep 1, 2025
e7a72f8
Update floater title, checkbox and combobox textures
maxim-productengine Sep 3, 2025
047b4b5
Update button, scroll and slider widgets
maxim-productengine Sep 4, 2025
6c00bf0
More texture updates
maxim-productengine Sep 5, 2025
6499c24
More texture updates #2
maxim-productengine Sep 8, 2025
d224e0a
More texture updates #3; change selected font color to black
maxim-productengine Sep 9, 2025
0842bca
More UI changes and updates: friend name color; worn items color; log…
maxim-productengine Sep 11, 2025
fb8cb8f
Update search fields texture; change menu selection color
maxim-productengine Aug 25, 2025
1073444
Merge branch 'release/2025.07' into maxim/2025.07-Flat-UI
Geenz Sep 15, 2025
624eaf5
viewer#2023 Google Inter #3
akleshchev Sep 19, 2025
a58abda
Merge branch develop into project/fonts-update
akleshchev Nov 25, 2025
a377ec3
Merge branch 'release/2026.01' into maxim/2025.07-Flat-UI
maxim-productengine Dec 4, 2025
0b7c83c
Permit vertically adjusting label position in inventory
akleshchev Jan 13, 2026
e4a079e
Merge branch 'develop' into project/flat-ui-fonts-update
maxim-productengine Jan 15, 2026
5daa320
Merge branch 'project/fonts-update' into project/flat-ui-fonts-update
maxim-productengine Jan 15, 2026
92dc2af
Expose floater's header font to XUI
akleshchev Jan 22, 2026
3431903
Restore DejaVuSans as a fallback, but alter size
akleshchev Jan 26, 2026
d8884d5
Steeltoe's XUI changes
akleshchev Jan 31, 2026
2ddaffa
Make floater tools use Dejavu with old font size
akleshchev Jan 31, 2026
2707c5b
More XUI adjustments for fonts work
akleshchev Feb 5, 2026
04fbae2
Login button update and other color adjustments
maxim-productengine Feb 5, 2026
35f94f7
Adjust buttons and lists for font size being larger
akleshchev Feb 6, 2026
b58e2e6
UI controls adjustments and selection color update
maxim-productengine Feb 9, 2026
3d0e923
Make floater tools use Dejavu with old font size #2
akleshchev Feb 9, 2026
e39bddb
Increase height of Group inspect
maxim-productengine Feb 10, 2026
8e9a718
Floaters and UI controls adjustments
maxim-productengine Feb 12, 2026
aa4ad2e
Floaters and UI controls adjustments #2
maxim-productengine Feb 24, 2026
e9c4c1a
Merge branch 'release/2026.02' into maxim/flat-ui-fonts-update
maxim-productengine Feb 25, 2026
8ecbce9
Update fonts package.
Geenz Mar 8, 2026
1b9c85d
Merge branch 'release/2026.02' into project/Flat_UI
Geenz Mar 8, 2026
e3b28fd
#5462 Login form update
maxim-productengine Mar 5, 2026
f3c0dd2
#5515 restore Inventory favorite color
maxim-productengine Mar 10, 2026
d86a85b
#5516 Increase default width for Inventory floater
maxim-productengine Mar 11, 2026
76d8316
#5521 Don't use the old shaded button texture
maxim-productengine Mar 11, 2026
777c768
#5462 Login form update #2
maxim-productengine Mar 15, 2026
157f4f1
#5462 update bg color
maxim-productengine Mar 16, 2026
0ab59c0
#5462 update button and menu colors
maxim-productengine Mar 17, 2026
a89a1e8
#5462 Login form update #3
maxim-productengine Mar 18, 2026
1dca8b3
Merge branch project/Flat_UI into maxim/login_form_update
maxim-productengine Mar 18, 2026
1bd6893
Merge pull request #5509 from secondlife/maxim/login_form_update
maxim-productengine Mar 18, 2026
a8ba250
#5557 adjust buttons position when hiding grid selector (#5559)
maxim-productengine Mar 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions autobuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2482,6 +2482,40 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>description</key>
<string>Viewer fonts</string>
</map>
<key>google-fonts</key>
<map>
<key>platforms</key>
<map>
<key>common</key>
<map>
<key>archive</key>
<map>
<key>creds</key>
<string>github</string>
<key>hash</key>
<string>9bd007dd70635d85d716ca00484cefa700cdb6f0</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://api.github.com/repos/secondlife/3p-google-fonts/releases/assets/365756469</string>
</map>
<key>name</key>
<string>common</string>
</map>
</map>
<key>license</key>
<string>SIL Open Font License, Version 1.1</string>
<key>license_file</key>
<string>LICENSES/google_inter.txt</string>
<key>copyright</key>
<string>Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)</string>
<key>version</key>
<string>1.0.0.22606339007</string>
<key>name</key>
<string>google-fonts</string>
<key>description</key>
<string>Google fonts</string>
</map>
<key>viewer-manager</key>
<map>
<key>platforms</key>
Expand Down
1 change: 1 addition & 0 deletions indra/cmake/ViewerMiscLibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ use_prebuilt_binary(slvoice)

use_prebuilt_binary(nanosvg)
use_prebuilt_binary(viewer-fonts)
use_prebuilt_binary(google-fonts)
use_prebuilt_binary(emoji_shortcodes)
29 changes: 24 additions & 5 deletions indra/llrender/llfontfreetype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ LLFontFreetype::LLFontFreetype()
mDescender(0.f),
mLineHeight(0.f),
mIsFallback(false),
mHinting(EFontHinting::FORCE_AUTOHINT),
mFTFace(nullptr),
mRenderGlyphCount(0),
mStyle(0),
Expand All @@ -164,7 +165,7 @@ LLFontFreetype::~LLFontFreetype()
// mFallbackFonts cleaned up by LLPointer destructor
}

bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n)
bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags)
{
// Don't leak face objects. This is also needed to deal with
// changed font file names.
Expand All @@ -188,6 +189,8 @@ bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
return false;

mIsFallback = is_fallback;
mHinting = hinting;
mFontFlags = flags;
F32 pixels_per_em = (point_size / 72.f)*vert_dpi; // Size in inches * dpi

error = FT_Set_Char_Size(mFTFace, /* handle to face object */
Expand Down Expand Up @@ -243,6 +246,12 @@ bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
{
mStyle |= LLFontGL::BOLD;
}
else if (flags & LLFontGL::BOLD)
{
// FontGL applies programmatic bolding to fonts that are a part of 'bold' descriptor but don't have the bold style set.
// Ex: Inter SemiBold doesn't have FT_STYLE_FLAG_BOLD and without this style it would be bolded programmatically.
mStyle |= LLFontGL::BOLD;
}

if(mFTFace->style_flags & FT_STYLE_FLAG_ITALIC)
{
Expand Down Expand Up @@ -350,7 +359,12 @@ F32 LLFontFreetype::getXKerning(llwchar char_left, llwchar char_right) const

llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta));

return delta.x*(1.f/64.f);
if (mFTFace->face_flags & FT_FACE_FLAG_SCALABLE)
{
// Return the X advance
return (F32)(delta.x * (1.0 / 64.0));
}
return (F32)delta.x;
}

F32 LLFontFreetype::getXKerning(const LLFontGlyphInfo* left_glyph_info, const LLFontGlyphInfo* right_glyph_info) const
Expand All @@ -365,7 +379,12 @@ F32 LLFontFreetype::getXKerning(const LLFontGlyphInfo* left_glyph_info, const LL

llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta));

return delta.x*(1.f/64.f);
if (mFTFace->face_flags & FT_FACE_FLAG_SCALABLE)
{
// Return the X advance
return (F32)(delta.x * (1.0 / 64.0));
}
return (F32)delta.x;
}

bool LLFontFreetype::hasGlyph(llwchar wch) const
Expand Down Expand Up @@ -635,7 +654,7 @@ void LLFontFreetype::renderGlyph(EFontGlyphType bitmap_type, U32 glyph_index, ll
if (mFTFace == nullptr)
return;

FT_Int32 load_flags = FT_LOAD_FORCE_AUTOHINT;
FT_Int32 load_flags = (FT_Int32)mHinting;
if (EFontGlyphType::Color == bitmap_type)
{
// We may not actually get a color render so our caller should always examine mFTFace->glyph->bitmap.pixel_mode
Expand Down Expand Up @@ -678,7 +697,7 @@ void LLFontFreetype::renderGlyph(EFontGlyphType bitmap_type, U32 glyph_index, ll
void LLFontFreetype::reset(F32 vert_dpi, F32 horz_dpi)
{
resetBitmapCache();
loadFace(mName, mPointSize, vert_dpi ,horz_dpi, mIsFallback, 0);
loadFace(mName, mPointSize, vert_dpi ,horz_dpi, mIsFallback, 0, mHinting, mFontFlags);
if (!mIsFallback)
{
// This is the head of the list - need to rebuild ourself and all fallbacks.
Expand Down
11 changes: 9 additions & 2 deletions indra/llrender/llfontfreetype.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ struct FT_FaceRec_;
typedef struct FT_FaceRec_* LLFT_Face;
struct FT_StreamRec_;
typedef struct FT_StreamRec_ LLFT_Stream;
enum class EFontHinting : S32;

namespace ll
{
Expand Down Expand Up @@ -100,7 +101,7 @@ class LLFontFreetype : public LLRefCount

// is_fallback should be true for fallback fonts that aren't used
// to render directly (Unicode backup, primarily)
bool loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n);
bool loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags);

S32 getNumFaces(const std::string& filename);

Expand Down Expand Up @@ -164,7 +165,11 @@ class LLFontFreetype : public LLRefCount
bool setSubImageBGRA(U32 x, U32 y, U32 bitmap_num, U16 width, U16 height, const U8* data, U32 stride) const;
bool hasGlyph(llwchar wch) const; // Has a glyph for this character
LLFontGlyphInfo* addGlyph(llwchar wch, EFontGlyphType glyph_type) const; // Add a new character to the font if necessary
LLFontGlyphInfo* addGlyphFromFont(const LLFontFreetype *fontp, llwchar wch, U32 glyph_index, EFontGlyphType bitmap_type) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found)
LLFontGlyphInfo* addGlyphFromFont(
const LLFontFreetype *fontp,
llwchar wch,
U32 glyph_index,
EFontGlyphType bitmap_type) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found)
void renderGlyph(EFontGlyphType bitmap_type, U32 glyph_index, llwchar wch) const;
void insertGlyphInfo(llwchar wch, LLFontGlyphInfo* gi) const;

Expand All @@ -180,6 +185,8 @@ class LLFontFreetype : public LLRefCount
LLFT_Face mFTFace;

bool mIsFallback;
EFontHinting mHinting;
S32 mFontFlags;
typedef std::pair<LLPointer<LLFontFreetype>, char_functor_t> fallback_font_t;
typedef std::vector<fallback_font_t> fallback_font_vector_t;
fallback_font_vector_t mFallbackFonts; // A list of fallback fonts to look for glyphs in (for Unicode chars)
Expand Down
4 changes: 2 additions & 2 deletions indra/llrender/llfontgl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ void LLFontGL::destroyGL()
mFontFreetype->destroyGL();
}

bool LLFontGL::loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n)
bool LLFontGL::loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags)
{
if(mFontFreetype == reinterpret_cast<LLFontFreetype*>(NULL))
{
mFontFreetype = new LLFontFreetype;
}

return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, is_fallback, face_n);
return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, is_fallback, face_n, hinting, flags);
}

S32 LLFontGL::getNumFaces(const std::string& filename)
Expand Down
2 changes: 1 addition & 1 deletion indra/llrender/llfontgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class LLFontGL

void destroyGL();

bool loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n);
bool loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags);

S32 getNumFaces(const std::string& filename);
S32 getCacheGeneration() const;
Expand Down
58 changes: 49 additions & 9 deletions indra/llrender/llfontregistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,16 @@ LLFontDescriptor LLFontDescriptor::normalize() const
return LLFontDescriptor(new_name,new_size,new_style, getFontFiles(), getFontCollectionFiles());
}

void LLFontDescriptor::addFontFile(const std::string& file_name, const std::string& char_functor)
void LLFontDescriptor::addFontFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::string& char_functor)
{
char_functor_map_t::const_iterator it = mCharFunctors.find(char_functor);
mFontFiles.push_back(LLFontFileInfo(file_name, (mCharFunctors.end() != it) ? it->second : nullptr));
mFontFiles.push_back(LLFontFileInfo(file_name, hinting, flags, size_delta, (mCharFunctors.end() != it) ? it->second : nullptr));
}

void LLFontDescriptor::addFontCollectionFile(const std::string& file_name, const std::string& char_functor)
void LLFontDescriptor::addFontCollectionFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::string& char_functor)
{
char_functor_map_t::const_iterator it = mCharFunctors.find(char_functor);
mFontCollectionFiles.push_back(LLFontFileInfo(file_name, (mCharFunctors.end() != it) ? it->second : nullptr));
mFontCollectionFiles.push_back(LLFontFileInfo(file_name, hinting, flags, size_delta, (mCharFunctors.end() != it) ? it->second : nullptr));
}

LLFontRegistry::LLFontRegistry(bool create_gl_textures)
Expand Down Expand Up @@ -289,23 +289,63 @@ bool font_desc_init_from_xml(LLXMLNodePtr node, LLFontDescriptor& desc)
{
std::string font_file_name = child->getTextContents();
std::string char_functor;
EFontHinting hinting = EFontHinting::FORCE_AUTOHINT;
S32 flags = 0;

if (child->hasAttribute("functor"))
{
child->getAttributeString("functor", char_functor);
}

if (child->hasAttribute("font_hinting"))
{
std::string attr_hinting;
child->getAttributeString("font_hinting", attr_hinting);
LLStringUtil::toLower(attr_hinting);

if (attr_hinting == "default")
{
hinting = EFontHinting::DEFAULT;
}
else if (attr_hinting == "force_auto")
{
hinting = EFontHinting::FORCE_AUTOHINT;
}
else if (attr_hinting == "no_hinting")
{
hinting = EFontHinting::NO_HINTING;
}
}

if (child->hasAttribute("flags"))
{
std::string attr_flags;
child->getAttributeString("flags", attr_flags);
LLStringUtil::toLower(attr_flags);

if (attr_flags == "bold")
{
flags |= LLFontGL::BOLD;
}
}

F32 size_delta = 0.f;
if (child->hasAttribute("size_delta"))
{
child->getAttributeF32("size_delta", size_delta);
}

if (child->hasAttribute("load_collection"))
{
bool col = false;
child->getAttributeBOOL("load_collection", col);
if (col)
{
desc.addFontCollectionFile(font_file_name, char_functor);
desc.addFontCollectionFile(font_file_name, hinting, flags, size_delta, char_functor);
}
}

desc.addFontFile(font_file_name, char_functor);
desc.addFontFile(font_file_name, hinting, flags, size_delta, char_functor);
}
else if (child->hasName("os"))
{
Expand Down Expand Up @@ -462,7 +502,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
// Add ultimate fallback list - generated dynamically on linux,
// null elsewhere.
std::transform(getUltimateFallbackList().begin(), getUltimateFallbackList().end(), std::back_inserter(font_files),
[](const std::string& file_name) { return LLFontFileInfo(file_name); });
[](const std::string& file_name) { return LLFontFileInfo(file_name, EFontHinting::FORCE_AUTOHINT, 0, 0.f); });

// Load fonts based on names.
if (font_files.empty())
Expand Down Expand Up @@ -517,8 +557,8 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
{
fontp = new LLFontGL;
}
if (fontp->loadFace(font_path, point_size_scale,
LLFontGL::sVertDPI, LLFontGL::sHorizDPI, is_fallback, i))
if (fontp->loadFace(font_path, point_size_scale + font_file_it->mSizeDelta,
LLFontGL::sVertDPI, LLFontGL::sHorizDPI, is_fallback, i, font_file_it->mHinting, font_file_it->mFlags))
{
is_font_loaded = true;
if (is_first_found)
Expand Down
28 changes: 24 additions & 4 deletions indra/llrender/llfontregistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,42 @@ class LLFontGL;

typedef std::vector<std::string> string_vec_t;

enum class EFontHinting : S32
{
DEFAULT = 0,
NO_HINTING = 0x8000U,
FORCE_AUTOHINT = 0x20,
};

struct LLFontFileInfo
{
LLFontFileInfo(const std::string& file_name, const std::function<bool(llwchar)>& char_functor = nullptr)
LLFontFileInfo(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::function<bool(llwchar)>& char_functor = nullptr)
: FileName(file_name)
, CharFunctor(char_functor)
, mHinting(hinting)
, mFlags(flags)
, mSizeDelta(size_delta)
{
}

LLFontFileInfo(const LLFontFileInfo& ffi)
LLFontFileInfo(const LLFontFileInfo& ffi, EFontHinting hinting, S32 flags, F32 size_delta)
: FileName(ffi.FileName)
, CharFunctor(ffi.CharFunctor)
, mHinting(hinting)
, mFlags(flags)
, mSizeDelta(size_delta)
{
}

std::string FileName;
std::function<bool(llwchar)> CharFunctor;
EFontHinting mHinting;
S32 mFlags;

// 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
// from different files match.
F32 mSizeDelta;
};
typedef std::vector<LLFontFileInfo> font_file_info_vec_t;

Expand All @@ -71,10 +91,10 @@ class LLFontDescriptor
const std::string& getSize() const { return mSize; }
void setSize(const std::string& size) { mSize = size; }

void addFontFile(const std::string& file_name, const std::string& char_functor = LLStringUtil::null);
void addFontFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, 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, const std::string& char_functor = LLStringUtil::null);
void addFontCollectionFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, 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; }

Expand Down
2 changes: 1 addition & 1 deletion indra/llui/llaccordionctrltab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static const std::string DD_BUTTON_NAME = "dd_button";
static const std::string DD_TEXTBOX_NAME = "dd_textbox";
static const std::string DD_HEADER_NAME = "dd_header";

static const S32 HEADER_HEIGHT = 23;
static const S32 HEADER_HEIGHT = 25;
static const S32 HEADER_IMAGE_LEFT_OFFSET = 5;
static const S32 HEADER_TEXT_LEFT_OFFSET = 30;
static const F32 AUTO_OPEN_TIME = 1.f;
Expand Down
Loading
Loading