Report Word Wrap in Wrong Position and Display Differently on Different Machine

Stimulsoft Reports.JS discussion
Post Reply
yeetobiichi
Posts: 10
Joined: Sat May 11, 2024 7:56 am

Report Word Wrap in Wrong Position and Display Differently on Different Machine

Post by yeetobiichi »

Hi,

Our company has updated to latest JS version now (2025.3.4). We've noticed that some report still might display differently on different zoom scale. Specifically for this report, when displaying on 100% zoom, the word wrap calculation doesn't apply correctly.

My current speculation is that, when using the "SimSun" font, together with Chinese Character/English/Number, the width calculation has some error, causing it to not break line properly.

Another related bug is that, when setting the "Allow HTML Tags" property on for that specific Table Cell, it might just truncate my data, cause it to be invisible.

Attached are the images and the original mrt File.

Browser: Edge, Chrome (latest version)
Systems: Windows 11 (latest version)

Thank you.
1.png
1.png (58.5 KiB) Viewed 4487 times
2.png
2.png (67.08 KiB) Viewed 4487 times
3.png
3.png (67.76 KiB) Viewed 4487 times
Attachments
DisplayError.mrt
(39.45 KiB) Downloaded 43 times
Yeet through all the difficulties
Lech Kulikowski
Posts: 7511
Joined: Tue Mar 20, 2018 5:34 am

Re: Report Word Wrap in Wrong Position and Display Differently on Different Machine

Post by Lech Kulikowski »

Hello,

We require more time to investigate the issue thoroughly. Rest assured, we will keep you informed about the outcome as soon as possible.

Thank you.
#18259
Lech Kulikowski
Posts: 7511
Joined: Tue Mar 20, 2018 5:34 am

Re: Report Word Wrap in Wrong Position and Display Differently on Different Machine

Post by Lech Kulikowski »

Hello,

> ... some report still might display differently on different zoom scale.

We found a bug in HTML export: font sizes were being rounded to integer values.
Therefore, if the scale was not 100% or the font size was initially fractional, it was truncated to an integer value in the HTML.
As a result, the text appeared smaller than expected, and line breaks occurred in the wrong places.
The issue has been fixed and will be included in release 2025.4.2.

> Another related bug is that, when setting the "Allow HTML Tags" property on for that specific Table Cell, it might just truncate my data, cause it to be invisible.

This is not a bug in our product, but a known behavior of text rendering in Windows systems.
In Windows, the text rendering methods round internal font metrics to whole pixels.
As a result, when font sizes increase smoothly, the actual rendered text size grows in small jumps rather than continuously.
That means in some cases the text should be slightly smaller for the given font size, but the system renders it larger, causing it not to fit within the cell.

In this report, the text box has a font size of 11pt, and with a 75% scale, the effective size becomes 8.25pt.
If you manually set the font size in HTML to 8.24pt (just 0.01 smaller), the rendered text size decreases and fits into the cell correctly.

Similarly, if you change the browser page zoom (without changing the viewer’s scale), the problem also disappears.

Possible workaround:
Set the font size to a slightly smaller value, for example 10.95pt instead of 11pt.

Thank you.
yeetobiichi
Posts: 10
Joined: Sat May 11, 2024 7:56 am

Re: Report Word Wrap in Wrong Position and Display Differently on Different Machine

Post by yeetobiichi »

Thank you for the detailed explanations!
Much appreciated!
Yeet through all the difficulties
Max Shamanov
Posts: 1062
Joined: Tue Sep 07, 2021 10:11 am

Re: Report Word Wrap in Wrong Position and Display Differently on Different Machine

Post by Max Shamanov »

Hello.

We are always glad to help you.
Let us know if you need our help.

Thank you.
Post Reply