font could not be changer for text

A forum dedicated to the Draft, Arch and BIM workbenches development.
Post Reply
User avatar
mwlandolsi
Posts: 66
Joined: Sun Jan 31, 2021 10:49 pm

font could not be changer for text

Post by mwlandolsi »

When creating a text in draft using
Screenshot from 2022-05-24 00-07-55.png
Screenshot from 2022-05-24 00-07-55.png (126.86 KiB) Viewed 583 times
the font could not be changed

Code: Select all

OS: Linux Mint 20.1 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: e1f26857346dc85f047cdb073942098e356123ba
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, OCC 7.5.2
Locale: English/United States (en_US) [ OS: English/United States (en_US) ]
Installed mods: 
  * Design456 -1698787296.0.0
  * Silk -1698787296.0.0
  * Curves 0.4.2
  * sheetmetal 0.2.49
  * OpticsWorkbench 1.0.8
  * CurvedShapes 1.0.2
User avatar
ragohix769
Posts: 435
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: font could not be changer for text

Post by ragohix769 »

I confirm. The font (drop down list) can be selected, but when you select it the text it's not changing at all, even with a recompute.

Code: Select all

OS: Ubuntu 20.04.4 LTS (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: f16f617dc81494eeef659c10ee4f7316b00aa1c6
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, OCC 7.5.2
Locale: Italian/Italy (it_IT)
Installed mods: 
  * BIM 2021.12.0
User avatar
Roy_043
Veteran
Posts: 5070
Joined: Thu Dec 27, 2018 12:28 pm

Re: font could not be changer for text

Post by Roy_043 »

Works OK here:

Code: Select all

OS: Windows 8.1 (6.3)
Word size of FreeCAD: 64-bit
Version: 0.20.28918 (Git)
Build type: Release
Branch: master
Hash: e1f2685734
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: Dutch/Netherlands (nl_NL)
Installed mods: 
  * BIM 2021.12.0
User avatar
yorik
Founder
Posts: 12802
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: font could not be changer for text

Post by yorik »

Works OK for me too

Code: Select all

OS: Debian GNU/Linux bookworm/sid (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.20.28914 (Git)
Build type: Debug
Branch: master
Hash: 650210e2dbe08192e370819b9b28473a7f8449f5
Python 3.9.12, Qt 5.15.2, Coin 4.0.0, OCC 7.5.1
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * BIM 2021.12.0
User avatar
ragohix769
Posts: 435
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: font could not be changer for text

Post by ragohix769 »

Retested, sadly I confirm the problem. I've seen that if you change from 3D mode text to 2D font changes, but if you change to 3D mode, it's always the same font family, not the selected.

Code: Select all

OS: Ubuntu 20.04.4 LTS (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: f16f617dc81494eeef659c10ee4f7316b00aa1c6
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, OCC 7.5.2
Locale: Italian/Italy (it_IT)
Installed mods: 
  * BIM 2021.12.0
Attachments
text_test_001.FCStd
(6.35 KiB) Downloaded 6 times
wepz97934.png
wepz97934.png (174.07 KiB) Viewed 466 times
wepz9473498.png
wepz9473498.png (173.89 KiB) Viewed 468 times
User avatar
yorik
Founder
Posts: 12802
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: font could not be changer for text

Post by yorik »

Still works for me, in both 2D and 3D modes.

But we've already seen that in the past... The font you are seeing is Coin3D's default, embedded font, which is always available. Coin3D uses that font when it's unable to load another font. Unfortunately it seems to depend on the system, and it's not easy to see what's wrong.

Ideally more people should test until we can identify a specific combination of OS + video card/driver + coin version that causes this issue
User avatar
ragohix769
Posts: 435
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: font could not be changer for text

Post by ragohix769 »

yorik wrote: Tue May 24, 2022 11:04 am Still works for me, in both 2D and 3D modes.

But we've already seen that in the past... The font you are seeing is Coin3D's default, embedded font, which is always available. Coin3D uses that font when it's unable to load another font. Unfortunately it seems to depend on the system, and it's not easy to see what's wrong.

Ideally more people should test until we can identify a specific combination of OS + video card/driver + coin version that causes this issue
I really don't know how to debug this, but as you can see also the original poster has the problem. Maybe it's because I use freecad-daily and that's has some flag in compilation, I don't know how to help to find the problem, I'm not a programmer (not skilled, at least).
User avatar
yorik
Founder
Posts: 12802
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: font could not be changer for text

Post by yorik »

It is hard to debug, even for an experienced programmer, because it's happening inside Coin3D and it doesn't give any hint or message about what's happening. At FreeCAD we are mostly "users" of Coin3D, not their developers. And posting an issue on the Coin3D repo will likely not give result either, as it is not well maintained and they would probably argue it's FreeCAD's fault and not take time to look deeper into it.

The best way to attack this would probably be to make a very minimal test application that just opens a Coin3D view, displays a text, then tries to change its font. Without FreeCAD involved. That would demonstrate the problem is in Coin, but even so it would still need a Coin dev to attack it. Lot of work, as you see...

What is your graphic card and what is the driver and the driver version? We could start there...
User avatar
ragohix769
Posts: 435
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: font could not be changer for text

Post by ragohix769 »

yorik wrote: Fri May 27, 2022 10:28 am It is hard to debug, even for an experienced programmer, because it's happening inside Coin3D [snip]
Thanks a lot for your explication :-)
For what I understand, it's complicated degub this because there is even no error at all. It's strange that Coin3D don't send any warning if he uses/forces his internal font rather then the external selected.
What is your graphic card and what is the driver and the driver version? We could start there...
I'm using a Ryzen 7 APU, so it's a VEGA/Radeon class GPU. I'm using the Opensource MESA driver default in Kubuntu 20.04 (that, I have to say, it's working really well for other graphic applications, even games, Proton, etc etc), I'm not using any special repo for graphics, all default.
vm4dim
Posts: 77
Joined: Tue Nov 23, 2021 1:05 am

Re: font could not be changer for text

Post by vm4dim »

yorik wrote: Fri May 27, 2022 10:28 am The best way to attack this would probably be to make a very minimal test application that just opens a Coin3D view, displays a text, then tries to change its font.
It might be useful.
https://github.com/coin3d/pivy/blob/mas ... ext.py#L41
/usr/share/doc/python3-pivy/examples/Mentor/06.1.Text.py
Post Reply