fix: sketch.text refuses inputs it doesn't understand (#1057)
sketch.text and sketch.edit_text took at, height, angle and text with a silent default when a value had the wrong kind, so a height of "H" made 5 mm text and at: ["H", 25] put it at the origin. An input that is given (not null) now has to be what it names, or the command is refused with the input's name, and a null at no longer passes as the origin.
This commit is contained in:
1 parent
f2d7b220f7
commit
37113c0c13
3 files changed
+147
-7
No files matched your search
@@ -46,7 +46,9 @@ circle and update the outline when the inline **Sides** value changes.
|
||||
`sketch.edit_text` take a `font`, the family or full name of an installed font ("DejaVu Sans") or the path
|
||||
of a `.ttf` / `.otf` file, and the **Edit Text** dialog has a **Font** field for it. An unknown font is an
|
||||
error, and the font is kept with the text in the design, so the text stays editable in it. `SOLIDCRAFT_FONT_DIRS`
|
||||
adds folders to the ones searched for installed fonts.
|
||||
adds folders to the ones searched for installed fonts. The same two commands refuse a `text` that is not a
|
||||
string, an `at` that is not two numbers, and a `height` or `angle` that is not a number (or a `height` that is not
|
||||
positive) with a message, instead of drawing the text with a default; left out, they keep their defaults.
|
||||
|
||||
Right-click a letter's filled interior or outline and choose **Edit Text**. You can also
|
||||
start **Edit Text** first and click the letter. All outlines belonging to that text are
|
||||
|
||||
Reference in new issue
Block a user