Draft Text -> Font problem

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Packmers
Posts: 18
Joined: Wed Aug 01, 2018 6:18 pm

Draft Text -> Font problem

Post by Packmers »

Hi
i tried to generate a text with draft on a solid. I works until i've to select a font. Then comes a failure in the output an it hangs on the font input. no shape is generated. I tried with different fonts- no chance.
When I write i.e. "kjkjkj" (without selecting an ttf) it produces a shape on the tree. Now i can select my font without a problem and it works.
I tried this with 18.3 and 19.17803
packmers... :oops:

Thats the failuremessage:

Code: Select all

Draft workbench activated
Pick ShapeString location point
Traceback (most recent call last):
  File "C:\FreeCad\FreeCAD_0.19.17803_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Draft\DraftGui.py", line 1663, in pickFile
    self.FFileValue.setText(fname)
TypeError: 'PySide2.QtWidgets.QLineEdit.setText' called with wrong argument types:
  PySide2.QtWidgets.QLineEdit.setText(bytes)
Supported signatures:
  PySide2.QtWidgets.QLineEdit.setText(str)
User avatar
wandererfan
Veteran
Posts: 6320
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Draft Text -> Font problem

Post by wandererfan »

Packmers wrote: Fri Aug 23, 2019 7:22 pm i tried to generate a text with draft on a solid. I works until i've to select a font. Then comes a failure in the output an it hangs on the font input. no shape is generated. I tried with different fonts- no chance.
When I write i.e. "kjkjkj" (without selecting an ttf) it produces a shape on the tree. Now i can select my font without a problem and it works.
Are you using the Toolbar interface or the TaskView interface?
DraftInterfaceMode.png
DraftInterfaceMode.png (122.68 KiB) Viewed 1490 times
I get an different error with Toolbar, but Taskview seems to work fine.
Toolbar mode error: "1.64e-07 <App> Document.cpp(3045): Recusrive calling of recomput for dcument Unnamed"
Packmers
Posts: 18
Joined: Wed Aug 01, 2018 6:18 pm

Re: Draft Text -> Font problem

Post by Packmers »

Hi
I found, it works, when I use a default Font, in the setup of draw.
It doesn't work if I select and load the font during the Shape- Generating.
packmers... :|
User avatar
wandererfan
Veteran
Posts: 6320
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Draft Text -> Font problem

Post by wandererfan »

Packmers wrote: Mon Aug 26, 2019 2:09 pm It doesn't work if I select and load the font during the Shape- Generating.
Confirmed in freecad-daily:

if Shapestring default font file is empty, and
user is in Toolbar mode:
attempting to select a font file results in

Code: Select all

Pick ShapeString location point
Please enter a font file.Please enter a font file.Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Draft/DraftGui.py", line 1663, in pickFile
    self.FFileValue.setText(fname)
TypeError: 'PySide2.QtWidgets.QLineEdit.setText' called with wrong argument types:
  PySide2.QtWidgets.QLineEdit.setText(bytes)
Supported signatures:
  PySide2.QtWidgets.QLineEdit.setText(unicode)
OS: Linux Mint 19 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)
User avatar
wandererfan
Veteran
Posts: 6320
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Draft Text -> Font problem

Post by wandererfan »

Packmers wrote: Mon Aug 26, 2019 2:09 pm I found, it works, when I use a default Font, in the setup of draw.
It doesn't work if I select and load the font during the Shape- Generating.
As a work-around, change to taskview mode and provide a default font file in Draft Preferences tab #4.
Post Reply