Quantcast
Channel: Glyphs News, Events and Tutorials
Viewing all articles
Browse latest Browse all 578

Reusing Shapes: Smart Components

$
0
0

Imagine you want to re-use the shoulder of your lowercase n, for example, in your lowercase m or h. Sure, you could do that with components like we did with slab serifs. There is one problem with using regular components, though: they are static.

But we need to adjust the shoulders in the m. Most people like to have them a little narrower. That is because the two shoulders would add up too much whitespace in a single letter.

shoulder-m

Also, on the lowercase h, most designers will drag down the crotch to make the white incision appear as deep as in the n. That is because the stem of the h cannot be adjusted as easily as the upper serif of the n.

shoulder-h

That is why normal, static components are of no use for us here. We need a better solution.

Setting up a Smart Glyph

We will turn the shoulder into a Smart Component. Double click the shoulder of the n to select it. Then right-click to bring up the context menu, and pick Component from selection:

componentFromSelection

When you are prompted for a Name of the Component Glyph, you enter a name that starts with _part, because it is a part we can reuse in other glyphs. Also, Glyphs created with an underscore at the beginning will be set to non-exporting by default, which makes sense for us. Assuming that you will have more than one Smart Component in your font, you should finish it with a dot suffix. In our case, I suggest .shoulder:

nameOfTheComponentGlyph

A separate glyph called _part.shoulder will be created. Let’s add anchors so the art can connect to other parts. First, we can add an anchor for the following part to connect. We can call it connect and align it to the right edge of the stem.

Then, we need an anchor, so _part.shoulder can connect to a preceding part. Assuming that the preceding one has a connect anchor in it, the corresponding anchor must be called _connect with an underscore at the beginning. Since they should all have the same height (i.e., y coordinate), I suggest keeping the anchors on the baseline. Once we are done, it could look like this:

partWithAnchors

Because it starts with _part, it is recognized as a Smart Glyph. But as long as it does not have any extra layers, it is not very smart yet. So, let us copy the current layer twice, and name the layers NarrowShoulder and LowCrotch. You can do that in the Layers section of the Panel sidebar (Cmd-Opt-P):

layersPanel

Now, you can activate the NarrowShoulder layer, and nudge it a little tighter: Select the right half of the shoulder, hold down the Ctrl and Option keys, and press the left arrow key. The selected part will move to the left, and the surrounding handles will be adjusted proportionally. Add Shift for increments of 10 units:

nudgeShoulder

Do the same on the LowCrotch layer, but this time, you select the two leftmost nodes and nudge them down to achieve a lower crotch. The simple nudging should do as a start. You can refine the shape later.

Now, with _part.shoulder still active, right-click in the canvas to bring up the context menu, and choose Show Smart Glyph Settings. Or, with the same effect, choose Edit > Info for Selection (Cmd-Opt-I):

showSmartGlyphSettings

In the dialog sheet that appears, you add a property called shoulderWidth with the Plus button, and enter 0 and 100 as its Limits. The name and the numbers are more or less arbitrary, the Bottom limit is required to be smaller than the Top limit, though. And the values should make sense to you. I choose zero to represent the minimum width of the shoulder, and a hundred for its maximum.

Then, add a second property called crotchDepth with -100 and 0 as its limits. To me, -100 best represents the lowest crotch, and zero the normal crotch.

smartProperties

Then, switch to the Layers tab of the dialog sheet. Here, you tell Glyphs which property values apply to which of the layers. In our case, this could be:

  • Regular: crotchDepth 0 and shoulderWidth 100
  • NarrowShoulder: crotchDepth 0 and shoulderWidth 0
  • LowCrotch: crotchDepth -100 and shoulderWidth 100
smartLayers

Once you set all properties for all layers, you can confirm the dialog by clicking on the OK button.

Adjusting the Smart Component

Now, back in glyphs like h, m, and n, you can delete the vector shoulders, and insert _part.shoulder as a component with Glyph > Add Component (Cmd-Shift-C).

Now, if you right-click on the component, and choose Show Smart Component Settings from its context menu, or, alternatively, select the component and choose Edit > Info for Selection (Cmd-Opt-I), you will be presented with a slider dialog. Use the sliders to interpolate the Smart Component in place:

sliders

In order to make use of the anchors, it makes sense to also turn the stem into a smart glyph with a connect anchor. And perhaps add an extra layer for different bends on the top serif, so you can achieve various degrees of incisions. In any event, this is what _part.stem could look like:

stem

Automatic alignment with anchors only works if all parts of the glyph are components. As soon as there is a regular path in the glyph, automatic alignment is cancelled, and anchors are ignored.

Now, for instance in the lowercase m, place _part.stem as the first component, and subsequently _part.shoulder twice. You will see that they connect nicely at the anchors. And again, you can adjust the parameters for the Smart Components:

smartM

SAMPLE FONT: VESPER, COURTESY OF ROB KELLER AND KIMYA GANDHI

Smart Components as CJK radicals

The original intention of Smart Components was a better way for designing CJK glyphs. In Chinese, Japanese and Korean, some characters get reused in other, more complex ideographs. These characters are therefore called radicals, because they form the root (latin ‘radix’) for other characters.

For that reason, not only glyphs that start with _part count as Smart Glyphs, but also all CJK radicals. Naturally, that is also where Smart Component setups tend to become more complex:

CJKradical

Viewing all articles
Browse latest Browse all 578

Trending Articles