Draft: ShapeString: use an actual font file as default, allow TTC files

* To help novice users supply an actual font file from the OS as the default for ShapeStringFontFile.
* The Draft code blocked the use of TTC font files. `Part.makeWireString()` can however handle them (although only the first font in the file can be used).

Additonally:
In a previous PR the bottom spacer was removed from the task panel. This PR brings it back as it is required in some cases. Without it  the "..." button of the file selector can become huge.
This commit is contained in:
Roy-043
2025-05-04 11:32:18 +02:00
committed by Yorik van Havre
parent 02c3ecc5d0
commit d9ad0f0800
3 changed files with 43 additions and 7 deletions

View File

@@ -146,7 +146,7 @@ class ShapeString(DraftObject):
if not os.path.isfile(font_file):
_err(obj.Label + ": " + translate("draft", "Specified font file is not a file"))
return
if not os.path.splitext(font_file)[1].upper() in (".TTF", ".OTF", ".PFB"):
if not os.path.splitext(font_file)[1].lower() in (".ttc", ".ttf", ".otf", ".pfb"):
_err(obj.Label + ": " + translate("draft", "Specified font type is not supported"))
return