[BUG]: Chinese Characters Cannot be Rendered in komorebi.bar and Chinese Fonts Crash the Application #529

Closed
opened 2026-01-05 14:51:19 +01:00 by adam · 6 comments
Owner

Originally created by @tieniu1 on GitHub (Nov 23, 2024).

Summary

PixPin_2024-11-23_21-48-41

Current Behavior

  1. The default font "JetBrains Mono" cannot render Chinese characters properly, showing squares/boxes instead
  2. When trying to use Chinese fonts like "Microsoft YaHei" or "Sarasa Mono SC", komorebi.bar crashes immediately

Steps to Reproduce

  1. Default configuration with "JetBrains Mono":
{
"font_family": "JetBrains Mono"
}
  • Chinese characters are displayed as squares/boxes
  1. Try to use Chinese fonts:
{
"font_family": "Microsoft YaHei"
// or
"font_family": "Sarasa Mono SC"
}
  • komorebi.bar crashes immediately after configuration

Expected Behavior

  1. The default font should support Chinese characters
  2. Common Chinese fonts should work without crashing

Environment

  • Windows 11
  • komorebi version: [your version]
  • komorebi.bar version: [your version]

Additional Notes

  • The default font should either support Chinese characters or be replaced with a font that does
  • Popular CJK fonts like Sarasa Mono SC should be supported without causing crashes

Version Information

Clip_2024-11-23_22-01-33

I ran "systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"" but got no output.

PS C:\Users\haland> [System.Environment]::OSVersion

Platform ServicePack Version VersionString


Win32NT 10.0.22631.0 Microsoft Windows NT 10.0.22631.0

PS C:\Users\haland> komorebic --version
komorebic 0.1.30
tag:v0.1.30
commit_hash:9a3dbccc
build_time:2024-11-03 23:49:52 +00:00
build_env:rustc 1.82.0 (f6e511eec 2024-10-15),stable-x86_64-pc-windows-msvc

Komorebi Configuration

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.30/schema.bar.json",
  "monitor": {
    "index": 0,
    "work_area_offset": {
      "left": 0,
      "top": 40,
      "right": 0,
      "bottom": 40
    }
  },
  "font_family": "Microsoft YaHei",
  "theme": {
    "palette": "Base16",
    "name": "Ashes",
    "accent": "Base0D"
  },
  "left_widgets": [
    {
      "Komorebi": {
        "workspaces": {
          "enable": true,
          "hide_empty_workspaces": true
        },
        "layout": {
          "enable": true
        },
        "focused_window": {
          "enable": true,
          "show_icon": true
        }
      }
    }
  ],
  "right_widgets": [
    {
      "Media": {
        "enable": true
      }
    },
    {
      "Storage": {
        "enable": true
      }
    },
    {
      "Memory": {
        "enable": true
      }
    },
    {
      "Network": {
        "enable": true,
        "show_total_data_transmitted": false,
        "show_network_activity": true
      }
    },
    {
      "Date": {
        "enable": true,
        "format": "DayDateMonthYear"
      }
    },
    {
      "Time": {
        "enable": true,
        "format": "TwentyFourHour"
      }
    },
    {
      "Battery": {
        "enable": true
      }
    }
  ]
}

Hotkey Configuration

.shell powershell

alt + o                 : taskkill /f /im whkd.exe; Start-Process whkd -WindowStyle hidden
alt + shift + o         : komorebic reload-configuration

alt + q                 : komorebic close
alt + m                 : komorebic minimize


alt + h                 : komorebic focus left
alt + j                 : komorebic focus down
alt + k                 : komorebic focus up
alt + l                 : komorebic focus right
alt + shift + oem_4     : komorebic cycle-focus previous
alt + shift + oem_6     : komorebic cycle-focus next


alt + shift + h         : komorebic move left
alt + shift + j         : komorebic move down
alt + shift + k         : komorebic move up
alt + shift + l         : komorebic move right
alt + shift + return    : komorebic promote


alt + left              : komorebic stack left
alt + down              : komorebic stack down
alt + up                : komorebic stack up
alt + right             : komorebic stack right
alt + oem_1             : komorebic unstack
alt + oem_4             : komorebic cycle-stack previous
alt + oem_6             : komorebic cycle-stack next


alt + oem_plus          : komorebic resize-axis horizontal increase
alt + oem_minus         : komorebic resize-axis horizontal decrease
alt + shift + oem_plus  : komorebic resize-axis vertical increase
alt + shift + oem_minus : komorebic resize-axis vertical decrease


alt + shift + f         : komorebic toggle-float
alt + f                 : komorebic toggle-monocle


alt + shift + r         : komorebic retile
alt + p                 : komorebic toggle-pause


alt + x                 : komorebic flip-layout horizontal
alt + y                 : komorebic flip-layout vertical


