Skip to content

Added closed exploded letters into design (R12 and closed polylines) #993

Answered by mozman
XiaoPhysLab asked this question in Q&A
Discussion options

You must be logged in to vote

I have good and bad news for you:

  1. good: You don't need the path.render_splines_and_polylines() function and therefore no SPLINE entities and r12export module
  2. good: ezdxf has the tools to group the paths of a letter into a single polyline
  3. bad: the result is not what you need
from string import ascii_letters
import ezdxf
from ezdxf.fonts import fonts
from ezdxf import path
from ezdxf.addons import text2path

doc = ezdxf.new(dxfversion=ezdxf.DXF12)
msp = doc.modelspace()

ff = fonts.FontFace(family="JetBrains Mono")
text_path = text2path.make_path_from_str(ascii_letters + "0§$%&", ff, size=100)
for char in path.group_paths(path.single_paths([text_path])):
    vertices = []
    for subpath in 

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@XiaoPhysLab
Comment options

Comment options

You must be logged in to vote
1 reply
@XiaoPhysLab
Comment options

Answer selected by XiaoPhysLab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants