A glyph contour contains points set {p}, a point contains tuple (x,y,on_curve).

Now, think about this need, converting contour of glyph X, for example, into to two contour parts or two strokes, point set of each stroke is similar with contour of glyph \ and /, topologically? Forgive my mouthful description.

Other examples (symbols at right of -> are shapes how these parts look like):

A -> / \ -

B -> | 3 or | ) )

C -> C

D -> | )

E -> |---

F -> |--

G -> C-|

PS: I don't know whether there any algorithm exists for this need. I use python and hope to make it with Python programming.

  • $\begingroup$ Welcome to CS@SE. What is the expected input, what is the required output? Have a look how glyphs are specified in PostScript (Type 1) supplement. $\endgroup$
    – greybeard
    Dec 9 '19 at 4:43
  • $\begingroup$ @greybeard Thanks for your links, and the input is any glyph from any TrueType font, for example, arial, the output will be several generated glyphs, each of them consists of a subset of the source points set, maybe some other new points for curve painting, which can be saved into a font with new codepoint (maybe private use area). $\endgroup$
    – oner ptkh
    Dec 9 '19 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.