05-04-2016 05:45 PM
@Ian_Ren wrote:It works now if I add the following manually in the *.ini file. How can I ask LabVIEW to add it in automatically while creating an executable?
appFont="0" 14
I don't recommend "0" because that says use the Windows font, but specifically defines the font size.
Change Windows, and you could wind up with a different font of the same size, (but fonts are never quite identical.)
When you create an executable, you will need to create the .ini file for it that includes those settings, include it in the project, and make sure the installer you build references that .ini file so it gets copied over when you install.
That is why the best solution is to specifically define all of your controls to use a specific font such as Tahoma 14, or Segoe UI 15, or whatever Microsoft's fav orite font happens to be at the moement as opposed teo having those controls pointing to "System font".
That way it doesn't need to look at the .ini and doesn't need to grab the font settings from Windows.
05-04-2016 05:46 PM
I am using LabVIEW 15.0.0. Yeah, for some reason, the default font size is 20, so I have to change it to 14.
05-04-2016 05:56 PM - edited 05-04-2016 05:58 PM
It is possible that your OS is configured for large fonts?
RIght-click on the desktop...screeen resolution.
Now click on "make text and other items larger or smaller".
Make sure you are at 100%. I guess yours is set to >100% and that's why you get 20 by default.
05-04-2016 06:09 PM
Yes, mine was set to Medium -125%. If I change it to Smaller - 100%, even without explicitly defining font size in the ini file, the executable now has a font size of 14 (the same as what I see in the LabVIEW development environment.
So I have two ways to do what I want to do now.
Many thanks for your help.
Ian
05-04-2016 06:20 PM
You are lucking that the explicit 14pt that you selected at 125% is apparently equivalent to the default font size at 100%. 😄
(I never use symbolic fonts, so I never run into these annoying problems ....)
05-04-2016 06:31 PM
What do you mean when you say "symbolic fonts", do you mean "Application Font", "Dialog Front" and "System Font"?
05-04-2016 06:49 PM - edited 05-04-2016 06:49 PM
Correct. Those 3 are "symbolic" in that they don't mean a specific font, but they point to those fonts within Windows in the Color and Appearance Dialog. And Microsoft decides to change them every time they come out with the next version of Windows. For Windows XP, the font was Tahoma 8. For Windows 7 it is Segoe UI 9. I don;t remember what Vista had, or Windows 8. And I have not seen Windows 10.
The biggest change was the change from size 8 to size 9 after Windows XP because that screwed up alignments in block diagrams and front panels. Note that LabVIEW sizes are not 1:1 with Window sizes. So Windows size 8 is roughly LV size 14. Windows size 9 translates to LV size 15. I guess that is why 125% large font roughly translates to size 20.
Now that you've run into font size problems, I recommend you go over and read Altenbach's extremely popular idea Font Size Standardization and click on the kudo button for that. At least read through the thread as it gives some more technical detail.
05-10-2016 11:59 AM
05-10-2016 12:25 PM
It is kind of hard to know for sure because those buttons don't have text on them, just graphics. Unless there is text hidden behind the graphic. But even without text, I think the button still has some underlying font associated with it.
So pick those buttons in the development environment, and give them a specific font such as Tahoma 13 pt. Save, build into an EXE, and see what happens.
05-10-2016 12:43 PM - edited 05-10-2016 12:44 PM
Are these actual graphic elements on the buttons or some weird font symbols (e.g. wingdings). Is the same font available on both systems?
Can you attach a small VI containing these controls?
Are you saying that the executable looks different when run on the same system as the development version? Are the font entries in the inis the same?
Is anything set to scale with the panel?