KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Experiencing Changed Rendering of Text on Windows
PRODUCT: 4D | VERSION: 20 | PLATFORM: Win
Published On: August 5, 2024

Text on Windows is rendered using Windows using their API. As updates are pushed things can change. These changes may impact how the text is displayed on a 4D application. If upgrading versions of 4D or the machine has impacted how the text is rendered, there are two things that might be causing the change.

The first is DirectWrite. This is a Windows API that renders text, with 4D 20+ this is enabled with 4D by default and is forced to be enabled with Project Mode databases. If a database has been converted to 4D 20 or has been converted from binary mode to project mode, and the text looks different, this is probably the cause. With binary mode, this can be confirmed by going to the database compatibility settings and toggling the Use DirectWrite setting.

Another item that can cause text to look different based on the machine is Windows High DPI settings. Devices compatible with High DPI can can see issues typically when the display setting is scaled to anything other than 100%. The scaling can cause the machine to render the text in a way that is not expected. Fortunately, this can be disabled from 4D.
To do this the "info.plist" file of the Built 4D application package located at the "Resources" folder next to the executable needs to be modified. Open the file in a text editor and look for the WinDPIAwareness key and change the string value right after it to 0.
This key is typically found towards the end of the file:

....
</array>
<key>WinDPIAwareness</key>
<string>1</string>
<key>com.4d.version</key>
...


Update it so it looks like:
....
<key>WinDPIAwareness</key>
<string>0</string>
...

These items can explain why text is rendered differently and may provide a workaround to render the text.