Round Corner Filter Custom Parameter Inline Font

Hey there! I’m trying to round the corners of my font as an instance custom parameter. The font has an inline, so it’s messing with the way the app sees what should be rounded and what shouldn’t be, since the inline shape is technically a ‘black’ shape, you can see in the D below. Is there anyway to just have the filter apply to the first shape and none of the other ones?

Suggesting — just split the forms on to different layers, apply the filter and combine them again. Some boring repetitive cut-paste, but you will get a result in 15 mins.

Yeah that’s what I plan to do if this fails. The problem is it’s a typeface with two axis and three weights (light and bold didn’t interpolate well enough for the regular weight so that was needed as well.) So it’s a bit more than just 15 minutes, especially when you consider how long it would take just to split up the glyphs of cps, lc, smcp, numbers, punctuation and non-component latin characters onto different layers, then run the script, bring them all back in together and fix compatibility issues.

You could add a corner component to get the rounding effect. And in the instances where you don’t like them, add a ‘Remove Glyph’ Parameter to remove the ‘_corner’ glyph. That prevent the rounding.

That would have been a great idea for when I started :woman_facepalming:

I feel like at this point that would take just as long, if not longer to apply to every non-component glyph over the 6 masters than just applying the round corner filter. It’s okay if there’s nothing that can be done in the custom parameters, I just thought I would ask.

Aiaiai!
But suppose, you will go mad when clicking and defining all corner components on all masters at current stage and you will spend at least twice time comparing when you just separate contours, applying the filter and combining them again. Sure, it is not 15 mins in your case, more like two days, but you will get a guaranteed result.

See the bright side as well! By separating the forms, you will also have as a bonus the solid and inline versions of your fonts.

Applying all the corners could be scripted as could be the combination of the layers. This is a very good example for why one might know at least some basic python :wink:

Ah, yes, that…my biggest weakness. I try and try to wrap my head around it and fail every time. :weary:

Have you read our python tutorials?

Yes, and I’ve done several workshops. I find it very easy to understand the basics but once we move past that I start to get lost. I can follow instructions but don’t do well with coming up with how to do something on my own.

Applying all the corners could be scripted as could be the combination of the layers.

:arrow_up: I would have no idea where to even start with that.

Ha! You are right, and I’m totally fine doing that, I just hate the feeling of inadequacy in taking three days to do something that if I knew how to do it properly would only take 1 hour (or more, who knows :woman_shrugging:)

Thanks for the encouragement…guaranteed result is definitely important. And off I go on my two day adventure :wink:

We’ll help you with the Python code, no prob.

1 Like

Put this into a .py file and save it in the script folder. Please try to read the script, too :wink:

#MenuTitle: Add round corner components
# -*- coding: utf-8 -*-
__doc__="""
Add round corner components to selected nodes.
"""

from GlyphsApp import objcObject

for node in Layer.selection:
	if isinstance(node, GSNode):
		corner = GSHint()
		corner.type = CORNER
		corner.name = "_corner.round"
		corner.originNode = node
		Layer.hints.append(objcObject(corner))
		corner.updateIndexes()

Then you can assign a shortcut, select a path and run the command.