[SOLVED]Numbers display as weird symbols

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
kisolre
Posts: 2258
Joined: Wed Nov 21, 2018 1:13 pm

Re: Numbers display as weird symbols

Postby kisolre » Wed Apr 01, 2020 8:01 am

UR_ wrote:
Tue Mar 31, 2020 12:47 pm
Should looks like e.g.
Are you sure this is the correct font? Any idea where it is in the source? or is this the default QT5 font?
UR_
Posts: 1188
Joined: Tue Jan 03, 2017 8:42 pm

Re: Numbers display as weird symbols

Postby UR_ » Wed Apr 01, 2020 9:49 am

AFAIK, every widget is selecting it's own font
Please see property editor from QtDesigner with any .ui file from FreeCAD.

example:

Screenshot 002.png
Screenshot 002.png (6.82 KiB) Viewed 126 times
daboga
Posts: 16
Joined: Thu Mar 26, 2020 5:03 pm

Re: Numbers display as weird symbols

Postby daboga » Wed Apr 01, 2020 12:46 pm

UR_ wrote:
Wed Apr 01, 2020 9:49 am
AFAIK, every widget is selecting it's own font
Please see property editor from QtDesigner with any .ui file from FreeCAD.
I don't have QtDesigner and I'd like to avoid downloading the trial version if I can.
I see that the .ui files are xml files, so I expect the font properties to be mentioned in plain text; I opened each of them in Notepad++ and I made a search on "font"; results are in attachment.
Don't hesitate to tell me if what I did doesn't make sense.
Attachments
Fonts.pdf
(79.62 KiB) Downloaded 4 times
openBrain
Posts: 4507
Joined: Fri Nov 09, 2018 5:38 pm

Re: Numbers display as weird symbols

Postby openBrain » Wed Apr 01, 2020 1:25 pm

Yeah, actually doing so doesn't make much sense.
Qt as a mechanism to get default font from the system, then propagating it through the widgets => https://doc.qt.io/qt-5/qwidget.html#font-prop

You can try to enter something like this in the Python Console to look if it improve things :

Code: Select all

from PySide import QtGui
QtGui.QApplication.setFont(QtGui.QFont("Arial",10))
Last edited by openBrain on Wed Apr 01, 2020 1:38 pm, edited 1 time in total.
daboga
Posts: 16
Joined: Thu Mar 26, 2020 5:03 pm

Re: Numbers display as weird symbols

Postby daboga » Wed Apr 01, 2020 1:33 pm

openBrain wrote:
Wed Apr 01, 2020 1:25 pm
You can try to enter something like this in the Python Console to look if it improve things :

Code: Select all

QtGui.QApplication.setFont(QtGui.QFont("Arial",10))
>>> QtGui.QApplication.setFont(QtGui.QFont("Arial",10))
Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'QtGui' is not defined
openBrain
Posts: 4507
Joined: Fri Nov 09, 2018 5:38 pm

Re: Numbers display as weird symbols

Postby openBrain » Wed Apr 01, 2020 1:39 pm

daboga wrote:
Wed Apr 01, 2020 1:33 pm
Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'QtGui' is not defined
My mistake. Updated above post. ;)
daboga
Posts: 16
Joined: Thu Mar 26, 2020 5:03 pm

Re: Numbers display as weird symbols

Postby daboga » Wed Apr 01, 2020 1:59 pm

openBrain wrote:
Wed Apr 01, 2020 1:39 pm
daboga wrote:
Wed Apr 01, 2020 1:33 pm
Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'QtGui' is not defined
My mistake. Updated above post. ;)
Nobody is perfect :P ... but it doesn't solve the bloody thing :cry:
No change in the weird numbers display, but I can see all texts change size (numbers included) if I change the second argument.
I also tried different fonts (MS Sans Serif, Tahoma) and I see indeed the font change in all texts, but the same issue with numbers remains.
Btw, I tried the 32-bit version of FreeCAD as well, just in case - no more success.
I since reverted to the 64 bit version (0.18)
Syres
Posts: 754
Joined: Thu Aug 09, 2018 11:14 am

Re: Numbers display as weird symbols

Postby Syres » Wed Apr 01, 2020 2:52 pm

@daboga, I can't see anywhere in the thread that you have referenced the setting in this procedure: https://java.com/en/download/help/locale.xml
(I'm sure this setting has come up in the past with regard to a strange Windows display problem).
daboga
Posts: 16
Joined: Thu Mar 26, 2020 5:03 pm

Re: Numbers display as weird symbols

Postby daboga » Wed Apr 01, 2020 3:32 pm

Syres wrote:
Wed Apr 01, 2020 2:52 pm
@daboga, I can't see anywhere in the thread that you have referenced the setting in this procedure: https://java.com/en/download/help/locale.xml
(I'm sure this setting has come up in the past with regard to a strange Windows display problem).
This solved the issue -Thanks a lot! (I'd never have found it by myself)
Thanks also to all those who tried and helped !!!
kisolre
Posts: 2258
Joined: Wed Nov 21, 2018 1:13 pm

Re: Numbers display as weird symbols

Postby kisolre » Wed Apr 01, 2020 3:58 pm

Just for future reference - "Language for non-Unicode programs" is the desired setting. What was yours set to?