lbrn2 output: Suppress output of empty text fields
This commit is contained in:
parent
70c49afb57
commit
cf99c93400
|
@ -890,6 +890,9 @@ class LBRN2Surface(Surface):
|
||||||
if self.dbg: print ("t8")
|
if self.dbg: print ("t8")
|
||||||
if self.dbg: print ("o: ", text, txtOffset, offs)
|
if self.dbg: print ("o: ", text, txtOffset, offs)
|
||||||
|
|
||||||
|
if not text:
|
||||||
|
if self.dbg: print ("T: text with empty string - ",x, y, c)
|
||||||
|
else:
|
||||||
sh = ET.SubElement(svg, "Shape", Type="Text", CutIndex=str(fontColor), Font=f"{f}", H=f"{(params['fs']*1.75*0.6086434):.3f}", Str=f"{text}", Bold=f"{'1' if bold else '0'}", Italic=f"{'1' if italic else '0'}", Ah=f"{str(hor)}", Av=f"{str(ver)}", Eval=f"{texttype}", VariableOffset=f"{str(offs)}") # 1mm = 1.75 Lightburn H units
|
sh = ET.SubElement(svg, "Shape", Type="Text", CutIndex=str(fontColor), Font=f"{f}", H=f"{(params['fs']*1.75*0.6086434):.3f}", Str=f"{text}", Bold=f"{'1' if bold else '0'}", Italic=f"{'1' if italic else '0'}", Ah=f"{str(hor)}", Av=f"{str(ver)}", Eval=f"{texttype}", VariableOffset=f"{str(offs)}") # 1mm = 1.75 Lightburn H units
|
||||||
sh.text = "\n "
|
sh.text = "\n "
|
||||||
sh.tail = "\n"
|
sh.tail = "\n"
|
||||||
|
|
Loading…
Reference in New Issue