Skip to content

[BUG] UniGetUI has a bad adaption for Chinese when using a Japanese font #4786

@Sycxp

Description

@Sycxp

Please confirm these before moving forward

  • I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
  • I have tested that this issue has not been fixed in the latest (beta or stable) release.
  • I have checked the FAQ section for solutions.
  • This issue is about a bug (if it is not, please use the correct template).

UniGetUI Version

2026.1.10

Windows version, edition, and architecture

Windows 11 10.0.26300.8376 Professional amd64

Describe your issue

It seems that UniGetUI can't display the Simplified Chinese characters in the correct way, when using a Japanese Language Pack, or just adapting the default font into a Japanese characters style.
For example, when using the font Genshin Impact SDK_SC_WEB(aka a Japanese adaption of 汉仪文黑-85W), and start the program, you will find nearly every Simplified Chinese character became a block, which represents there are the missing fonts.
Actually, when using the old version of UniGetUI(before the change of UI system), the whole font display system is correct.
Moreover, if starting the new version, it may be crashed(during the test, it caused a system dump) without any hints.

Steps to reproduce the issue

No response

UniGetUI Log

1. Crash Reports
Environment details:
        OS version: Microsoft Windows NT 10.0.26300.0
        Language: en
        APP Version: 2026.1.10
        APP Build number: 107
        Executable: D:\Program Files\UniGetUI\Avalonia\UniGetUI.Avalonia.exe
        Command-line arguments: "D:\Program Files\UniGetUI\Avalonia\UniGetUI.Avalonia.dll"

Integrity report:
    No integrity violations were found.
    

Exception type: ArgumentException (System.ArgumentException)
    Crash HResult: 0x80070057 (2147942487, -2147024809)
    Crash Message: Value does not fall within the expected range.

    Crash Data:
        No extra data was provided

    Crash Trace:
           at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode, Guid& iid, IntPtr pUnk)
           at <Avalonia_Controls_Win_WebView2_Interop_ICoreWebView2Controller>F107AF84049F3D11396FD71955F555198DEEB8C7E0C992FF24C0CFCE20E3AA2CD__InterfaceImplementation.global::Avalonia.Controls.Win.WebView2.Interop.ICoreWebView2Controller.MoveFocus(COREWEBVIEW2_MOVE_FOCUS_REASON reason)
           at Avalonia.Reactive.LightweightObservableBase`1.PublishNext(T value)
           at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e)
           at Avalonia.Interactivity.EventRoute.RaiseEvent(Interactive source, RoutedEventArgs e)
           at Avalonia.Input.KeyboardDevice.SetFocusedElement(IInputElement element, NavigationMethod method, KeyModifiers keyModifiers, Boolean isFocusChangeCancellable)
           at Avalonia.Input.FocusManager.Focus(IInputElement element, NavigationMethod method, KeyModifiers keyModifiers)
           at Avalonia.Input.FocusManager.SetFocusScope(IFocusScope scope)
           at Avalonia.Controls.WindowBase.HandleActivated()
           at Avalonia.Win32.WindowImpl.AppWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
           at Avalonia.Win32.WindowImpl.WndProcMessageHandler(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)


No inner exceptions found
2. No Error Log Found.

Package Managers Logs

It's not about Package Managers.

Relevant information

I guess that setting a default font for different Character environment may solve the problem.
It should be adapted by settings in the UniGetUI.
Additionally, after reading the default language, UniGetUI is supposed to ensure the font environment is suitable for the local language.
Actually, the bug caused by different CJK environment is hard to solve. :(

The more infomation you may need.
The system font adaption tools: MacType + noMeiryoUI
But I have set MacType to ignore UniGetUI to prevent the possible errors.
MacType config: using Simplified Chinese style SourceHanSelf.
noMeiryoUI config: using Japanese style Genshin Impact SDK_SC_WEB.

Screenshots and videos

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions