Hello all (especially Yorik as its about the arch workbench),
I'm still working on my big building model that is composed of hundreds of building parts, mostly panel so therefore hundreds of panel cuts, each one having its own font path that I cant find a way to make relative. As I want others to be able to use the file, I would like to find a way to make a font path relative, or at least an easy way to change all the font paths at once. Is there a workaround for that ?
Thanks
Arch Panel Cut : font path difficulties
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Arch Panel Cut : font path difficulties
Architect and fabmannager
Blender addict and freecad lover
http://www.viralata.fr
http://www.chantierlibre.org
Blender addict and freecad lover
http://www.viralata.fr
http://www.chantierlibre.org
Re: Arch Panel Cut : font path difficulties
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Arch Panel Cut : font path difficulties
Unfortunately at the moment I don't see an easy way to do that, other than instructing other users to install the font.. Of course the shapetext tool should support system fonts at some point, but internally it uses the freetype library which only works with paths, and I haven't found a reliable, cross-platform way to convert between a fontname and a font file path.
What you can do in the meantime to at least have all the ShapeText objects to point to a same location, for ex. a spreadsheet cell:
1) create a spreadsheet
2) create a cell with the font path
3) give that cell an alias
4) in each ShapeText, right-click the Font Name property, click "Expression"
5) Give it the name of your cell, something like: Spreadsheet001.MyFontName (the internal, unique name of the spreadsheet you find in the statusbar by hovering it with the mouse, and the MyFontName is the alias name of your cell
6) When you do that, some lines will by printed in the python console. So you can easily make a small script that does it again for all the shapetext objects of your document. Tell me if you need help with that.
What you can do in the meantime to at least have all the ShapeText objects to point to a same location, for ex. a spreadsheet cell:
1) create a spreadsheet
2) create a cell with the font path
3) give that cell an alias
4) in each ShapeText, right-click the Font Name property, click "Expression"
5) Give it the name of your cell, something like: Spreadsheet001.MyFontName (the internal, unique name of the spreadsheet you find in the statusbar by hovering it with the mouse, and the MyFontName is the alias name of your cell
6) When you do that, some lines will by printed in the python console. So you can easily make a small script that does it again for all the shapetext objects of your document. Tell me if you need help with that.
Re: Arch Panel Cut : font path difficulties
On Windows you can work with relative paths. But the start point of these paths depends on how you start FreeCAD.
For example:
A Document in folder D:\abc\def.
Fonts in folder D:\abc\def\fonts.
Double-click the document to start FreeCAD.
For the "Font File" property of a ShapeString fonts/xyz.ttf can be entered.
If you start FreeCAD from a shortcut the "Start in" folder of the shortcut is the start point of any relative paths.
I do not know if this also works on the other operating systems.
For example:
A Document in folder D:\abc\def.
Fonts in folder D:\abc\def\fonts.
Double-click the document to start FreeCAD.
For the "Font File" property of a ShapeString fonts/xyz.ttf can be entered.
If you start FreeCAD from a shortcut the "Start in" folder of the shortcut is the start point of any relative paths.
I do not know if this also works on the other operating systems.
Re: Arch Panel Cut : font path difficulties
It works on macOS too. It's a pity that the font path is not relative to the document path. Then it would be quite natural to place a special font file in the same folder as the document.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.