LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Blurry text with LabWindows 2017

Solved!
Go to solution

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:

 

2017-cvi-text.jpg

 

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

 

0 Kudos
Message 1 of 13
(5,666 Views)
Solution
Accepted by topic author xj97

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

0 Kudos
Message 2 of 13
(5,658 Views)

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.

 

cvi-pane-resize-issue.jpg

 

Thanks

Baker

0 Kudos
Message 3 of 13
(5,641 Views)

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

0 Kudos
Message 4 of 13
(5,545 Views)

Sorry but I couldn't find this "Customization tab of cvi.exe's properties".

Were can I find it?

 

Thanks

0 Kudos
Message 5 of 13
(5,266 Views)

I found it.

You have to do a right click on the cvi.exe and then select Properties.

Message 6 of 13
(5,217 Views)

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

 

0 Kudos
Message 7 of 13
(5,039 Views)

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.

  1. Buid>>Target Settings…
  2. Make sure to select the proper configuration. For your deployed application Release will be use while in development you would normally use Debug. You can check All Configurations for the setting to be applied for all configurations.
  3. Check Embed manifest file and select the manifest file that enables DPI-awareness, like the one attached below.
  4. Rebuild your executable.

Message 8 of 13
(5,030 Views)

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.

0 Kudos
Message 9 of 13
(4,872 Views)

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.

Rolf Kalbermatter
My Blog
Message 10 of 13
(4,864 Views)