[GH-ISSUE #21432] issue: font of code block fallback to NSimSun #19478

Closed
opened 2026-04-20 01:56:51 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @chesha1 on GitHub (Feb 15, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21432

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.8.1

Ollama Version (if applicable)

No response

Operating System

Windows 10

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

Both text and codes in code blocks use Inter.

Actual Behavior

For text, the font is Inter, which is expected.

Image

But for codes in code block, the rendered font is not Inter.

Image

Steps to Reproduce

Maybe need a computer with system language is Chinese

Logs & Screenshots

Browser console logs:

Image

Additional Information

No response

Originally created by @chesha1 on GitHub (Feb 15, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/21432 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.8.1 ### Ollama Version (if applicable) _No response_ ### Operating System Windows 10 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Both text and codes in code blocks use Inter. ### Actual Behavior For text, the font is Inter, which is expected. <img width="3183" height="1356" alt="Image" src="https://github.com/user-attachments/assets/3ef3bf53-c7d5-4cc6-9250-304dd2dd15a1" /> But for codes in code block, the rendered font is not Inter. <img width="3213" height="1340" alt="Image" src="https://github.com/user-attachments/assets/f7a6c84d-1020-414b-9bf3-3bb5da1444ac" /> ### Steps to Reproduce Maybe need a computer with system language is Chinese ### Logs & Screenshots Browser console logs: <img width="1186" height="537" alt="Image" src="https://github.com/user-attachments/assets/5a5c314d-173e-44e5-bd43-82f1e82bd652" /> ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-20 01:56:51 -05:00
Author
Owner

@tjbck commented on GitHub (Feb 16, 2026):

Intended

<!-- gh-comment-id:3905974811 --> @tjbck commented on GitHub (Feb 16, 2026): Intended
Author
Owner

@chesha1 commented on GitHub (Mar 2, 2026):

Root cause identified:

  • The issue is not code-block font fallback; the browser/system fixed-width font mapping is directly selecting NSimSun.
  • This was reproduced on the innermost text node with pure ASCII content, which rules out missing-glyph fallback.
  • Confirmed conclusion: in this environment, the fixed-width font selection path resolves to NSimSun.

How it was verified:

  • Inspected the innermost text node in DevTools.
  • Re-tested with pure ASCII text (e.g., iiii WWWW 1234 []{}).
  • Compared Rendered Fonts with computed font-family to confirm the actual rendered font source.

Result and workaround:

  • Final rendered font is consistently NSimSun; root cause is environment-level fixed-width font mapping.
  • In Chrome, open chrome://settings/fonts and set Fixed-width font to Consolas or something else, then refresh the page.
<!-- gh-comment-id:3984514315 --> @chesha1 commented on GitHub (Mar 2, 2026): Root cause identified: - The issue is not code-block font fallback; the browser/system fixed-width font mapping is directly selecting NSimSun. - This was reproduced on the innermost text node with pure ASCII content, which rules out missing-glyph fallback. - Confirmed conclusion: in this environment, the fixed-width font selection path resolves to NSimSun. How it was verified: - Inspected the innermost text node in DevTools. - Re-tested with pure ASCII text (e.g., `iiii WWWW 1234 []{}`). - Compared `Rendered Fonts` with computed `font-family` to confirm the actual rendered font source. Result and workaround: - Final rendered font is consistently NSimSun; root cause is environment-level fixed-width font mapping. - In Chrome, open `chrome://settings/fonts` and set **Fixed-width font** to `Consolas` or something else, then refresh the page.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#19478