From 05566ce7a7e1895a5b3ab2f9df2587dac63429e1 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 27 Oct 2019 16:41:38 +0200 Subject: Font debugging aid to dump descriptors + individual textures --- indra/llrender/llfontgl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llrender/llfontgl.h') diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index 10891faed9..b1a433f97d 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -163,6 +163,10 @@ public: static void initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::string& app_dir, bool create_gl_textures = true); + void dumpTextures(); + static void dumpFonts(); + static void dumpFontTextures(); + // Load sans-serif, sans-serif-small, etc. // Slow, requires multiple seconds to load fonts. static bool loadDefaultFonts(); -- cgit v1.2.3 From 9cfdb278de30e4a22d5d38fd08305fd40a905d80 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 28 Oct 2019 23:40:41 +0200 Subject: Support for COLR/CPAL fonts --- indra/llrender/llfontgl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llrender/llfontgl.h') diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index b1a433f97d..5028ccc770 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -87,7 +87,7 @@ public: void destroyGL(); - BOOL loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback, S32 face_n = 0); + BOOL loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool use_color, bool is_fallback, S32 face_n); S32 getNumFaces(const std::string& filename); -- cgit v1.2.3 From 418308bc7ce4e9924d6280f784222ba45172eea4 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 6 Nov 2019 12:34:26 +0100 Subject: Characters can have more than one representation in LLFontFreetype * By default all viewer text will use B/W glyphs * Added temporary use_color attribute to LLTextBase for testing --- indra/llrender/llfontgl.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/llrender/llfontgl.h') diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index 5028ccc770..68bf5db668 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -98,7 +98,8 @@ public: U8 style = NORMAL, ShadowType shadow = NO_SHADOW, S32 max_chars = S32_MAX, F32* right_x=NULL, - BOOL use_ellipses = FALSE) const; + BOOL use_ellipses = FALSE, + BOOL use_color = FALSE) const; S32 render(const LLWString &text, S32 begin_offset, const LLRectf& rect, @@ -107,7 +108,8 @@ public: U8 style = NORMAL, ShadowType shadow = NO_SHADOW, S32 max_chars = S32_MAX, F32* right_x=NULL, - BOOL use_ellipses = FALSE) const; + BOOL use_ellipses = FALSE, + BOOL use_color = FALSE) const; S32 render(const LLWString &text, S32 begin_offset, F32 x, F32 y, @@ -116,12 +118,13 @@ public: U8 style = NORMAL, ShadowType shadow = NO_SHADOW, S32 max_chars = S32_MAX, S32 max_pixels = S32_MAX, F32* right_x=NULL, - BOOL use_ellipses = FALSE) const; + BOOL use_ellipses = FALSE, + BOOL use_color = FALSE) const; S32 render(const LLWString &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color) const; // renderUTF8 does a conversion, so is slower! - S32 renderUTF8(const std::string &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses) const; + S32 renderUTF8(const std::string &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses, BOOL use_color) const; S32 renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y, const LLColor4 &color) const; S32 renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style = NORMAL, ShadowType shadow = NO_SHADOW) const; -- cgit v1.2.3 From 5a6ddb2ea666e895890d3cb690cce5101cf12652 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 7 Nov 2019 17:15:21 +0100 Subject: Fallback fonts can have first crack at adding an unknown character + set Twemoji as the viewer's fallback for all emoji blocks --- indra/llrender/llfontgl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llrender/llfontgl.h') diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index 68bf5db668..a60feb87cb 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -87,7 +87,7 @@ public: void destroyGL(); - BOOL loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool use_color, 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); S32 getNumFaces(const std::string& filename); -- cgit v1.2.3 From cf2afdc541b540582650f89c6b95aacfeaef516f Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 11 Sep 2022 21:44:00 +0100 Subject: Add emoji as its own font to promote character reuse --- indra/llrender/llfontgl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llrender/llfontgl.h') diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index a60feb87cb..29bdb798e1 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -191,6 +191,7 @@ public: static void setFontDisplay(BOOL flag) { sDisplayFont = flag; } + static LLFontGL* getFontEmoji(); static LLFontGL* getFontMonospace(); static LLFontGL* getFontSansSerifSmall(); static LLFontGL* getFontSansSerif(); -- cgit v1.2.3 From 1fe007abef6eeceefb0dc720b4a5ecb4505ede88 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 13 Jul 2023 21:18:22 +0200 Subject: SL-20001 EmojiPicker - make the preview to be a panel instead of a button --- indra/llrender/llfontgl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llrender/llfontgl.h') diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index 915c2439a3..356cfaf404 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -195,6 +195,7 @@ public: static void setFontDisplay(BOOL flag) { sDisplayFont = flag; } static LLFontGL* getFontEmoji(); + static LLFontGL* getFontEmojiHuge(); static LLFontGL* getFontMonospace(); static LLFontGL* getFontSansSerifSmall(); static LLFontGL* getFontSansSerif(); -- cgit v1.2.3 From be655fef7f1f5717df73dedf84e84b73d246a0ec Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 3 Oct 2023 13:54:07 +0200 Subject: :x --- indra/llrender/llfontgl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llrender/llfontgl.h') diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index 4d4f564033..c56dd96e00 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -135,12 +135,12 @@ public: S32 getWidth(const std::string& utf8text) const; S32 getWidth(const llwchar* wchars) const; - S32 getWidth(const std::string& utf8text, S32 offset, S32 max_chars ) const; + S32 getWidth(const std::string& utf8text, S32 offset, S32 max_chars) const; S32 getWidth(const llwchar* wchars, S32 offset, S32 max_chars) const; F32 getWidthF32(const std::string& utf8text) const; F32 getWidthF32(const llwchar* wchars) const; - F32 getWidthF32(const std::string& text, S32 offset, S32 max_chars ) const; + F32 getWidthF32(const std::string& text, S32 offset, S32 max_chars) const; F32 getWidthF32(const llwchar* wchars, S32 offset, S32 max_chars, bool no_padding = false) const; // The following are called often, frequently with large buffers, so do not use a string interface -- cgit v1.2.3 From ae91ae43a51c58cc496f3947921fbf886c6be86e Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 15 Jan 2024 23:20:24 +0100 Subject: SL-20795 Part of previously typed emojis disappear in the 'Save settings as a preset...' option of the 'Preferences' floater --- indra/llrender/llfontgl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llrender/llfontgl.h') diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index a9d512f7ce..f6ec416c8b 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -99,7 +99,7 @@ public: S32 max_chars = S32_MAX, F32* right_x=NULL, BOOL use_ellipses = FALSE, - BOOL use_color = FALSE) const; + BOOL use_color = TRUE) const; S32 render(const LLWString &text, S32 begin_offset, const LLRectf& rect, @@ -109,7 +109,7 @@ public: S32 max_chars = S32_MAX, F32* right_x=NULL, BOOL use_ellipses = FALSE, - BOOL use_color = FALSE) const; + BOOL use_color = TRUE) const; S32 render(const LLWString &text, S32 begin_offset, F32 x, F32 y, @@ -119,12 +119,12 @@ public: S32 max_chars = S32_MAX, S32 max_pixels = S32_MAX, F32* right_x=NULL, BOOL use_ellipses = FALSE, - BOOL use_color = FALSE) const; + BOOL use_color = TRUE) const; S32 render(const LLWString &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color) const; // renderUTF8 does a conversion, so is slower! - S32 renderUTF8(const std::string &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses, BOOL use_color) const; + S32 renderUTF8(const std::string &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars = S32_MAX, S32 max_pixels = S32_MAX, F32* right_x = NULL, BOOL use_ellipses = FALSE, BOOL use_color = TRUE) const; S32 renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y, const LLColor4 &color) const; S32 renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style = NORMAL, ShadowType shadow = NO_SHADOW) const; -- cgit v1.2.3