It looks like you're new here. If you want to get involved, click one of these buttons!

- 3.3K All Categories
- 9 Introductions
- 2.7K Typeface Design
- 462 Font Technology
- 845 Technique and Theory
- 363 Type Business
- 328 Type Design Critiques
- 437 Type Design Software
- 29 Punchcutting
- 73 Lettering and Calligraphy
- 44 Technique and Theory
- 29 Lettering Critiques
- 281 Typography
- 194 History of Typography
- 81 Education
- 6 Resources
- 372 Announcements
- 60 Events
- 78 Job Postings
- 111 Type Releases
- 122 Miscellaneous News
- 195 About TypeDrawers
- 44 TypeDrawers Announcements
- 82 Suggestions and Bug Reports

Linus Romer
Posts: **72**

While working on my type family Elemaints, I have written several scripts that enhance the capabilities of FontForge. On https://github.com/linusromer/harmonize-tunnify-inflection I have published some of these tools, as you might find them useful too, if you are using FontForge.

3

## Comments

2825593928225172work now with older versions of FontForge(e.g. from 2017) too.In automated processes one will still need a script in order to add points of inflection.

I have never claimed any of these contours to be perfect. The non-horizontal-or-vertical node on the dot contour should demonstrate that the tools will work for such nodes, too.

@ivan louette I think I have figured out what probably happend: You inserted an inflection point at the end of a contour. This led to a problem because the end node is identical with the start node. I have fixed this bug now. I hope it will work now for you.

2827228269I use Windows 8.1 and the latest an official version of FontForge.

25172697250725050https://www.upwork.com/ab/applicants/1219390351307173888/job-details

25150251501,051https://typedrawers.com/discussion/comment/15766/#Comment_15766

50Is this script still around? I've found your github repository, but I can't identify it. Much appreciated.

721,0511872# starting in q and going to r. The value is positive, iff

# p is right from the line.

def side(px,py,qx,qy,rx,ry):

a, b = rx-qx, ry-qy

return ((py-qy)*a-(px-qx)*b)/(a**2+b**2)**.5

# Given two adjacent cubic bezier curves (a,b), (c,d), (e,f), (g,h)

# and (g,h), (i,j), (k,l), (m,n) that are smooth at (g,h)

# this method calculates a new point (g,h) such that

# the curves are G2-continuous in (g,h).

def harmonize_cubic(a,b,c,d,e,f,g,h,i,j,k,l,m,n):

if e==i and f==j:

return g, h # no changes

d2 = abs(side(c,d,e,f,i,j))

l2 = abs(side(k,l,e,f,i,j))

if d2 == l2: # then (g,h) is in mid between handles

return .5*(e+i), .5*(f+j)

t = (d2-(d2*l2)**.5)/(d2-l2)

return (1-t)*e+t*i, (1-t)*f+t*j

`T`

his algorithm may be faster as well (but please check yourself). The mathematics behind are explained in https://github.com/linusromer/curvatura/blob/master/curvatura-doc.pdf. The idea behind the function `side()` is: length of the crossproduct over the length of the one vector equals the height of the spanned parallelogram.1872