LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Size of label text changed on some PC's

Wim,

If you're looking for a font that is similar to "NI Dialog Font", but that won't change size when the DPI changes, I recommend that you look for the typeface that "NI Dialog Font" is an alias of, and use that one instead. It should be something like "MS Sans Serif" but it might be something else depending on your language options, etc. To find out for sure what the typeface is, look at the following registry key:

"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes\MS Shell Dlg"

If you then use "MS Sans Serif" in your .UIR instead of "NI Dialog Font", the font shouldn't change size, regardless of the point size that you chose.

Luis
Message 11 of 14
(1,391 Views)
I think I may have been too pessimistic in my earlier comments about avoiding the dpi problem.

On my Win XP machine I ran my "fonts" program/UI (attached in a earlier post) at various settings 96 dpi & 120 dpi; each at normal, large, and extra large fonts. The results are in the attached ZIP file. It seems that the TrueType fonts (Arial, Tahoma & Courier New) are stable at all settings tested on my PC.

Of the "NI fonts" the problematic ones are some in-between point sizes, specifically NIDialogMetaFont 11  (There is no NIDialog 11), and the 13  point (meta) versions of NIMenu and NIMessageBox.. Otherwise NIDialog behaved well, though the steps up in point size were rather course and uneven (e.g 13, 14 and 15 were the same size). Older fonts (non-TrueType) such as Courier and MS Sans Serif do seem to be problematic, so with all due respect to Luis, I think that MS Sans Serif would not work too well on my PC, even though it is in that registry key.

Although TrueType fonts seems like the best bet, remember one loses the integrated look with the OS settings, and including the font in the distribution kit would probbaly be advisable.

Re changing fonts: There is a better way - see Luis's tip at the end of this post
Re font mappings: This may be helpful background; presumably it is not out of date.

Good luck!


Message 12 of 14
(1,374 Views)

Hello guys,

Thanks a lot. I'll try to make my GUI dpi insensitive Smiley Happy

0 Kudos
Message 13 of 14
(1,350 Views)
Ian,

I stand corrected. Thanks for the tip!

Luis
0 Kudos
Message 14 of 14
(1,336 Views)