v2.1.4 – Combine Shapes!

The short blog post

In this version we are very happy to ship a few bug fixes (Export to OTF and Delete Kern Groups) and also introduce two new-ish features. The smaller one being “Previous Item” and “Next Item” buttons that let you easily cycle through glyphs in your project. This was a v1 thing, and we just brought it back to v2. The second big new feature is Combine Shapes! Now you can multi-select shapes and do boolean actions on them, like: Unite, Divide, Subtract, Exclude, and Union.

The longer blog post / rant

Digging through the blog archives, I determined that we first launched a “Combine Shapes” action way back in December of 2015 with Version 1.04. There was a lot of work and a lot of learning that went into this feature… there was some previous work with Bezier curves (for figuring out bounding box dimensions) but calculating intersection points, then trying to figure out what pieces to merge and which ones to discard – it was complicated.

Over the years, there have been quite a few bugs around the Combine Shapes action. Even though many were fixed, this feature never quite worked perfectly. Actually I’ll go a step further and say it’s a feature that failed often enough to make it not dependable. Our official guidance started to become something like “If combine shapes doesn’t work in Glyphr Studio, go try it in Illustrator or Inkscape and re-import the shapes.” This is not great.

There is also this lingering philosophical thing with Glyphr Studio about not using external libraries for the basic functionality. We use Opentype.js to read and write OTF files, but that’s basically it… no JavaScript framework libraries or helper libraries, we roll bespoke code for everything. Sounds kinda cool, until a feature like Combine Shapes hasn’t worked for like 10 years.

For me, Glyphr Studio was always about the journey of learning, and not necessarily a place to make logical development / architecture decisions. One could, for example, make a web-based font editor pretty easily by choosing some UI framework and React, and connecting Paper.js to Opentype.js – it would certainly be far less work than what has gone into Glyphr Studio. But like I said, that’s not the point.

This is all just a very long way of saying – ugh, we started using Paper.js in the project. Not for, like, everything (Paper.js is pretty awesome and can do tons)… just for these Combine Shape actions. For everything else, I’m still being stubborn spending extra time to build things myself.

Have fun with the new boolean combine actions, now with improved dependability™.

Oh, and this

While reminiscing through the v1 commit history, I discovered this gem, which made me lol:

Remember the hamburger menu from v1? It was animated. I loved it.