06-20-2017 12:53 PM
Hello,
After installing LabWindows 2017, the text in our application has become quite blurry for those of us running with our Windows desktop scaling over 100%.
This behavior can be seen on this screenshot of the 2017 (left) and 2015 SP1 welcome pages for the development application:
The display size for the blurry text (2017) actually seems a bit smaller than the crisp text (2015 SP1). This is on a Windows 10 64-bit machine, set to 125% desktop scaling (Windows 10 >> Settings >> Display >> Scale and layout >> 125%).
Is this a known issue? A quick search didn't produce any similar posts on this forum (perhaps my search term was bad).
Thanks
Baker
Solved! Go to Solution.
06-20-2017 01:32 PM
Hi Baker,
This is actually expected behavior and a change that was made in LabWindows/CVI 2017. The reason we made this change was to better support high resolution monitors. In 2015 and earlier when applying a Windows scaling on a high resolution display, the environment was treated as DPI-aware so system text scaled up but other assets like the editor text and icons did not. In 2017 we decided to tell Windows to scale the whole environment up to make sure this was usable on high-resolution displays at the cost of sharpness.
If you wish to change this behavior you can actually follow our workaround instructions for changing the DPI-awareness through the use of an external manifest file:
http://digital.ni.com/public.nsf/allkb/99EF1FA4A1990A1B862580A5006A3130
You'll need to modify the attached manifest file to enable DPI-awareness. I'd also like to mention that setting this registry key affects the whole Windows operating system and thus can be considered somewhat risky.
Hope this helps,
Kevin F.
Product Support Engineer | Automated Test Software
National Instruments
06-20-2017 02:10 PM
Hi Kevin-
Thanks for the quick reply, good to know. We'll have to look into how the new system works, and how we can look our best within it if we upgrade.
I forgot to mention this in the original post, but I also noticed that the pane resizing line is drawn in the wrong place at higher scaling. Note in the image below that the mouse has been dragged to the right of the pane border, but the indicator shows up to the left of the pane border. In 2015 the indicator tracks with the mouse position.
Thanks
Baker
06-23-2017 03:59 PM
Hi Baker,
Thanks for pointing out that visual bug, I'll file that as a bug report to get fixed. Also, I realized that there is an easier way than the registry + manifest file approach to make LabWindows/CVI operate as DPI-aware. Since the application is not DPI-aware by default, you can now use the compatibility option in the Customization tab of cvi.exe's properties to set the DPI-awareness.
Previously this did not work in LabWindows/CVI 2015 since Windows only offers this option for applications that are not DPI-aware by default.
Best,
Kevin
Kevin F.
Product Support Engineer | Automated Test Software
National Instruments
12-20-2017 02:29 PM
Sorry but I couldn't find this "Customization tab of cvi.exe's properties".
Were can I find it?
Thanks
12-21-2017 09:02 AM - edited 12-21-2017 09:02 AM
I found it.
You have to do a right click on the cvi.exe and then select Properties.
03-05-2018 11:32 AM
Is there any way to configure our application when it is installed using CVI (with a created distribution that I build) to have the application by default be configured with the "Compatibility -> Override high DPI scaling behavior"?
Or is there a way I can add C code so it will behave the same way?
Otherwise, every time the installer is run someone has to manually make the change on the .exe.
The blurriness is really bothersome for my app.
Thx,
Alex
03-06-2018 02:04 AM
Hello Alex,
Yes, you can.
You have to embed a manifest in your app that declares DPI awareness so Windows won't scale it up.
04-09-2018 09:22 AM
Thanks for creating this thread. Just had two people come in and check the text to make sure it wasn't just my eyes. Installed CVI 2017 today and all the fonts are blurry. So, after reading your thread, changed the system scaling back to 100% and now all CVI fonts are clear like they're supposed to be but the text and everything else on my laptop screen is so small I can barely read it. To me though, the blurry text is unusable so not sure I agree that this change is for the better. Still don't completely understand why it is that way either since when scaling to 125%, the windows desktop, browser text, pretty much everything is perfectly clear except for CVI.
04-09-2018 10:49 AM
This is because LabWindows CVI is not DPI aware! To be truely DPI aware every routine that displays text or other visual objects, has to be DPI aware, meaning it needs to read additional system settings and scale text and drawing lines accordingly. For LabWindows CVI this means, anything that is drawn on the screen as LabWindows CVI draws its own widget objects and doesn't use standard Windows controls. As the core of the LabWindows CVI GUI handling was written long before Windows even had something like an option to change the DPI resolution, and even much longer before it supported for an application to deal with that properly, LabWindows CVI does not adjust for different DPI values in the OS.
Windows has the "handy" feature of autoscaling everything for an application that does not declare DPI awareness. This has the blurry text as result. On the other hand an application that does declare DPI awareness, is not scaled by Windows, but then various things get rather nasty depending on the actual DPI your screen has such as way to small text to be readable. Sure if you develop your application you can adjust for this yourself by blowing up the fonts to size 24 for instance to still be visible properly on a 300 dpi screen, but when you then install this application on an older 96 dpi screen the fonts all look very blown up and are most likely way to big to fit the available screen space.
The only true solution would be to make everything in LabWindows CVI really DPI aware, but that would be probably a complete rewrite of the entire GUI handling library, so the chance for that is not that big.