alt + 1                 : komorebic focus-workspace 0
alt + 2                 : komorebic focus-workspace 1
alt + 3                 : komorebic focus-workspace 2
alt + 4                 : komorebic focus-workspace 3
alt + 5                 : komorebic focus-workspace 4
alt + 6                 : komorebic focus-workspace 5
alt + 7                 : komorebic focus-workspace 6
alt + 8                 : komorebic focus-workspace 7
alt + 9                 : komorebic focus-workspace 8


alt + shift + 1         : komorebic move-to-workspace 0
alt + shift + 2         : komorebic move-to-workspace 1
alt + shift + 3         : komorebic move-to-workspace 2
alt + shift + 4         : komorebic move-to-workspace 3
alt + shift + 5         : komorebic move-to-workspace 4
alt + shift + 6         : komorebic move-to-workspace 5
alt + shift + 7         : komorebic move-to-workspace 6
alt + shift + 8         : komorebic move-to-workspace 7
alt + shift + 9         : komorebic move-to-workspace 8


alt + space             : komorebic cycle-layout next
alt + shift + space     : komorebic cycle-layout previous


alt + b                 : komorebic change-layout bsp
alt + g                 : komorebic change-layout grid
alt + u                 : komorebic change-layout ultrawide-vertical-stack

Output of komorebic check

PS C:\Users\haland> komorebic check
No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\haland

Looking for configuration files in C:\Users\haland

Found komorebi.json; this file can be passed to the start command with the --config flag

Found C:\Users\haland.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag

Originally created by @tieniu1 on GitHub (Nov 23, 2024). ### Summary ![PixPin_2024-11-23_21-48-41](https://github.com/user-attachments/assets/9d5f48bd-a047-406b-9d9e-bb2d261e068d) ### Current Behavior 1. The default font "JetBrains Mono" cannot render Chinese characters properly, showing squares/boxes instead 2. When trying to use Chinese fonts like "Microsoft YaHei" or "Sarasa Mono SC", komorebi.bar crashes immediately ### Steps to Reproduce 1. Default configuration with "JetBrains Mono": ``` { "font_family": "JetBrains Mono" } ``` - Chinese characters are displayed as squares/boxes 2. Try to use Chinese fonts: ``` { "font_family": "Microsoft YaHei" // or "font_family": "Sarasa Mono SC" } ``` - komorebi.bar crashes immediately after configuration ### Expected Behavior 1. The default font should support Chinese characters 2. Common Chinese fonts should work without crashing ### Environment - Windows 11 - komorebi version: [your version] - komorebi.bar version: [your version] ### Additional Notes - The default font should either support Chinese characters or be replaced with a font that does - Popular CJK fonts like Sarasa Mono SC should be supported without causing crashes ### Version Information ![Clip_2024-11-23_22-01-33](https://github.com/user-attachments/assets/b3494960-e5a5-409e-b5ab-c9851b5b35a7) I ran "systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"" but got no output. PS C:\Users\haland> [System.Environment]::OSVersion Platform ServicePack Version VersionString -------- ----------- ------- ------------- Win32NT 10.0.22631.0 Microsoft Windows NT 10.0.22631.0 PS C:\Users\haland> komorebic --version komorebic 0.1.30 tag:v0.1.30 commit_hash:9a3dbccc build_time:2024-11-03 23:49:52 +00:00 build_env:rustc 1.82.0 (f6e511eec 2024-10-15),stable-x86_64-pc-windows-msvc ### Komorebi Configuration ```json { "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.30/schema.bar.json", "monitor": { "index": 0, "work_area_offset": { "left": 0, "top": 40, "right": 0, "bottom": 40 } }, "font_family": "Microsoft YaHei", "theme": { "palette": "Base16", "name": "Ashes", "accent": "Base0D" }, "left_widgets": [ { "Komorebi": { "workspaces": { "enable": true, "hide_empty_workspaces": true }, "layout": { "enable": true }, "focused_window": { "enable": true, "show_icon": true } } } ], "right_widgets": [ { "Media": { "enable": true } }, { "Storage": { "enable": true } }, { "Memory": { "enable": true } }, { "Network": { "enable": true, "show_total_data_transmitted": false, "show_network_activity": true } }, { "Date": { "enable": true, "format": "DayDateMonthYear" } }, { "Time": { "enable": true, "format": "TwentyFourHour" } }, { "Battery": { "enable": true } } ] } ``` ### Hotkey Configuration .shell powershell ```ini alt + o : taskkill /f /im whkd.exe; Start-Process whkd -WindowStyle hidden alt + shift + o : komorebic reload-configuration alt + q : komorebic close alt + m : komorebic minimize alt + h : komorebic focus left alt + j : komorebic focus down alt + k : komorebic focus up alt + l : komorebic focus right alt + shift + oem_4 : komorebic cycle-focus previous alt + shift + oem_6 : komorebic cycle-focus next alt + shift + h : komorebic move left alt + shift + j : komorebic move down alt + shift + k : komorebic move up alt + shift + l : komorebic move right alt + shift + return : komorebic promote alt + left : komorebic stack left alt + down : komorebic stack down alt + up : komorebic stack up alt + right : komorebic stack right alt + oem_1 : komorebic unstack alt + oem_4 : komorebic cycle-stack previous alt + oem_6 : komorebic cycle-stack next alt + oem_plus : komorebic resize-axis horizontal increase alt + oem_minus : komorebic resize-axis horizontal decrease alt + shift + oem_plus : komorebic resize-axis vertical increase alt + shift + oem_minus : komorebic resize-axis vertical decrease alt + shift + f : komorebic toggle-float alt + f : komorebic toggle-monocle alt + shift + r : komorebic retile alt + p : komorebic toggle-pause alt + x : komorebic flip-layout horizontal alt + y : komorebic flip-layout vertical alt + 1 : komorebic focus-workspace 0 alt + 2 : komorebic focus-workspace 1 alt + 3 : komorebic focus-workspace 2 alt + 4 : komorebic focus-workspace 3 alt + 5 : komorebic focus-workspace 4 alt + 6 : komorebic focus-workspace 5 alt + 7 : komorebic focus-workspace 6 alt + 8 : komorebic focus-workspace 7 alt + 9 : komorebic focus-workspace 8 alt + shift + 1 : komorebic move-to-workspace 0 alt + shift + 2 : komorebic move-to-workspace 1 alt + shift + 3 : komorebic move-to-workspace 2 alt + shift + 4 : komorebic move-to-workspace 3 alt + shift + 5 : komorebic move-to-workspace 4 alt + shift + 6 : komorebic move-to-workspace 5 alt + shift + 7 : komorebic move-to-workspace 6 alt + shift + 8 : komorebic move-to-workspace 7 alt + shift + 9 : komorebic move-to-workspace 8 alt + space : komorebic cycle-layout next alt + shift + space : komorebic cycle-layout previous alt + b : komorebic change-layout bsp alt + g : komorebic change-layout grid alt + u : komorebic change-layout ultrawide-vertical-stack ``` ### Output of komorebic check PS C:\Users\haland> komorebic check No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\haland Looking for configuration files in C:\Users\haland Found komorebi.json; this file can be passed to the start command with the --config flag Found C:\Users\haland\.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag
adam added the bug label 2026-01-05 14:51:19 +01:00
adam closed this issue 2026-01-05 14:51:20 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Nov 23, 2024):

