Korean Text AutoSize Issue in Wisej 4

0
0

Hello Wisej Team,

I recently migrated from Wisej 3 to Wisej 4. After the migration, I’ve encountered a significant issue with Korean text rendering.

Issue Description: In Wisej 3, Korean text in Labels and Buttons with AutoSize=true displayed correctly on a single line. However, in Wisej 4, the same Korean text now wraps to multiple lines, breaking the UI layout.

Root Cause Analysis: Based on the documentation at https://docs.wisej.com/docs/whats-new-in-4.0/managed-graphics, I understand that Wisej 4 replaced the platform-specific graphics implementations (GDI+ on Windows) with the new System.Drawing.Managed. While this provides consistency across platforms, it appears that the font metrics calculation for Korean characters, is not accurate.

Technical Details:

  • GDI+ in Wisej 3 handled these calculations correctly
  • System.Drawing.Managed in Wisej 4 seems to underestimate the required space

Reproduction Steps:

  1. Create a Label or Button with AutoSize=true
  2. Set Text to Korean text, e.g., “안녕하세요 위세이” or “사용자 관리 시스템”
  3. The text wraps unexpectedly, even though there’s sufficient horizontal space

Request: Could you please investigate and improve the font metrics calculation for CJK characters in System.Drawing.Managed? This would greatly benefit developers creating applications for Asian markets.

Environment:

  • Wisej 4.0.1-preview.10
  • .Net 9.0 running on Linux
  • Linux (Debian) – Same server that successfully ran Wisej 3.5 with libgdiplus
  • Browsers: Chrome, Edge

Thank you for your continued development of this excellent framework.

Best regards,

Bill Kim

P.S. I attached screenshots (.jpg) and a .zip file, but I’m getting a “forbidden” error message.

  • You must to post comments
0
0

Hi Julie,

Thank you for the quick response and for confirming the issue with Labels.

I see you tested with controls placed directly on the form, but the main issue I reported occurs specifically when controls are inside a FlowLayoutPanel. I’ve created a test project and captured a screenshot that clearly demonstrates this issue.

As you can see in the attached screenshot:

Top section (FlowLayoutPanel):

  • “한국어 버튼” – text is broken into 2 lines when it should be on 1 line
  • “En Button” – while not wrapped, appears to have different padding/sizing compared to the same button outside FlowLayoutPanel
  • “안녕하세요” – text is split into 2 lines unnecessarily
  • “label1” – English text displays correctly
  • “한국어 버튼입니다” – the Label is wrapped into 2 lines when it should display on a single line

Bottom section (directly on form):

  • Button “En Button” – displays correctly with normal padding
  • Button “한국어 버튼입니다” – displays on a single line as expected
  • Button “안녕하세요” – shows correctly on one line
  • Labels with borders clearly show wrong AutoSize behavior

Key Findings:

  1. The FlowLayoutPanel has severe font metrics calculation issues for Korean text and perhaps English too, particularly with padding/sizing
  2. Even English controls show inconsistent sizing/padding behavior within FlowLayoutPanel
  3. Korean text that displays perfectly on the form becomes unnecessarily wrapped inside FlowLayoutPanel

Impact:

  • In Wisej 3: All text (Korean and English) maintained consistent sizing and displayed correctly
  • In Wisej 4: FlowLayoutPanel’s layout calculations are fundamentally broken
  • This breaks our entire UI design pattern for dynamic forms

The screenshot clearly shows that System.Drawing.Managed’s text measurement is critically flawed, especially within FlowLayoutPanel’s layout engine.

I’ll try again to upload the complete sample project along with this screenshot. This prevents us from migrating to Wisej 4 for our Korean market applications.

Best regards,

Bill Kim

Attachment
  • You must to post comments
0
0

Thanks for reporting this. I tested and I was able to reproduce with a label but not with a button. We’ll look into fixing this.
Can you try to post your sample please?
To solve the “forbidden” error message, try reloading the page, or closing and reopening the browser. Also make sure that you delete the .vs bin and obj folders from your sample so that the filesize is smaller.

Julie

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.