VI Analyzer Enthusiasts Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Find symbolic fonts

I know I asked about that many years ago, but I haven't had a chance to implement this test myself, yet. I wonder if somebody already made something along these lines:

 

VI analyzer has the test "Font Usage"

 

ViaFonts.png

 

For a test failure, you might get an error similar to the following:

"Some part of the display of the indicator labeled "xyz" does not use a specified font. If you are using a font other than Application, System, or Dialog font, this could cause problems when porting this VI to another system that does not have the proper font(s) installed."

 

Well, I would like to test for the exact opposite!!!

 

I would like to find all instances that don't have a really hard specified font (e.g. "Tahoma 13"). In other words, I would like to find all instances where clicking on the text shows a symbolic font name (application, system, dialog, etc.") in the toolbar instead of a named font.

 

Reasoning:

As we all know, the LabVIEW front panel does not scale well if fonts are symbolic and the executable is transferred to a machine with a different OS theme or font scaling. Things blow up or overlap. My distributed programs are quite busy and cannot tolerate any font variation issues! Yes, we can include an ini and such, but that does not really solve the root of the problem. Even if we define all fonts in the labview.ini, there are leftovers everywhere where these settings are ignored when dropping new controls. If you don't believe me, try the following:

 

  1. After defining all fonts as "Tahoma 13" in the Ini, Do the following:
  2. Drop a modern numeric control and select it. The Font box shows "Tahoma 13". Good!
  3. Select the label. The Font box still shows "Tahoma 13". Good!
  4. Select the numeric field... wait for it... Now the font box shows "13pt Application Font". What the H@@##$ ????
  5. Select the entire control, click on the font pulldown, select "Font dialog ..." and press OK (tahoma 13 is already filled in, nothing to change).
  6. Repeat step #4. Now the numeric is also in the defined font.

Basically, symbolic fonts have a way to sneak into the front panel at edit time and I want to make sure I catch them all!

 

And no, I cannot at the end do a "select all" followed by a font pulldown to select e.g. tahoma. Some of my labels and captions have some embedded symbols (e.g. "a" which would revert to "a" if I blindly do so).

 

Long story short, I would suggest one of the following:

A: Create a custom test that warns about the presence of symbolic fonts! (need someone to do it. It may be hard to believe, but I never do any scripting, so this would be excessively hard for me to get started).

B: Increase the number of options for the existing "font usage" test, e.g. an additional checkbox to "Warn about symbolic fonts" or similar, reversing the behavior. (needs Darren ;))

 

(Maybe it should also do all that on diagram items containing fonts, not just the front panel. Maybe a scripting tool could be written that corrects all these font issues automatically, being careful not to touch anything defined, e.g. if a "application font" word contains a symbol substring in the middle, that part of the string should not be touched. Probably not easy ...)

 

Message 1 of 12
(4,056 Views)

What if I added a 'Non-Symbolic Fonts' checkbox?

f.png

It would default to FALSE for backwards compatibility, but for your use case, you would uncheck App/Sys/Dlg and only check non-symbolic. Would that solve your use case?

 

Message 2 of 12
(4,046 Views)

@Darren wrote:

What if I added a 'Non-Symbolic Fonts' checkbox?

 

I think that would work. 😉

 

(Maybe another one below the "hidden controls" option thing: "[ ] also check diagram", but that's not really important for the UI)

0 Kudos
Message 3 of 12
(4,012 Views)

Maybe it's language thing*, but I am still confused why the explanation describes application/system/dialog fonts as "user specified"? Don't we get these if the user does NOT specify a font?

 

 

**I always have problems with language logic. Just came back from and England trip and saw this appetizer menu in a window. Why would I pay £10 for "three" appetizers if I can get "All for £3.50"??? Seems like a significantly better deal to get all of them, even if I eat only three. 😄

 

all4.png

 

Message 4 of 12
(4,002 Views)

I agree, it's not 100% clear. "User-specified" is supposed to mean "configuration check boxes selected by the user for the Font Usage test". I'll try to clarify the test description when I add the new checkbox.

Message 5 of 12
(3,999 Views)

Barring catastrophe, this feature should be available in the Font Usage test in VI Analyzer Toolkit 2020.

Message 6 of 12
(3,966 Views)

thank you Darren!

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 7 of 12
(3,954 Views)

So, this analyzer seems to be flawed, because it finds no failures if tab controls (i.e. the text on tabs) still have symbolic fonts.

 

altenbach_0-1676239146772.png

 

This is one of my older programs and there were at least 3 tab controls that the analyzer did not identify. I wonder why....

can this be fixed?

 

(LabVIEW 2020)

 

0 Kudos
Message 8 of 12
(1,648 Views)

Quick demo:

 

Attached VI (2020) has two symbolic fonts (1: text inside numeric, 2: the tabs ). Vi Analyzer only finds #1.

 

altenbach_0-1676240000400.png

 

 

altenbach_0-1676239933943.png

 

0 Kudos
Message 9 of 12
(1,643 Views)

@altenbach wrote:

 

This is one of my older programs and there were at least 3 tab controls that the analyzer did not identify. I wonder why....

can this be fixed?


At this time it cannot be fixed, because the fonts used in the page labels of a Tab Control are not exposed in VI Server.

Message 10 of 12
(1,633 Views)