To create text
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: To create text
one user improvement could be to at least make an attempt to search typical font-dirs on the various os's,
or at least raise an infobox or something, that there is no font to make text with, if not a path is provided.
that should be fairly easy to code even for a complete beginner (python in draft, and suppose it's a one liner to raise a infobox in pyside),
so let's see who is the one to pick it up .
or at least raise an infobox or something, that there is no font to make text with, if not a path is provided.
that should be fairly easy to code even for a complete beginner (python in draft, and suppose it's a one liner to raise a infobox in pyside),
so let's see who is the one to pick it up .
Re: To create text
There is a parameter 'Default ShapeString font file'. IMO we should first check why this does not receive a usable default value.
Re: To create text
My first guess it that there is no one font file that can be expected to be resident on all platforms...
But, that is just a guess.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: To create text
You are probably right, Courier could be a candidate though. But I think anyway that it would be better to open the file selection box with preselection to fonts if no font file is selected.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: To create text
I agree, some attempt would be nice. I know remembering the path to the font directory is top most in my mind...not.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: To create text
Qt and Coin do manage to grab fonts from the OS. So technically it is possible. A Draft_Text (Coin based) can be created without specifying a font file for example. From the perspective of the end user it is hard to understand why the same does not apply to Draft_ShapeStrings (not Coin based).
Re: To create text
Matplotlib to the rescue?:
Note: slow when used for the first time.
Code: Select all
from matplotlib import font_manager
print(font_manager.findfont("Arial"))
print(font_manager.findfont("Sans"))
-
- Posts: 28
- Joined: Thu Dec 24, 2020 12:09 pm
Re: To create text
The fonts were at:
C:/WIndows/Fonts
I use the current windows version
I was able to type the text . Thanks
C:/WIndows/Fonts
I use the current windows version
I was able to type the text . Thanks
Re: To create text
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.
My macros on Gist.github here complete macros Wiki and forum.
-
- Posts: 39
- Joined: Fri Jan 24, 2020 10:11 am
Re: To create text
Hi!
I need to extrude the text from the cylinder. Tried to use this instruction: https://www.youtube.com/watch?v=fGCkKdXUBZU
Draft the text, make a projection and then cut it with bolean. But the problem is, that if text is too long, then projection on such cylinder is very deformed, how can I make a text to be projected perpendicularly to the cylinder not like projection from one side?
I need to extrude the text from the cylinder. Tried to use this instruction: https://www.youtube.com/watch?v=fGCkKdXUBZU
Draft the text, make a projection and then cut it with bolean. But the problem is, that if text is too long, then projection on such cylinder is very deformed, how can I make a text to be projected perpendicularly to the cylinder not like projection from one side?