Request for more options for text object's FontName.

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Mark Szlazak
Posts: 439
Joined: Tue Apr 04, 2017 6:06 pm
Location: SF Bay Area, California

Re: Request for more options for text object's FontName.

Post by Mark Szlazak »

wmayer wrote:
Thanks wmayer but I get nothing happening when i tried these in the console. How am I suppose to use this?
Select the object in the Tree view and then in the Data tab of the Property Editor you get a "Font" item which you can click on.
Nothing has changed. There is no "Font" item.

BTW, I am in the Part workbench using the latest FreeCAD 0.16 on Ubuntu 16.04.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Request for more options for text object's FontName.

Post by yorik »

Mark Szlazak wrote:Nothing has changed. There is no "Font" item.
Werner is just explaining how to use the code sample he provided, the text object in FreeCAD hasn't been changed yet.
wandererfan wrote:
for X11 (Linux and ?OSX?)
Yeah read those already... This won't work on windows apparently.
There are several kinds of hacks out there to get a font name from a QFont, but nothing truly cross-platform, and got lazy to adapt.. But probably the solution is to make our own function that would try different methods depending on the platform.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Request for more options for text object's FontName.

Post by Jee-Bee »

yorik wrote:There are several kinds of hacks out there to get a font name from a QFont, but nothing truly cross-platform, and got lazy to adapt.. But probably the solution is to make our own function that would try different methods depending on the platform.
I know from Pro-E when creating or editing text a pop-up is opened with all kind of editting options like font type; textsize; bold; Italic; underlined; super/sub script; aligning; etc
Is that something that could work or is that also lot's of effort.
I found a link but probably made for windows(?) http://doc.qt.io/qt-5/qtwidgets-richtex ... ample.html
Post Reply