Description: Since the introduction of the Blend2D rendering engine in Build 5570 (and persisting in 5572), the terminal experiences severe unresponsiveness or complete deadlocks when using non-ASCII character sets (specifically Simplified Chinese, font "Microsoft YaHei").
This is a significant regression in the UI framework's performance and stability.
Technical Analysis & Observations:
Rendering Bottleneck: When #define CONTROLS_FONT_NAME is set to a Chinese font (e.g., "微软雅黑"), the terminal freezes immediately upon loading any indicator or EA that utilizes the Controls library.
Glyph Processing Failure: Even with standard fonts like "Arial", there is a noticeable lag compared to previous builds. This suggests that the Blend2D integration layer is failing to properly cache font handles or is re-indexing the font face on every frame (OnPaint/OnChartEvent).
Encoding/JIT Conflict: The issue appears to be located in the interface between MQL5's UTF-16 string handling and Blend2D’s font rasterization pipeline. For complex glyphs (Chinese/Arabic), the JIT compiler or the Atlas allocator seems to enter an infinite loop or trigger excessive memory reallocation, leading to a Main Thread deadlock.
Steps to Reproduce (Minimal Demo):
// This code causes an immediate freeze in Build 5570/5572inputstring mFontName = "微软雅黑"; // Microsoft YaHei#include <Controls/Defines.mqh>
#undef CONTROLS_FONT_NAME
#define CONTROLS_FONT_NAME mFontName
// Load any standard Control-based Indicator/EA
Environment:
MT5 Version: Build 5570, 5572 (latest).
OS: Windows 10/11 (Chinese Simplified Locale).
Hardware: Observed across multiple CPU architectures (AVX2 supported).
Request: Please investigate the font face mapping and glyph caching logic within the new Blend2D implementation. The community needs a fix or a toggle to fallback to the legacy GDI/GDI+ rendering for non-English locales until the JIT rendering for multi-byte characters is stabilized.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Description: Since the introduction of the Blend2D rendering engine in Build 5570 (and persisting in 5572), the terminal experiences severe unresponsiveness or complete deadlocks when using non-ASCII character sets (specifically Simplified Chinese, font "Microsoft YaHei").
This is a significant regression in the UI framework's performance and stability.
Technical Analysis & Observations:
Rendering Bottleneck: When #define CONTROLS_FONT_NAME is set to a Chinese font (e.g., "微软雅黑"), the terminal freezes immediately upon loading any indicator or EA that utilizes the Controls library.
Glyph Processing Failure: Even with standard fonts like "Arial", there is a noticeable lag compared to previous builds. This suggests that the Blend2D integration layer is failing to properly cache font handles or is re-indexing the font face on every frame (OnPaint/OnChartEvent).
Encoding/JIT Conflict: The issue appears to be located in the interface between MQL5's UTF-16 string handling and Blend2D’s font rasterization pipeline. For complex glyphs (Chinese/Arabic), the JIT compiler or the Atlas allocator seems to enter an infinite loop or trigger excessive memory reallocation, leading to a Main Thread deadlock.
Steps to Reproduce (Minimal Demo):
Environment:
MT5 Version: Build 5570, 5572 (latest).
OS: Windows 10/11 (Chinese Simplified Locale).
Hardware: Observed across multiple CPU architectures (AVX2 supported).
Request: Please investigate the font face mapping and glyph caching logic within the new Blend2D implementation. The community needs a fix or a toggle to fallback to the legacy GDI/GDI+ rendering for non-English locales until the JIT rendering for multi-byte characters is stabilized.