Environment
Any recent viewer build on Linux (Official, Firestorm, etc.)
Description
On linux, text in Japanese, Chinese and other non-Latin scripts renders as empty squares / tofu boxes even when the system has the correct font installed (ex. Noto Sans CJK.)
The cause of this appears to be that the viewer uses a max_font_count_cutoff of 40 when building the list used by LLWindowSDL::getDynamicFallbackFontList(), which cuts off the list before a valid font is found. (Fonts like CJK can often appear at indexes of 180th or so.)
Possible Solutions
There's a few possible approaches to address this issue:
- Expand the limit - Bump the limit from 40 to a high value such as 400
- Explicitly query FontConfig for its best match for a fixed set of major scripts
- Lazy-load on demand - pull in fonts on demand if characters are missing
Reproduction steps
Given: You are running a Linux build of Second Life
- Log in
- View Japanese/Chinese/Thai font
Expected: The font should be rendered
Actual: The font is rendered with placeholder boxes
Screenshots
Broken text in nearby chat
Broken text in the Friend List
Environment
Any recent viewer build on Linux (Official, Firestorm, etc.)
Description
On linux, text in Japanese, Chinese and other non-Latin scripts renders as empty squares / tofu boxes even when the system has the correct font installed (ex. Noto Sans CJK.)
The cause of this appears to be that the viewer uses a
max_font_count_cutoffof 40 when building the list used byLLWindowSDL::getDynamicFallbackFontList(), which cuts off the list before a valid font is found. (Fonts like CJK can often appear at indexes of 180th or so.)Possible Solutions
There's a few possible approaches to address this issue:
Reproduction steps
Given: You are running a Linux build of Second Life
Expected: The font should be rendered
Actual: The font is rendered with placeholder boxes
Screenshots
Broken text in nearby chat
Broken text in the Friend List