So far I haven’t been able to use Cursify effectively, but I think I know where the problem lies: the algorithm applies a correct transformation to the outer curves but not to the inner ones, which should go in the opposite direction (bottom left and top right corners should smoothen up instead of becoming sharper).
I’d like to fix this and code a more precise version of it, but honestly I can’t figure out how to replicate the transformation cursivy is applying to the shapes.
It would be amazing if @GeorgSeifert could share either the code or insight about the process and I’d try to take it from there
Have you had a look at the code in my Italify plugin? It’s very different, but I dare say it works better.
Hi Sebastian, thank you for replying! Yes, I’ve tested your plugin and I’ve written a similar script myself, which also applies scaling. That said, I have used the rotation+slant method (or vertical + horizontal shearings) so far and, despite finding it useful as a foundation, I find it a bit limited. The cursivy one solves shapes like B pretty well, since it compensates the curves without rotating the shape or tilting the horizontal stems, so it wouldn’t need many adjustments if only it could differentiate between inner and outer paths. I think ultimately a hybrid approach is what would work best in this case!
And Jeremy Tribby @tribby also made a script called Better Oblique, I used it a lot successfully: font-scripts/Glyphs/Better oblique.py at master · jpt/font-scripts · GitHub
that one is outdated, more of a test. new plugin is done, with many strategies built in, I just haven’t published it yet
cursify has more options than are actually exposed in the glyphs UI. I expect this will change in a glyphs update soon
Thank you for replying both of you!
I’ve tested Jeremy’s script, which apply a similar strategy to my script and Seb’s one (vertical + horizontal skewing). Again, good approximation but not very easy to work on.
Cursivy is better at handling straight stems attached to curves, and that’s where I wanna use it.
I’m attaching a screenshot of a B transformed with Cursivy: first one is the upright version, second is the current cursivy algorithm, third is when you reverse the inner paths before using it. As you can see, this works much better than the rotation/skewing method
As opposed to:
I was trying to get the Smart Italify to a good spot, but I gave up at some point because my mathematics skills are too bad.
Have you tried Smart Italify on the B? It should work. It won’t on most glyphs, at least for most path structures, it currently requires a very specific path structure.
I can’t make it work properly:
But I think the issue here is that the rotation + shear is not the correct approach for these shapes. What we should achieve is making the curves (which are usually equivalent to a rounded corner) softer and wider if they sit at the sharp end of the shearing box, and viceversa. In the case of this B, this is equivalent to simply shearing the curve back horizontally, here’s an example:
Cursify seems to do exactly that for more complex shapes, but I’d love to inspect it to understand better!