Likely an issue for egui which is what is handling all font rendering. I'll try and reproduce this with the fonts you mentioned soon 🤞

@LGUG2Z commented on GitHub (Nov 23, 2024): Likely an issue for egui which is what is handling all font rendering. I'll try and reproduce this with the fonts you mentioned soon 🤞
Author
Owner

@LGUG2Z commented on GitHub (Nov 23, 2024):

The default font should either support Chinese characters or be replaced with a font that does

I'm open to suggestions for a monospace font which also supports Chinese characters!

@LGUG2Z commented on GitHub (Nov 23, 2024): > The default font should either support Chinese characters or be replaced with a font that does I'm open to suggestions for a monospace font which also supports Chinese characters!
Author
Owner

@tieniu1 commented on GitHub (Nov 24, 2024):

Likely an issue for egui which is what is handling all font rendering. I'll try and reproduce this with the fonts you mentioned soon 🤞

Thank you for your work. I tried YASB and found that "JetBrainsMono NFP" can display Chinese characters correctly. However, when I configured JetBrainsMono NFP in komorebi.bar, it still couldn't display Chinese. I hope this additional information can help you.

@tieniu1 commented on GitHub (Nov 24, 2024): > Likely an issue for egui which is what is handling all font rendering. I'll try and reproduce this with the fonts you mentioned soon 🤞 Thank you for your work. I tried YASB and found that "JetBrainsMono NFP" can display Chinese characters correctly. However, when I configured JetBrainsMono NFP in komorebi.bar, it still couldn't display Chinese. I hope this additional information can help you.
Author
Owner

@LGUG2Z commented on GitHub (Jan 16, 2025):

I am now learning Mandarin so this issue has an elevated priority for me 😅

@LGUG2Z commented on GitHub (Jan 16, 2025): I am now learning Mandarin so this issue has an elevated priority for me 😅
Author
Owner

@LGUG2Z commented on GitHub (Jan 17, 2025):

Image

At least locally I have some progress

@LGUG2Z commented on GitHub (Jan 17, 2025): ![Image](https://github.com/user-attachments/assets/922c91b7-6867-446a-a76a-8c208e81fdfc) At least locally I have some progress
Author
Owner

@LGUG2Z commented on GitHub (Jan 17, 2025):

This will be in the next nightly release @tieniu1 !

@LGUG2Z commented on GitHub (Jan 17, 2025): This will be in the next nightly release @tieniu1 !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#529