Containers OpenType Features

Hi Fourm!

I’m trying to script container shapes for my circled numbers, to have strings of multiple circled figures. I’ve seen this pulled out in many typefaces but I couldn’t find a tutorial or a topic about it. Is there any recommended workflow?

Thanks in advance for your time!

Can you show a mock-up of what you want to do?

1 Like

Sure, here it goes:

Any news on this topic?

I’m thinking. You will have display issues if you split them vertically. Unless you find a smarter way to split, like this perhaps:

PNG-Bild

Then a contextual feature can do the necessary substitutions.

Sorry for the delay.

1 Like

I would cut vertically in three pieces. That makes it mare flexibel.

1 Like

Thanks both for your answers!
Cutting vertically was my idea as well, but I’m not sure how to write the feature code accordingly.
I thought about having an hexagon.init/medi/fina and putting anchors at the right/center/left of them respectively, then triggering the calt with a stylistic set.
Is that possible or advisable?

That can be done by a chaining contextual substitution. This is probably the most compact way to write that, but may be difficult to understand for a beginner:

in a calt feature:

sub @numbers' lookup Left @numbers' lookup Middle @numbers' lookup Right;

and a prefix containing some lookups:

@numbers = [one two three four five six seven eight nine zero];
lookup Left {
	sub @numbers by [one.left two.left three.left four.left five.left six.left seven.left eight.left nine.left zero.left];
} ALeft;
lookup Middle {
	sub @numbers by [one.middle two.middle three.middle four.middle five.middle six.middle seven.middle eight.middle nine.middle zero.middle];
} AMiddle;
lookup Right {
	sub @numbers by [one.right two.right three.right four.right five.right six.right seven.right eight.right nine.right zero.right];
} ARight;
1 Like