what's going on with shapestring?

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!
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

what's going on with shapestring?

Post by Vincent B »

ShapeString doesn't correct display with my freecad.
(font is window's Arial)

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.29936 (Git)
Build type: Release
Branch: master
Hash: 3db79c907cd7ef2f75597efdd82ae288ac23ad01
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: French/France (fr_
Attachments
Capture.JPG
Capture.JPG (19.97 KiB) Viewed 1405 times
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: what's going on with shapestring?

Post by wandererfan »

Vincent B wrote: Fri Aug 12, 2022 5:00 pm ShapeString doesn't correct display with my freecad.
The squares represent a glyph that can't be drawn. Does the string have diacritical marks (accent grave, accent circonflexe, etc)?
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: what's going on with shapestring?

Post by Roy_043 »

Confirmed.

Note that the ShapeString String property is "Default" in the image. The problem is not caused by the Draft code AFAICT (Draft uses Part.makeWireString to create the wires).

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.21.30058 (Git)
Build type: Release
Branch: master
Hash: cb96332a64db8ae855ca700212eebb0f5151230a
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: Dutch/Netherlands (nl_NL)
Installed mods: 
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: what's going on with shapestring?

Post by mario52 »

Hi

no problem C:/Windows/Fonts/arial.ttf

good also if the size = 0.5 mm and spaces between two characters

DraftShapeString00.png
DraftShapeString00.png (4.69 KiB) Viewed 1296 times

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.30058 (Git)
Build type: Release
Branch: master
Hash: cb96332a64db8ae855ca700212eebb0f5151230a
Python 3.8.13, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: French/Mars(fr_MA)

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: what's going on with shapestring?

Post by Vincent B »

ok with this version ;)
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: what's going on with shapestring?

Post by Roy_043 »

So the problem is Python 3.10.5 related?
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: what's going on with shapestring?

Post by Syres »

@looo are you aware that the Python 3.10.x Windows Conda build produces the error raised by the OP but the Python 3.8.x equivalent on the same box with the same font is fine?
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: what's going on with shapestring?

Post by looo »

Syres wrote: Sun Aug 14, 2022 11:05 pm @looo are you aware that the Python 3.10.x Windows Conda build produces the error raised by the OP but the Python 3.8.x equivalent on the same box with the same font is fine?
only windows? or is it a general py3.10 issue?
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: what's going on with shapestring?

Post by Roy_043 »

FYI another post reporting the same bug:
https://forum.freecadweb.org/viewtopic.php?f=23&t=71383
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: what's going on with shapestring?

Post by Syres »

looo wrote: Wed Aug 17, 2022 4:06 pm only windows? or is it a general py3.10 issue?
I eventually got round to downloading and adding the Arial font to my Linux Mint 20.3 partition and tested with your latest AppImage and it works fine so looking like a Windows only with Python 3.10.x issue to me. I noticed py 3.10.6 only appeared on conda forge literally 2 days ago so I'll attempt to build an environment on my miniconda locally and see if it's any different.
Post Reply