Error with the units of measurement

Am I the only one who has an error with the units of measurement?
PrePoMax, Version=2.0.11

I can’t confirm it.

flux unit issue

Yes, this is something on my machine (a bug with any version of PrePoMax). However, when you double-click, the symbol changes…
What font does PrePoMax use?

image

The problem was repeated on another machine, but I found a solution. It is necessary to change the regional localization of Windows. Only for English version there is no error.

My Windows is in Polish and there’s no issue. So it might happen for specific languages.

There’s a difference

Right, I assumed that it’s normally displayed this way.

On the computers I use, I sometimes see mm2 and sometimes mm² but never mm?. In the code/UI the Unicode character for ² is used: “²” U+00B2 Superscript Two Unicode Character

So, it seems it is sometimes not recognized as such. I am wondering how to change this behavior.

The fonts are obviously not the problem since using different language settings helps (thank you for fighting that out). I will look into it, but I do not know where to start.

Perhaps the answer to the question is on the site c++ - Why Non-Unicode apps system locale makes Unicode fonts with symbol charset displayed incorrectly? - Stack Overflow

1 Like

Thank you for the tip. I will look into it.

After spending some hours, I was able to reproduce the problem but failed to find a solution. I think the C# code is Unicode, but the VTK library I use is an older version and is not Unicode. So, the system recognizes it as a non-unicode altogether.

Setting the font from a file is also impossible, which would probably help. When editing the annotation, the C# textbox is drawn over the VTK annotation so the characters are displayed correctly.

What font is used in the file?

There are three possible font types built-in: Arial (which is being used), Courier, and Times. I tried all of them, and they had the same problem.

When copying from the program, it displays the “Century Gothic” font

You cannot copy the font used in the VTK widgets. The fonts on the 3D view are called the Arial font family by the VTK that draws them. They are non-editable. However, for the user to edit the annotation boxes, an additional Windows Textbox is displayed in the same position when in editable mode. This text box uses Segoe UI font. This font is used in the PrePoMax UI.

I copy the text from the annotation and paste it into Word, keeping the formatting, and it shows the “Century Gothic” font.

There are two versions of the fonts: when viewing the annotation, the VTK draws it. When editing the annotation the C# textbox draws it. You can see this if you edit an annotation and then rotate the model without exiting the editing text box (a bug).

You were right. The C# textbox that enables the editing of the annotations indeed uses the Century Gothic font, 12pt. As I remember, I went through many Word fonts to find a font that was as similar as possible to the VTK font. But in the VTK box, the font is set to Arial (ArialFamily).

I understand that the VTK font is the problem, not the C# font. When you edit the annotation, you get the correct fonts (C# - Century Gothic). When you only view the annotation, the characters are wrong (VTK - ArialFamily).