<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title><![CDATA[Glyphs Blog ]]></title>
    <link>http://glyphsapp.com/blog</link>
    <description></description>
    <dc:language>en</dc:language>
    <dc:rights>Copyright Glyphs 2013</dc:rights>
    <dc:date>2013-05-14T16:17:52+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />
    

    <item>
      <title><![CDATA[Lazy symbol glyphs]]></title>
      <link>http://glyphsapp.com/blog/lazy-symbol-glyphs/</link>
      <guid>http://glyphsapp.com/blog/lazy-symbol-glyphs/#When:16:17:52Z</guid>      
      <description>
      
        
        
          
        
          
                
        <![CDATA[
          <p>There is a range of glyphs an application may require to be present in your font. This includes mainly, but not only, mathematical symbols. Most of them are, even though required, very rarely used and totally boring to make. The good news is that you do not have to draw all of them. For the following 45 glyphs, you can let some magic happen:</p>

<pre><code>approxequal
asciicircum
asciitilde
at
backslash
bar
brokenbar
currency
dagger
daggerdbl
degree
Delta
divide
equal
estimated
fraction
greater
greaterequal
infinity
integral
less
lessequal
litre (afii61289)
logicalnot
lozenge
minus
multiply
notequal
numbersign
Omega
onehalf
onequarter
paragraph
partialdiff
perthousand
pi
plus
plusminus
product
quotedbl
quotesingle
radical
section
summation
threequarters</code></pre>

	<p>Some of them you probably already have in your font, but most likely not all of them. The funny thing about them is that you can automate the making of these glyphs!</p>

	<p>All you have to do is add a custom parameter called <code>Add missing symbol glyphs</code>. As <code>Value</code>, you can use <code>1</code>, <code>True</code> or <code>Yes</code>. Or even <code>Yes, please</code>, if you want to express your gratitude for the quality lifetime you are just about to save. Do not leave the <code>Value</code> field empty, since that disables the parameter, just like using <code>0</code>, <code>False</code> or <code>No</code>. The custom parameter has been implemented in Glyphs since the beta version 1.3.18.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/lazy-1.PNG" alt="" class="block">
                                  </p>

	<p>That’s it! Glyphs will then apply the <code>-adds</code> option of the <code>makeotf</code> command it uses to generate fonts under the hood. This option fills in all the symbol glyphs from the list which are still missing in your font. The coolest thing about it is that <code>makeotf</code> will not only try to match width and weight of your font, but that the synthetic glyphs are already perfectly hinted.</p>

	<h4>Synthetic glyphs</h4>

	<p>‘What? Synthetic glyphs?!’ I hear you say. Yes, synthetic. <a href="http://www.adobe.com/devnet/opentype/afdko.html/">Adobe’s Font Development Kit for OpenType</a> (<span class="caps"><span class="caps">AFDKO</span></span>), which is incorporated into Glyphs, comes with two Multiple Master fonts built in. These fonts contain all those symbol glyphs mentioned above. When you export a font with the <code>Add missing symbol glyphs</code> parameter, the weight and width of your font is measured and then applied to the masters, and the symbol glyphs will be synthesized and added to your font.</p>

	<p>But how can the <span class="caps"><span class="caps">AFDKO</span></span> find out both weight and width of your font? Let’s take a look what the user guide says:</p>

	<blockquote>
		<p>It requires the glyphs zero and O to be present in the font, in order to determine the required weight and width.</p>
	</blockquote>

	<p>So, make sure you have these two glyphs in your font, the figure zero and the capital Latin O. Then the magic can happen. But beware:</p>

	<blockquote>
		<p>However, MakeOTF cannot stretch the MM font data to match very thick strokes, very wide glyphs, and it cannot match the design’s stem contrast.</p>
	</blockquote>

	<p>But in most cases, it ought to work fine. And the glyphs are produced:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/lazy-2.PNG" alt="" class="block">
                                  </p>
        ]]>
      
      </description>
      <dc:subject><![CDATA[]]></dc:subject>
      <dc:date>2013-05-14T16:17:52+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Manual hinting]]></title>
      <link>http://glyphsapp.com/blog/manual-hinting/</link>
      <guid>http://glyphsapp.com/blog/manual-hinting/#When:17:50:47Z</guid>      
      <description>
      
        
        
          
        
          
        
          
        
          
        
          
        
          
                
        <![CDATA[
          <h4>Do we need hinting at all?</h4>

	<p>Hinting is a delicate subject. Some people say, it’s increasingly unimportant, or decreasingly important or whatever. And as far as anti-aliased font rendering goes on Apple devices, they’re probably right. Macs and iOS machines do roll their own hinting on the fly. Other systems, however, do still apply hints, at least up to a certain font size. Windows systems do, for instance, as do Adobe apps like InDesign and Acrobat. And if we’re going to hint our fonts, we might as well do it right.</p>

	<p>For most cases, <a href="http://glyphsapp.com/blog/what-you-need-to-know-about-autohinting/">automatic hinting</a> will do just nicely. But some letters may turn out to not align properly at low resolutions or simply look super-bad as opposed to nice and crisp. Here’s an example of an <code>eight</code>. The top row shows the autohinted glyph, which looks somehow distorted, especially in the middle rendering. In the bottom row, you can see the same <code>eight</code>, but this time manually hinted. Pay attention to how the figure is rendered more symmetrically and more upright:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/manualhinting-5.png" alt="" class="block">
                                  </p>

	<p>Mind you, not every font can be hinted satisfyingly. Ideally, your font has traits as regular as possible, i.e. re-uses its stem widths a lot, all its overshoots have approximately the same size etc. If, however, you have a very irregular design, like a grunge-style font, or a scanned handwritten font, you may want to consider not hinting it in the first place.</p>

	<h4>Font-wide settings</h4>

	<p>First, we need to set standard stem widths and alignment zones in the Masters section of the Font Info. We already covered that in the <a href="http://glyphsapp.com/blog/what-you-need-to-know-about-autohinting/">blogpost about autohinting</a>, so I am not going to repeat that here. All you have to make sure now is that all your overshoots and horizontal stems that need to be aligned reach into those zones, no more no less.</p>

	<h4>Autohinting</h4>

	<p>The first step now is to export the font (Cmd-E) with autohinting enabled. And then, you test your font in InDesign at low resolution, i.e. at low zoom levels. It’s a very good idea to <a href="http://glyphsapp.com/blog/testing-your-fonts-in-adobe-apps/">use the Adobe Fonts folder</a> for that purpose.</p>

	<p>Inevitably, you will come across a few letters that just don’t seem to cut it. It’s these letters that we’ll have to hint manually. Very likely candidates: letters with diagonals.</p>

	<h4>Manually hint single glyphs</h4>

	<p>So, we go into those glyphs and have to do manually what the autohinter couldn’t do. Now concentrate:</p>

	<p>First, make sure all extremum nodes are set. Perhaps you want to choose <em>Layers &gt; Add Extremes</em>. You can also switch to the Path tool (P) and Shift-click on an outline segment to insert a node at the extremum.</p>

	<p>Secondly, identify horizontal stems: Look for horizontal design elements that reach into an alignment zone, e.g. a serif, the crossbar of the t or f, or the upper curve of the o where it turns horizontal for a brief moment. For each such element, select both its top and bottom extremum nodes, right-click to open the context menu and choose <em>Add horizontal hint</em>. Glyphs will apply a horizontal hint encompassing the extremum points.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/manualhinting-1.gif" alt="" class="block">
                                  </p>

	<p>Thirdly, look for vertical stems. It’s the same story as with horizontal stems, only this time, alignment zones do not matter. Again, select two extremes, right-click and choose <em>Add vertical hint</em> from the context menu.</p>

	<h4>Ghost hints</h4>

	<p>Sometimes, a glyph reaches into a zone, but lacks that horizontal element that you so desperately want to hang a hint on. For these dramatic situations, the wise inventors of hinting invented ghost hints. In short, a ghost hint says, ‘Okay, there’s no serif here, but I’ll act as if I was one, and I’ll align myself to the alignment zone.’ </p>

	<p>You can add a ghost hint by selecting a top or bottom extremum node, and choosing <em>Add Horizontal Hint</em> from the context menu:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/hinting-6.PNG" alt="" class="block">
                                  </p>

	<p>You can convert a horizontal hint into a ghost hint by right-clicking on the grey number badge next to the hint and choosing <em>Make Ghost Hint</em>:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/manualhinting-2.png" alt="" class="block">
                                  </p>

	<p>There are ghost hints for bottom zones and ghost hints for top zones. The grey info badge at the bottom indicates which one you have at your hands. Just click on the word ‘bottom’ or ‘top’ and it will switch its orientation.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/manualhinting-3.png" alt="" class="block">
                                  </p>

	<p>The classic example for this is an uppercase sans-serif I. First you add two horizontal hint. Then you turn them into ghost hints and make sure one is a <em>bottom</em> ghost hint and the other a <em>top</em> ghost hint. The ghost hints will show a blue circle which you can drag on one of the top or bottom nodes, respectively. Here’s what the ghost hints look like in an uppercase I:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/manualhinting-4_1.png" alt="" class="block">
                                  </p>

	<p>This way you can make sure your sans-serif letters align properly with each other at low resolutions.</p>

	<blockquote>
		<p>Note: before you make heavy use of ghost hints, please update to version 1.3.18 or later. The implementation of ghost hints has been largely improved in that release.</p>
	</blockquote>

	<h4>Export again</h4>

	<p>Now, when you export your font again, make sure autohinting is switched on. Autohinting will then be applied to all glyphs that do not have any manually set hints. This means that once you <em>do</em> choose to manually hint a glyph, you have to do <em>all</em> the hints, be it vertical or horizontal. Manually hinted glyphs and autohinted glyphs will then co-exist peacefully in the same font file.</p>

	<p>Two words of caution: make sure your <em>horizontal</em> hints do not overlap <em>each other</em>. And also make sure your <em>vertical</em> hints do not overlap <em>each other</em>.  So, for example, in the case of the figure <code>eight</code> in the screenshot above, we advise to only hint the lower bowl with vertical stem hints. This way, the upper bowl may become a little blurred through anti-aliasing, but it will stay symmetrical.</p>

	<p>As of this writing, hint replacement is reserved for automatically hinted glyphs. So, avoid overlapping hints when you hint manually. In any event, it’s a good practice to keep the number of hints as small as possible. Only hint the most significant stems, leave out the details.</p>

	<h4>Multiple Master goodness</h4>

	<p>If you make sure you always attach the circle and the triangle to nodes, you only need to hint the first master. If your paths are point-compatible, which they need to be anyway, Glyphs will automatically apply the hints to all instances. Nice!</p>
        ]]>
      
      </description>
      <dc:subject><![CDATA[]]></dc:subject>
      <dc:date>2013-04-28T17:50:47+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Contextual Kerning]]></title>
      <link>http://glyphsapp.com/blog/contextual-kerning/</link>
      <guid>http://glyphsapp.com/blog/contextual-kerning/#When:19:00:56Z</guid>      
      <description>
      
        
        
          
        
          
        
          
                
        <![CDATA[
          <p>So, you have <a href="http://glyphsapp.com/blog/spacing">optimized the sidebearings</a> of your glyphs, then <a href="http://glyphsapp.com/blog/kerning">added kerning pairs</a> where necessary. But still, you come across some cases where the white space between the letters still isn’t optimal in certain glyph triplets.</p>

	<p>There are some usual suspects. For instance, when a glyph with a negative <span class="caps"><span class="caps">RSB</span></span> is followed by a space and a glyph with a negative <span class="caps"><span class="caps">LSB</span></span>, e.g. <code>f space T</code>, <code>f space V</code> and <code>f space W</code>. In these cases, the word space gets eaten up by the surrounding negative sidebearings. To a reader, the result may look like a forgotten space. So the white space needs to be increased a bit.</p>

	<p>Or take the <code>L quoteright A</code> triplet, where the apostrophe (we assume <code>quoteright</code> will be used for the apostrophe) usually ends up too close to the A and too far away from the L. We need to fix that:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/contextkern-1.gif" alt="" class="block">
                                  </p>

	<p>Typical triplets usually include space, punctuation and quotes, like <code>period quoteright space</code>. Also, it’s not necessarily always triplets, it can be quadruplets too, like <code>f period space V</code> etc. Of course, the mileage varies greatly depending on the design. The only way to find out which combinations you need is to have long texts set in your typeface, preferably with lots of punctuation in different languages, and look for spots where the white space seems messed up.</p>

	<h4>Contextual kerning lookup</h4>

	<p>Enter the <code>kern</code> feature. Glyphs actually creates it automatically for you at export time, using all the kerning pairs you created. Now, you can add some extra kerning <em>on top</em> of the existing kerning by adding a separate lookup to the <code>kern</code> feature.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/contextkern-2.PNG" alt="" class="block">
                                  </p>

	<p>To do that, go into <em>Edit &gt; Font Info &gt; Features</em> and add a new feature called <code>kern</code> by clicking on the plus button in the bottom left of the window. Now let’s assume we want to fix the triplets containing <code>f space</code> as well as the <code>L quoteright A</code> combo, which is important for languages like French and Italian. Okay, here’s what we put into <code>kern</code>:</p>

<pre><code>pos f&#39; 50 space [T V W Y];
pos L&#39; -40 quoteright&#39; 80 [A Aacute Agrave];</code></pre>

	<p>The first line looks for an f followed by a word space, but only before T, V, W or Y. Only in that case will the <code>f space</code> pair get an additional white space of 50 units.</p>

	<p>The second line looks for an L, followed by an apostrophe and an A, with or without an accent. in that case, the apostrophe is shoved into the L by 40 units, while the space between the apostrophe and the A is increased by 80 units, effectively moving the apostrophe closer to the L, and increasing the space between L and A, preventing them from colliding with each other.</p>

	<p>This is called a <a href="http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html#6.h">chaining contextual positioning with a marked subrun</a>. If you’re familiar with <span class="caps"><span class="caps">AFDKO</span></span> feature coding, the structure of the positioning rules may surprise you. The kerning values are not placed at the end of the line, but right between the names of the affected glyphs. Also, as with any contextual rule, some glyphs need to be marked with a ‘dumb quote’. In this case, we need to mark every glyph that is followed by a kerning value.</p>

	<h4>Technicalities</h4>

	<p>Under the hood, Glyphs adds a lookup called <code>kernCustom</code> to the end of the <code>kern</code> feature:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/contextkern-3.PNG" alt="" class="block">
                                  </p>

	<p>The sequence of marked glyphs, the ‘marked subrun’, must not be interrupted by unmarked glyphs. That means you can have <code>x x&#39; x&#39; x&#39; x</code> but not <code>x&#39; x&#39; x x&#39; x&#39;</code>. Otherwise you get this error: ‘Unsupported contextual <span class="caps"><span class="caps">GPOS</span></span> target sequence: only one run of marked glyphs is supported’.</p>

	<p>And you cannot mix regular kerning with contextual kerning, because they are two different lookup types. If you do mix them, you will receive this error: ‘Lookup type different from previous rules in this lookup block’.</p>

	<h4>Two minor drawbacks</h4>

	<p>Since our lookup is feature code that gets injected into every instance at export time, the contextual kerning does not interpolate. But that is not much of a biggie, usually. Remember that the additional contextual kerning does not replace the other kerning pairs you already have, but it gets added on top of them.</p>

	<p>Except for regular, non-contextual kerning, Glyphs does not give you <code>GPOS</code> preview in the edit view. That’s bad luck for us contextual kerners. But there’s an easy workaround: Just keep <a href="http://glyphsapp.com/blog/testing-your-fonts-in-adobe-apps">exporting your fonts to the Adobe Fonts folder</a> and you can test your kerning triplets, quadruplets and quintuplets in InDesign right away. After all, this is where it counts because it’s where people are going to use it.</p>

	<p><small><span class="caps"><span class="caps">SAMPLE</span></span> <span class="caps"><span class="caps">FONT</span></span>: <a href="http://www.google.com/webfonts/specimen/Playfair+Display"><span class="caps"><span class="caps">PLAYFAIR</span></span> <span class="caps"><span class="caps">DISPLAY</span></span></a>, <span class="caps"><span class="caps">COURTESY</span></span> OF <span class="caps"><span class="caps">CLAUS</span></span> <span class="caps"><span class="caps">EGGERS</span></span> SØRENSEN.</small></p>
        ]]>
      
      </description>
      <dc:subject><![CDATA[]]></dc:subject>
      <dc:date>2013-04-10T19:00:56+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Kerning]]></title>
      <link>http://glyphsapp.com/blog/kerning/</link>
      <guid>http://glyphsapp.com/blog/kerning/#When:15:11:45Z</guid>      
      <description>
      
        
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
                
        <![CDATA[
          <p>Manipulating the whitespace enclosed inside a pair of glyphs is called kerning. Kerning is usually something you do very late in the fontmaking process. Try to get as far as possible with <a href="http://glyphsapp.com/blog/spacing/">properly spacing your glyphs</a>. But you’ll notice that, no matter how well you do it, some letter combinations never really work out properly. This is when you have reached the point at which you will not get around kerning. One of the usual suspects is the combination ‘VA’, i.e. when a capital V is followed by a capital A.</p>

	<p>This is important: keep in mind that the term kerning means adjusting the whitespace enclosed by a <em>combination</em> of two letters, a glyph <em>pair</em>. You cannot kern a single letter. Adjusting the left and right sidebearings of a single letter is called spacing.</p>

	<h4>Shortcuts</h4>

	<p>Okay, so you have optimized the sidebearings of your V and your A, but there is still too much whitespace in between them. This becomes apparent when you type a word like ‘VAND’, which, I believe, means ‘water’ in Danish and ‘sell’ in Romanian and Moldovan. I recommend you do not merely type the combination that needs adjusting, but also add some context, a few letters where the whitespace seems alright already. This way, you have direct comparison. And in this example, I think the space between N and D is pretty much alright already:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/kerning-1.PNG" alt="" class="block">
                                  </p>

	<p>But it looks more like ‘V&nbsp;AND’ instead of ‘VAND’, right? So, if you agree, we need to do something about the space between V and A. In other words, we need to kern ‘VA’.</p>

	<p>The easiest way to do so is to move the cursor between V and A, hold down the Ctrl and Opt keys and then adjust the kerning with the left and right arrow keys. Add Shift for increments of 10:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/kerning-2.gif" alt="" class="block">
                                  </p>

	<p>You may have noticed that, except for the additional Opt key, these are the same shortcut as for adjusting the left sidebearing of a letter, Ctrl-arrows or Shift-Ctrl-arrows. Being the logical people that we are, adding the Opt key to the <span class="caps"><span class="caps">RSB</span></span> spacing shortcut, Cmd-arrows or Shift-Cmd-arrows, should result in manipulating the kerning to the right of the current letter. It actually does: Cmd-Opt-arrows or Shift-Cmd-Opt-arrows changes the kerning between A and N in our example.</p>

	<h4>Displaying kerning pairs</h4>

	<p>You can keep track of kerning pairs in the sample text by switching to the Measurement tool (shortcut L). Negative kerning will be shown in light blue, positive kerning in light yellow. Even though it is not necessary for the font in this example, I added positive kerning between N and D, so you can see what it looks like:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/kerning-3.PNG" alt="" class="block">
                                  </p>

	<p>Also, in the grey info area (Cmd-Shift-I), you can see the kerning value in relation to the current letter. In this example, the kerning between the letter to the left of A and A itself is –80:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/kerning-4.PNG" alt="" class="block">
                                  </p>

	<p>And of course, you can get an overview of all kerning pairs via <em>Window &gt; Kerning:</em></p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/kerning-5.PNG" alt="" class="block">
                                  </p>

	<p>The kerning pairs are sorted by the left glyph. If you click on a right glyph, Glyphs will display the kerning pair at the current cursor position in the main window. If you have many kerning pairs, you can use the search field to quickly find the one you want. Click on the little triangle in the search field to get extra search options:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/kerning-6.PNG" alt="" class="block">
                                  </p>

	<h4>Group kerning</h4>

	<p>You probably want to Kern ‘VA’ just like ‘VÄ’, ‘VÅ’ and ‘VÀ’. And perhaps even like ‘WA’. In this case, you can put the glyphs into groups and use the kerning not just for the specific glyphs but for whole groups of glyphs. In this case, V and W would form one group, and A, Ä, Å and À would form another group.</p>

	<p>How do we do that? Easy. Every glyph has two fields labeled ‘G:’ in its info panel (Cmd-Shift-I), meaning ‘Group’. Now, this is important: each glyph can belong to one left group and one right group. A good example is the capital Æ: on the left it looks like an A, on the right, it looks like an E. So we put it in the left A group and the right E group:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/kerning-7.PNG" alt="" class="block">
                                  </p>

	<p>Now, pay attention to the lock symbols next to the ‘G:’ entries. If the lock is closed, this means that the kerning value applies to the whole group, not just the individual glyph displayed. If the lock is opened, then you have a kerning exception, i.e. the value only applies to that very glyph displayed, not the whole group. In this example, the kerning of A with the glyph to the left is a kerning exception, whereas the kerning of A with the glyph to the right of it applies to all glyphs in the A group:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/kerning-8.png" alt="" class="block">
                                  </p>

	<p>You can apply kerning groups to multiple glyphs at once. Select more than one in font view (grid or list mode), and manipulate the settings in the bottom left of the window:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/kerning-9.PNG" alt="" class="block">
                                  </p>

	<p>In grid mode, you can also invoke the context menu on a multiple glyph selection (right-click or Ctrl-click) and set the kerning groups there:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/kerning-10.PNG" alt="" class="block">
                                  </p>

	<p>Of course, it is up to you how you want to sort your glyphs into kerning groups. But there is a very handy script that does a pretty good job of guessing the kerning groups for each side of each of your glyphs. You may need to adjust the results here and there, but it does get you pretty far. You can <a href="https://github.com/schriftgestalt/Glyphs-Scripts/tree/master/Metrics%20%26%20Classes">download the Set Kerning Groups script from Github</a> and put it in the Scripts folder which you can access via <em>Script &gt; Open Scripts Folder</em> (Cmd-Shift-Y). Holding down the Opt key, you can <em>Script &gt; Reload Scripts</em> (Cmd-Opt-Shift-Y), then <em>Set Kerning Groups</em> will be accessible in the <em>Script</em> menu.</p>

	<h4>Importing kerning</h4>

	<p>If you have already set up your own groups in one font, and you want to have the same groups in your frontmost file, then choose <em>File &gt; Import &gt; Metrics</em> and pick the font file you want to copy the kerning groups from. The import function accepts <span class="caps"><span class="caps">UFO</span></span> and Glyphs files. In the dialog that appears, pick whether you want to import kerning and/or kerning classes (another word for groups):</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/kerning-11.PNG" alt="" class="block">
                                  </p>

	<h4>Kerning window</h4>

	<p>You can also copy and paste kerning via the kerning window. Just select the kerning pairs you want to copy (or simply select them all with Cmd-A), copy, switch to another font and paste them into the kerning window of that font. Kerning groups are displayed with a preceding at sign (@) and in blue, individual pairs in brown.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/kerning-12.PNG" alt="" class="block">
                                  </p>

	<p>Take a look at the gear menu at the bottom right of the kerning window. There are two helpful functions hidden there: <em>Clean up</em> removes leftovers like kerning entries of letters that are not in the font anymore. <em>Compress</em> removes unnecessary kerning exceptions, e.g. the group kerning between the A group and the V group is –80, but you also have an individual ‘ÄV’ kerning pair of –80. Since that kerning exception makes no visible difference, the <em>Compress</em> function deems it unnecessary and will remove it.</p>

	<p><small><span class="caps"><span class="caps">SAMPLE</span></span> <span class="caps"><span class="caps">FONT</span></span>: <a href="http://www.google.com/webfonts/specimen/Playfair+Display"><span class="caps"><span class="caps">PLAYFAIR</span></span> <span class="caps"><span class="caps">DISPLAY</span></span></a>, <span class="caps"><span class="caps">COURTESY</span></span> OF <span class="caps"><span class="caps">CLAUS</span></span> <span class="caps"><span class="caps">EGGERS</span></span> SØRENSEN.</small></p>
        ]]>
      
      </description>
      <dc:subject><![CDATA[]]></dc:subject>
      <dc:date>2013-03-25T15:11:45+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Spacing]]></title>
      <link>http://glyphsapp.com/blog/spacing/</link>
      <guid>http://glyphsapp.com/blog/spacing/#When:20:41:48Z</guid>      
      <description>
      
        
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
                
        <![CDATA[
          <h4>Starting out</h4>

	<p>When doing the spacing of a Latin alphabet, it is a good idea to start out with <code>n</code> and <code>o</code>. Once those two letters have proper sidebearings, the rest is relatively easy. So, I recommend you type something like <code>noononno</code> and fiddle around with those sidebearings until you’re satisfied. You can check on the sidebearings of any glyph by taking a look at the grey info panel (<em>View &gt; Show Info</em>, Cmd-Shift-I). They are marked with ‘L’ and ‘R’, respectively:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/spacing-1.PNG" alt="" class="block">
                                  </p>

	<p>You can access the same values through the glyph info area in the bottom left of the Font tab. Or the <span class="caps"><span class="caps">LSB</span></span> and <span class="caps"><span class="caps">RSB</span></span> columns in list mode. You may need to activate the columns first via the context menu of the list header. You can rearrange the column order by dragging the column headers.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/spacing-2.PNG" alt="" class="block">
                                  </p>

	<p>Whichever way you prefer, to change a sidebearing, just click into the number and type a new value. By the way, the bottom left info area even allows editing a selection of multiple glyphs at once.</p>

	<p>Unless you did something really crazy, <code>o</code> needs equal left and right sidebearings. A good starting point is a third of the counter width. A little more if it’s for small sizes, a little less for display sizes, whatever you intend your font for. A little more if the bowls are rather flat (and thus leaving less whitespace on the sides, which needs to be compensated), a little less if the bowls are very round. Hint: loose spacing is easier than tight spacing.</p>

	<p>Glyphs employs a set of intuitive shortcuts for changing the sidebearings of the current glyph. So, place your cursor in front of the <code>o</code>, hold down Ctrl for the left sidebearing or Cmd for the right sidebearing and then press the left and right arrow keys for decreasing or increasing the respective value. If you additionally hold down Shift, you get increments of 10.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/spacing-3.gif" alt="" class="block">
                                  </p>

	<h4>Shortcut conflict</h4>

	<p>Careful: by default, Ctrl-arrows is reserved for switching between Spaces in OS X. Thus, you need to switch the Spaces shortcut to something else, so you can use it for Glyphs. To do that in Mountain Lion, go into your System Preferences, choose <em>Keyboard</em>, click on the <em>Keyboard Shortcuts</em> tab, pick <em>Mission Control</em> from the list on the right and double click <em>Move left a space</em> and <em>Move right a space</em> and enter new shortcuts. Personally, I like setting them to Ctrl-Opt-Cmd-arrows, but of course you can pick anything you like, just make sure it doesn’t interfere with other shortcuts you need:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/spacing-5.PNG" alt="" class="block">
                                  </p>

	<p>Then, the <code>n</code>. Since the <code>n</code> usually has much less whitespace in its corners, we need to compensate that by enlarging its sidebearings. A good starting point is approximately 1.5 times the sidebearings of the <code>o</code>, not counting serifs. Serifs stretch into the whitespace, and thus effectively reduce the <span class="caps"><span class="caps">LSB</span></span> and <span class="caps"><span class="caps">RSB</span></span> values.</p>

	<p>Also, the <code>n</code> is not symmetrical. The top right corner is a bowl, leaving more whitespace on the right than on the left. We need to compensate for that somehow. Now, here’s a cracker: If you combine Ctrl and Cmd keys, you simultaneously change both left and right sidebearings, effectively moving the letter <em>inside</em> its width:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/spacing-4.gif" alt="" class="block">
                                  </p>

	<p>This way, you can knock the <code>n</code> a little bit to the right a few times until the <code>n</code> looks centered between the <code>o</code>. You’re finished with <code>n</code> and <code>o</code> if the distances between all letters in <code>noononno</code> appear to be of the same size.</p>

	<h4>Placeholders</h4>

	<p>Now, we go on to the other letters. Something I like to do is to add a second line and type the letter I want to work on next, e.g. the <code>h</code>. But you want to see that letter between the <code>o</code>’s just like the <code>n</code> before. You can do that in Glyphs: just go through the string and replace all occurrences of <code>n</code> with a placeholder. You can ‘type’ a placeholder with the <em>Edit &gt; Add Placeholder</em> command (Cmd-Opt-Shift-P).</p>

	<p>A placeholder always displays the current glyph, i.e. the glyph right after the cursor. Watch out, the placeholder can act weird if the cursor is all the way at the end of the test text you entered. If that happens, just move the cursor back in front of another letter.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/spacing-6.gif" alt="" class="block">
                                  </p>

	<h4>Sidebearing arithmetics</h4>

	<p>But wait a minute, <code>h</code> should be easy if we already have the <code>n</code>. In most cases, it can have the same sidebearings as <code>n</code>, because, except for the ascender, <code>h</code> and <code>n</code> look pretty much the same. So, for instance, we could go check on the <code>n</code> and copy the sidebearings into the grey info area (Cmd-Shift-I) of <code>h</code>. But that’s suboptimal, because what happens if we later change the sidebearings of the <code>n</code> again? Do we really want to keep track of all the sidebearings manually? Hell no.</p>

	<p>What we do is this: instead of entering a number value indicating the sidebearing distance, we enter the name of another glyph! Glyphs will then reduplicate the other letter’s sidebearing in the current letter. So, we enter <code>n</code> in both the <span class="caps"><span class="caps">LSB</span></span> and the <span class="caps"><span class="caps">RSB</span></span> of <code>n</code>, and <code>h</code> will dynamically take over the sidebearings of <code>n</code>:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/spacing-7.PNG" alt="" class="block">
                                  </p>

	<p>Not 100 percent dynamic though. Every once in a while, it’s a good idea to force the selected glyphs to update their sidebearings by choosing <em>Layer &gt; Update Metrics</em> (Ctrl-Cmd-M).</p>

	<p>But it doesn’t stop there. You can even do simple arithmetics. In that case, you start the <span class="caps"><span class="caps">LSB</span></span>/RSB entry with an equals sign (<code>=</code>) and hang your calculation in there. So, if you use <code>=a+20</code> as the <span class="caps"><span class="caps">LSB</span></span> value for a glyph, Glyphs will take the <span class="caps"><span class="caps">LSB</span></span> value of <code>a</code> and add 20 units to it. If you use <code>=|a+20</code> instead, i.e. you put a pipe character (<code>|</code>) in front of the glyph name, then Glyphs will take the opposite sidebearing of <code>a</code> as the basis for the calculation. You cannot just add, you can also subtract: <code>=b-10</code>. And multiply: <code>=c*1.1</code>. And divide: <code>=d/2</code>. In our experience, simply adding and subtracting fixed values works best for most situations.</p>

	<p>Again, don’t forget to regularly run the <em>Layer &gt; Update Metrics</em> command (Ctrl-Cmd-M). So, look for similarities in lettershapes, try to establish connections between letters and try to turn that into sidebearing arithmetic like this:</p>

	<ul>
		<li><span class="caps"><span class="caps">LSB</span></span> <code>=o</code>: <code>c, d, e, g, q</code></li>
		<li><span class="caps"><span class="caps">RSB</span></span> <code>=o</code>: <code>b, p</code></li>
		<li><span class="caps"><span class="caps">LSB</span></span> <code>=n</code>: <code>b, h, i, k, l, m, p, r</code></li>
		<li><span class="caps"><span class="caps">RSB</span></span> <code>=n</code>: <code>a, h, m</code></li>
	</ul>

	<p>Etcetera etcetera etcetera. Your mileage may vary greatly though, because eventually, it will depend on the way you design your glyphs.</p>

	<h4>Uppercase spacing</h4>

	<p>For uppercase spacing, the base characters are usually <code>H</code> and <code>O</code>. It’s basically the same story as with the small letters above: get those two right and you’re good to go. But this time, you also need to make them fit to the lowercase letters. If you take care of this, you can easily transfer sidebearing values to other letters:</p>

	<ul>
		<li><span class="caps"><span class="caps">LSB</span></span> <code>=H</code>: <code>B, D, E, F, I, K, L, M, N, P, R</code></li>
		<li><span class="caps"><span class="caps">RSB</span></span> <code>=H</code>: <code>I, M, N</code></li>
		<li><span class="caps"><span class="caps">LSB</span></span> <code>=O</code>: <code>C, G, Q</code></li>
		<li><span class="caps"><span class="caps">RSB</span></span> <code>=O</code>: <code>D, Q</code></li>
	</ul>

	<p>Etcetera etcetera etcetera.</p>

	<h4>Automatic alignment</h4>

	<p>Component-based letters inherit their spacing from the base component. For example, you want an ‘ä’ in your font. So you build an <code>adieresis</code> with an <code>a</code> component and a <code>dieresis</code> component. Actually, Glyphs does that automatically for you if both <code>a</code> and <code>dieresis</code> already exist in your font when you generate <code>adieresis</code>. Now, go into the <code>adieresis</code> glyph and click on one of the two components. It appears to be locked, or as we say, automatically aligned. In most cases, that’s probably exactly what you want. Trust me, there’s nothing more tedious than trying to synchronize the spacing of all diacritics manually.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/spacing-8.PNG" alt="" class="block">
                                  </p>

	<p>Sometimes, however, that’s no what you want. For instance, <a href="http://glyphsapp.com/blog/localize-your-font-catalan-punt-volat/">when you create the ldot</a>, chances are you do not want the components to align automatically. In cases like this, you open the context menu on the component(s) you want to reposition, and choose ‘Disable Automatic Alignment’. If you change your mind, you can ‘Enable Automatic Alignment’ via the same menu.</p>

	<p>Non-letter glyphs like punctuation, figures and symbols do not align in the first place. This way, you can quickly and easily make proportional and tabular figures in one go.</p>

	<h4>No kerning yet</h4>

	<p>Try to get as far as possible without kerning. At one point, you will find that you cannot improve your spacing anymore by tweaking the sidebearings. Then you can start kerning, but no sooner, really. That’s because you’d have to start with the kerning all over again once you find a better way of spacing your letters.</p>
        ]]>
      
      </description>
      <dc:subject><![CDATA[]]></dc:subject>
      <dc:date>2013-03-04T20:41:48+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Unicode]]></title>
      <link>http://glyphsapp.com/blog/unicode/</link>
      <guid>http://glyphsapp.com/blog/unicode/#When:11:48:37Z</guid>      
      <description>
      
        
        
          
        
          
        
          
        
          
        
          
        
          
        
          
                
        <![CDATA[
          <p>If you want to make sure your font works properly, some of your glyphs need proper Unicodes. This is what you need to know about it as a type designer.</p>

	<h4>Characters versus glyphs</h4>

	<p>Type designers create new <em>glyphs</em>, i.e. <em>pictures</em> representing characters. Type designers usually do not create new <em>characters</em>, i.e. the <em>meanings</em> of those pictures, or, more technically put, ‘the <a href="http://www.unicode.org/glossary/#character">smallest component of written language that has semantic value</a>.’ We don’t invent alphabets, we merely re-interpret existing ones. (Okay, sometimes, we do invent new alphabets, but that’s a different story. Keep calm and continue reading.)</p>

	<p>In short: characters are what you type, glyphs are what you see.</p>

	<p>One glyph usually corresponds to one character, be it a letter, a figure or a punctuation sign. Characters have Unicodes. The glyph-character relationship is expressed by the Unicode value associated to the glyph. Glyphs displays the Unicode value in various ways. For instance, in Font View, you’ll find it right next to the glyphname:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/unicode-1.PNG" alt="" class="block">
                                  </p>

	<p>A glyph can also represent more than one character at once. Take an <code>f_f_f</code> ligature as an example. It represents three f characters in a row. Ligatures do not have Unicodes, because the separate characters already have codes and the the fact that it’s a ligature does not change the meaning of its parts. (Well, actually, some ligatures do have legacy codes, but solely for backwards compatibility with outdated encodings from the long-gone, dark ages of eight-bit computing. E.g. <code>f_f</code> can have the <code>U+FB00 LATIN SMALL LIGATURE FF</code> code point. If ‘eight-bit’ does not tell you anything, please erase everything you read within these parentheses from your memory immediately, keep calm and continue reading.)</p>

	<p>Sometimes, a glyph only serves as a part for other glyphs. You can, for instance, <a href="http://glyphsapp.com/blog/serif-components/">use separate glyphs for your serifs</a>. So, to sum up, a glyph is a picture, either of a character, or of many characters or as a part in other glyphs. And type designers draw such pictures.</p>

	<h4>Unicode, planes and blocks</h4>

	<p>Over the centuries, the alphabet has become more complicated than the regular a to z. First, we have all sorts of diacritics, special letters, (almost) everything in both upper- and lowercase. Then, there’s much, much, much more than just the Latin script. Plus hundreds and thousands of symbols, figures, punctuation signs et cetera et cetera et cetera.</p>

	<p>So, to cut a long story short, we need a way to keep track of everything. Something like a huge table for all characters of all scripts, essentially everything you could possibly ever want to enter as a part of a text anywhere. Well, this is called <a href="http://en.wikipedia.org/wiki/Unicode">Unicode</a>.</p>

	<p>Unicode is a table that maps codes to symbols and a bunch of metadata. There are different ways to represent the individual codes (known as Unicode transformation formats or <span class="caps"><span class="caps">UTF</span></span>), and Glyphs uses the hexadecimal <span class="caps"><span class="caps">UTF</span></span>-16 convention. <a href="http://en.wikipedia.org/wiki/Hexadecimal">Hexadecimal</a>, in case you did not know, is counting with 16 instead of the usual 10 digits. We just use the letters A through F as additional digits, so we count like this: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, and so on, you get the idea.</p>

	<p>Unicode has <a href="http://en.wikipedia.org/wiki/Plane_(Unicode)">seventeen planes</a> of 65,536 characters each, the most important being the Basic Multilingual Plane (<span class="caps"><span class="caps">BMP</span></span> or Plane 0) ranging from <code>U+0000</code> to <code>U+FFFF</code> and the Supplementary Multilingual Plane (<span class="caps"><span class="caps">SMP</span></span> or Plane 1) from <code>U+10000</code> to <code>U+1FFFF</code>. Planes are subdivided in many <a href="http://en.wikipedia.org/wiki/Unicode_block">character blocks</a>, usually comprising a script, e.g. Tamil from <code>U+0B80</code> to <code>U+0BFF</code> or something funny like Emoticons (starting at <code>U+1F600</code>).</p>

	<p>Not all (17×65,536=) 1,114,112 code points of Unicode are currently in use. At the time of writing, the latest Unicode standard was <a href="http://www.unicode.org/versions/Unicode6.2.0/">version 6.2 from September 2012</a> with 110,117 characters. Some parts of Unicode are  intentionally left free for private use. Unicode knows three such <a href="http://en.wikipedia.org/wiki/Private_Use_(Unicode)">Private Use Areas</a> (<span class="caps"><span class="caps">PUA</span></span>), the most important one ranging from <code>U+E000</code> to <code>U+F8FF</code>.</p>

	<p>For unofficial scripts that are unlikely to make it into official Unicode, like <a href="http://en.wikipedia.org/wiki/Klingon_writing_systems">Klingon pIqaD</a>, geeks have come up with the <a href="http://www.evertype.com/standards/csur/">ConScript Unicode Registry</a> which makes use of the Private Use Area.</p>

	<h4>Unicode and Glyphs</h4>

	<p>In Glyphs, you usually do not need to worry about Unicodes, since Glyphs determines the right code (or the lack of a code) by the glyphname. Open <em>Window &gt; Glyph Info</em> (Cmd-Opt-I) and look for specific glyphs by typing (part of) a glyph name in the search field:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/unicode-2.PNG" alt="" class="block">
                                  </p>

	<p>Glyphs has a built-in database of predefined glyphnames. You can <a href="http://glyphsapp.com/blog/roll-your-own-glyph-data/">add your own definitions</a> if you are so inclined. The Glyph Info window displays name, Unicode (if available) and some metadata about each glyph. Starting in Glyphs version 1.3.18, you can quickly add a glyph to your font by selecting it and pushing the <em>Add to Font</em> button in the bottom right corner.</p>

	<p>If you resize your Glyph Info window, you can even see the very handy decomposition information for the individual glyphs:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/unicode-3.PNG" alt="" class="block">
                                  </p>

	<p>For example, if you plan to add <code>adieresismacron</code> to your font, make sure you have <code>a</code>, <code>dieresis</code> and <code>macron</code> already in your font. Then Glyphs can use them as components for <code>adieresismacron</code> and build the complete glyph right away. Cool.</p>

	<p>If you plan to add a glyph that has no entry in the Glyph Info window, you can use the <code>uniXXXX</code> scheme for relating it to a character in the Basic Multilingual Plane. The <span class="caps"><span class="caps">XXXX</span></span> stands for the four-digit <span class="caps"><span class="caps">UTF</span></span>-16 hexadecimal code. Use <code>uXXXXX</code> for any of the higher planes, i.e. just a <code>u</code> instead of <code>uni</code>. Glyphs will then automatically add the proper Unicode.</p>

	<p>Keep in mind that not every glyph needs a Unicode. Especially if the glyph is invoked via an OpenType feature, there is no need to encode the glyph. You only need a code if you need to type it directly. For example, you do not need to encode small caps or a stylistic variation of a letter, since the user will type his or her text in plain upper- and lowercase, and then activate the appropriate function of the software he or she uses.</p>

	<h4>Double mappings</h4>

	<p>If you have some experience in type design, chances are you have come across double-mapping of glyphs. That means that one glyph, is associated with two different Unicodes. This is bad. Don’t do it. There’s a whole lot of technical problems that comes with this practice. That’s why Glyphs doesn’t let you do it. To tell you the truth, Adobe’s <code>makeotf</code> doesn’t let you do that either. Since Glyphs relies on <code>makeotf</code> under the hood, it wouldn’t make any sense anyway.</p>

	<p>But what if you do want two Unicodes for the same glyph? Take, for instance, the <code>Delta</code> glyph, which is both a Greek capital letter (<code>U+0394</code>) and a mathematical symbol (<code>U+2206</code>)? In cases like this, take a look at <em>Window &gt; Glyph Info</em> (Cmd-Opt-I) and look for the Unicodes you want to apply:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/unicode-7.PNG" alt="" class="block">
                                  </p>

	<p>You will quickly find out that the mathematical symbol is called <code>increment</code> while the Greek letter is simply called <code>Delta</code>. If you want both to have the same shape, draw <code>Delta</code> first, and then choose <em>Font &gt; Add Glyphs…</em> (Cmd-Shift-G), type <code>Delta=increment</code> and hit the <code>Generate</code> button. This will create a glyph called <code>increment</code> with a <code>Delta</code> component in it. Metrics are automatically linked unless you disable automatic alignment.</p>

	<p>More generally put, if you want to reuse the same shape for two different Unicodes, add a component-based copy of the glyph using the <code>firstGlyphName=secondGlyphName</code> and make sure you give both glyphs their proper names.</p>

	<h4>UnicodeChecker</h4>

	<p>Glyphs can interoperate with a shareware tool called <a href="http://earthlingsoft.net/UnicodeChecker/">UnicodeChecker</a> from the great people at <a href="http://earthlingsoft.net">Earthling Soft</a>. UnicodeChecker helps you quickly find all the info you need about characters. To invoke UnicodeChecker, click on the little arrow next to the Unicode in the grey info area:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/unicode-4.png" alt="" class="block">
                                  </p>

	<p>Glyphs will then send the code of the current glyph to UnicodeChecker, which in turn will tell you all sorts of useful information about the character in question:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/unicode-5.PNG" alt="" class="block">
                                  </p>

	<p>UnicodeChecker is also useful for quickly finding all characters related to a script. For instance, if you really want to cover all Latin characters, switch to UnicodeChecker and in the <em>Character Blocks &gt; Alphabetically: Ideographic-Lydian</em> submenu, you will find all Latin blocks:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/unicode-6.PNG" alt="" class="block">
                                  </p>

	<p>If you haven’t installed UnicodeChecker yet, Glyphs will prompt you to do so when you click on the arrow. Downloading and installing UnicodeChecker is free. However, if you do use it on a regular basis, think about how much time and nerves this little tool saves you and <a href="https://www.paypal.com/xclick/business=earthlingsoft%40earthlingsoft.net&amp;amp;item_name=UnicodeChecker&amp;amp;no_shipping=1&amp;amp;cn=Comments&amp;amp;tax=0&amp;amp;currency_code=EUR&amp;amp;lc=GB">consider a donation</a> to the makers. Support shareware, it supports you.</p>
        ]]>
      
      </description>
      <dc:subject><![CDATA[]]></dc:subject>
      <dc:date>2013-02-12T11:48:37+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Roll your own Glyph Data]]></title>
      <link>http://glyphsapp.com/blog/roll-your-own-glyph-data/</link>
      <guid>http://glyphsapp.com/blog/roll-your-own-glyph-data/#When:00:38:31Z</guid>      
      <description>
      
        
        
          
        
          
        
          
        
          
        
          
                
        <![CDATA[
          <p>Ever wondered why Glyphs knows so much about the glyphs you create? Like, when you enter the name of a glyph, it sets the Unicode and when you choose <em>Layers &gt; Set Anchors</em> (Cmd-U), it sets the right diacritical anchors. Where does it store all that information? </p>

	<p>Inside the Glyphs application, there is a file called <code>GlyphData.xml</code>. You are not supposed to touch the one inside the app, but you can make a copy of it in the Application Support folder and keep your personal customizations there. Glyphs will use your glyph info to override the built-in settings.</p>

	<h4>Make a copy of GlyphData.xml</h4>

	<p>We have to dig into the application and fish out the <span class="caps"><span class="caps">XML</span></span> file. To do that, we first copy this line into the clipboard:</p>

<pre><code>/Applications/Glyphs.app/Contents/Frameworks/GlyphsCore.framework/Versions/A/Resources/GlyphData.xml</code></pre>

	<p>Then, in Finder, choose <em>Go &gt; Go to Folder…</em> (Cmd-Shift-G). Paste the line we just copied into the appearing dialog:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/glyphdata-1.PNG" alt="" class="block">
                                  </p>

	<p>Hit <em>Go</em> and the Finder will show you the <code>GlyphData.xml</code>, buried somewhere in the Glyphs application:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/glyphdata-2.PNG" alt="" class="block">
                                  </p>

	<blockquote>
		<p><strong><span class="caps"><span class="caps">ATTENTION</span></span></strong> In Mac OS X versions prior to 10.7, you cannot directly go to the file using the full path as described above. Instead, you have to navigate to <code>/Applications/Glyphs.app/Contents/Frameworks/GlyphsCore.framework/Versions/A/Resources/</code> and then look for a file called <code>GlyphData.xml</code> and select it by clicking on it once.</p>
	</blockquote>

	<p>While the <span class="caps"><span class="caps">XML</span></span> file is selected, choose <em>Edit &gt; Copy GlyphData.xml</em> (Cmd-C). You can close the Finder window now.</p>

	<p>Now, we have to navigate to the Application Support folder. Since the regular version and the App Store version must use different locations for that purpose, the easiest way to get there is to choose <em>Script &gt; Open Scripts Folder</em> (Cmd-Shift-Y) in Glyphs. This will take you to the Scripts folder inside the Application Support folder. All you need to do is make sure you are in the enclosing folder. Next to the <em>Scripts</em> folder, you should see <em>Temp</em> and <em>Plugins</em> folders as well as a <code>CustomFilter.plist</code> file. If you do not see an <em>Info</em> folder there yet, it’s time to create it (Cmd-Shift-N). Inside, the Info folder, paste the <code>GlyphData.xml</code>:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/glyphdata-3.PNG" alt="" class="block">
                                  </p>

	<h4>Editing the GlyphData.xml</h4>

	<p>Open the <span class="caps"><span class="caps">XML</span></span> file with your favorite <span class="caps"><span class="caps">XML</span></span> or plaintext editor. Personally, I recommend <a href="http://macromates.com/">TextMate</a>, but you may also be happy with <a href="http://www.barebones.com/thedeck"><span class="caps"><span class="caps">BBE</span></span>dit</a> or its free counterpart <a href="http://www.barebones.com/products/textwrangler/">TextWrangler</a>.</p>

	<p>Both <span class="caps"><span class="caps">XML</span></span> files, the one buried in the app as well as the one we just copied into the <em>Info</em> folder, contain all relevant glyph info. They compliment each other, so you can limit your copy of the <span class="caps"><span class="caps">XML</span></span> file to just the letters you need. To do so, remove everything between <code>&lt;glyphData&gt;</code> (should be located around line 20) and <code>&lt;/glyphData&gt;</code> (the last line). So you end up with something like this:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/glyphdata-4.PNG" alt="" class="block">
                                  </p>

	<p>Now, an entry for a letter must adhere to a certain form. Let’s take an example. Imagine you want your <code>p</code> to have a <code>top</code> anchor by default, so you can build <code>pacute</code> (U+1E55) and <code>pdotaccent</code> (U+1E57). We have to add this line to our copy of <code>GlyphData.xml</code>:</p>

<pre><code>&lt;glyph unicode=&quot;0070&quot; name=&quot;p&quot; category=&quot;Letter&quot; subCategory=&quot;Lowercase&quot; script=&quot;latin&quot; description=&quot;LATIN SMALL LETTER P&quot; anchors=&quot;top&quot; accents=&quot;acute, dotaccent&quot; /&gt;</code></pre>

	<p>Now, it should look like this:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/glyphdata-5.PNG" alt="" class="block">
                                  </p>

	<p>You see, it’s an <span class="caps"><span class="caps">XML</span></span> element called <code>glyph</code>. The basic structure is:</p>

<pre><code>&lt;glyph attribute=&quot;value&quot; /&gt;</code></pre>

	<p>As you see, each <code>glyph</code> element can take various attributes of the structure <code>attribute=&quot;value&quot;</code>. Okay, let’s go through the various possible attributes:</p>

	<ul>
		<li><code>unicode=&quot;0070&quot;</code> is the hexadecimal Unicode value. Use <code>unicode=&quot;&quot;</code> if you want to create an unencoded glyph like a ligature.</li>
		<li><code>name=&quot;p&quot;</code> is the name of the glyph. Glyphs recognizes your glyph by its name, so this must be set to a <a href="http://glyphsapp.com/blog/getting-your-glyph-names-right/">valid glyph name</a>.</li>
		<li><code>category=&quot;Letter&quot;</code> is the category or group of the glyph. Possible values are: <code>Letter</code> (letters like ‘x’ or ‘ä’), <code>Number</code> (figures like ‘3’), <code>Mark</code> (e.g. the acute mark), <code>Punctuation</code> (like the period or the comma), <code>Separator</code> (like the wordspace), <code>Symbol</code> (like the Emoji signs, arrows or the Radioactive symbol).</li>
		<li><code>subCategory=&quot;Lowercase&quot;</code> helps you further define the kind of the glyph. This, of course, depends on the <code>category</code>. This could be <code>Fraction</code> for a <code>Number</code> or <code>Lowercase</code> for a <code>Letter</code> etc. Take a look at <em>Window &gt; Glyph Info</em> for possible sub categories. Roughly, categories and subcategories are what you see in the sidebar of the Font tab.</li>
		<li><code>script=&quot;Latin&quot;</code> defines the scripting system the glyph belongs to. Can be empty if it doesn’t belong to any script (e.g. for math symbols). Possible values include <code>arabic</code>, <code>cyrillic</code>, <code>devanagari</code>, <code>ethiopic</code>, <code>greek</code>, <code>han</code> etc. You get the idea.</li>
		<li><code>description=&quot;LATIN SMALL LETTER P&quot;</code> is the Unicode-style descriptive name of your glyph. If you have an encoded glyph, you can find the official name with <a href="http://earthlingsoft.net/UnicodeChecker/">Unicode Checker</a>.</li>
		<li><code>anchors=&quot;top&quot;</code> is comma-separated list of possible diacritical anchors for the glyph. The standard anchors are <code>top</code>, <code>bottom</code>, <code>center</code>, <code>ogonek</code>, <code>topleft</code>, <code>topright</code>, <code>bottomleft</code>, <code>bottomright</code>. Corresponding mark anchors need preceding underscores, e.g. <code>_top</code>. Stackable combining marks can have both kinds of anchors. Omit this attribute if your glyph cannot be a base letter for a diacritic.</li>
		<li><code>accents=&quot;acute, dotaccent&quot;</code> defines the possible accents the glyph can take. This mainly helps Glyphs draw the mark cloud when you click on an anchor.</li>
	</ul>

	<p>Additionally, you can make use of these attributes:</p>

	<ul>
		<li><code>unicode2=&quot;FE80&quot;</code> can define an alternative Unicode value. Many Arabic letters have double ecodings. For instance, <code>hamza-ar</code> defaults to <code>unicode=&quot;0621&quot;</code>, but since the glyph <code>hamza-ar</code> corresponds to the isolated form of the letter, you can add the alternative encoding of the isolated form, <code>unicode2=&quot;FE80&quot;</code>.</li>
		<li><code>legacy=&quot;uni021A&quot;</code> describes the legacy <a href="http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt">Adobe Glyph List</a> name if you do not want to use it because it’s not as human-readable as the <code>name</code> you want to employ for the glyph in question. You probably want to make use of this attribute wherever the <span class="caps"><span class="caps">AGL</span></span> uses <code>uni</code> followed by the 4-digit Unicode or <code>u</code> and the 5-digit code. E.g. the glyph element for Romanian and Moldovan <code>Tcommaaccent</code> has both a <code>name=&quot;Tcommaaccent&quot;</code> and a <code>legacy=&quot;uni021A&quot;</code> attribute. This info helps your glyph data to stay more compatible with other encodings and is used when you choose <em>Font &gt; Update Glyph Info</em>.</li>
		<li><code>decompose=&quot;a, dieresis&quot;</code> defines the base glyphs of a component-based glyph. In other words, the parts that make up the glyph. This information is used when you construct such a letter using the <em>Layers &gt; Make Component Glyph</em> command (Cmd-Opt-Shift-C). Make sure the base letter comes first and all the diacritics follow. This is also useful for ligatures. In that case, you add the names of the glyphs that comprise the ligature, e.g. <code>decompose=&quot;f, f, k&quot;</code> for a <code>f_f_k</code> ligature.</li>
		<li><code>sortName=&quot;j_&quot;</code>: by default, Glyphs orders the glyphs alphabetically within their category. If you want to manipulate the display order, add this attribute. For instance, to make sure that <code>dotlessj</code> comes after <code>j</code> instead of <code>d</code>, there’s a <code>sortName=&quot;j_&quot;</code> attribute in it. This is very important for figures, where the <code>sortName</code> can look like <code>Number.dnom.4</code> etc.</li>
	</ul>

	<h4>Potential pitfalls</h4>

	<p>Be careful and precise. If you mess up your glyph data, you <em>will</em> run into problems. Here are a few common problems, so you can avoid them right from the start:</p>

	<p>First, make sure you always fill out <code>Category</code>. <em>Always</em>.</p>

	<p>Secondly, always fill out <code>subCategory</code>. If you don’t know what to fill out, use <code>subCategory=&quot;Other&quot;</code>.</p>

	<p>Thirdly, never, I mean <em>never ever</em>, use an existing glyph name in <code>legacy</code>. For example. you must not use <code>legacy=&quot;Tcommaaccent&quot;</code> for <code>Tcedilla</code> because <code>Tcommaaccent</code> already exists elsewhere in your glyph data. The proper legacy name in this case would be <code>uni021A</code>.</p>

	<h4>Hard times for the feature generator</h4>

	<p>It is seductive to to create your own naming schemes with this trick. But keep in mind that Glyphs expects certain names for automatically building OpenType features. So, you may have to write your own feature code as well, once you roll your own glyph data.</p>

	<h4>Keep your <span class="caps"><span class="caps">XML</span></span> tidy</h4>

	<p>This is important: Glyphs may ignore your custom glyph data if your <code>GlyphData.xml</code> contains broken <span class="caps"><span class="caps">XML</span></span>. So, make sure you properly validate your <span class="caps"><span class="caps">XML</span></span> from time to time. Many tools like TextMate sport a built-in validator. You can, of course, also copy and paste your <span class="caps"><span class="caps">XML</span></span> into a web-based validator such as the <a href="http://validator.w3.org/#validate_by_input">W3 Markup Validation Service</a>.</p>

	<p>That’s all there is to injecting your custom info into Glyphs. If you feel that other people could also profit from your additions, you can put your <code>GlyphData.xml</code> file on <a href="https://github.com/">Github</a>, post a suggestion in the <a href="http://glyphsapp.com/forums/">Glyphs Forum</a>, or, if you <em>really, really</em> think your changes should be the default for every Glyphs user, <a href="http://glyphsapp.com/bugreport/">file a feature request</a>.</p>

	<p><small>Update 2013-02-03: added note on how to navigate to GlyphData.xml in 10.6 (thanks @typefacts); two minor text improvements.<br />

<br />

Update 2013-02-12: added ‘Potential pitfalls’.<br />

<br />

Update 2013-03-25: corrected <span class="caps"><span class="caps">XML</span></span> file name typo (thanks George Thomas).</small></p>
        ]]>
      
      </description>
      <dc:subject><![CDATA[]]></dc:subject>
      <dc:date>2013-01-26T00:38:31+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Serif Components]]></title>
      <link>http://glyphsapp.com/blog/serif-components/</link>
      <guid>http://glyphsapp.com/blog/serif-components/#When:20:40:58Z</guid>      
      <description>
      
        
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
                
        <![CDATA[
          <p>There are a lot of serifs in a serif typeface. Now imagine that suddenly you realize that your serifs are a bit too thick. Do you really want to go through all your letters again, just to nudge all those pesky little serifs down a tiny little bit? Naw…</p>

	<p>So let’s collect all different sorts of serifs, put them into separate glyphs and insert them into other letters as components.</p>

	<h4>Different kinds of serifs</h4>

	<p>A serif is not a serif is not a serif. There is not even much consensus as to what one serif actually is. For instance, in a serif n, some people count three serifs, others count five. For technical reasons, we will count five as well:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-1.png" alt="" class="block">
                                  </p>

	<p>Now, we can build five different serifs, three of which you already see in the above picture of the n. The spur at the top left, and at the end of each stem both a left and a right serif. Which are the other two? We still need two vertical ones, like here in s and z:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-2.png" alt="" class="block">
                                  </p>

	<h4>Building the serifs</h4>

	<p>To cut a log story short, fire up your <em>Font &gt; Add Glyphs</em> dialog and copy and paste these five lines</p>

<pre><code>SerifBottomLeft
SerifBottomRight
SerifSpur
SerifUpLeft
SerifUpRight</code></pre>

	<p>Here’s the deal. All serifs somehow attach to some sort of stem. Now imagine the origin point (where left sidebearing and baseline cross) represents the part of the stem the serif connects to.</p>

	<p>I know, that sounds complicated. So let’s just draw the <code>SerifBottomLeft</code>:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-3.PNG" alt="" class="block">
                                  </p>

	<p>It is the serif that sticks out to the left of the stem. So we imagine that the left sidebearing is the left side of the stem, and the baseline the bottom of the stem:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-4.PNG" alt="" class="block">
                                  </p>

	<p>To be on the safe side, we’ll have a little overlap, because sometimes the stem is not completely vertical (think of an uppercase A, for instance). Slightly slanted because… well, we’ll see why later. Hold on, first we get the others right.</p>

	<p>Here’s <code>SerifBottomRight</code>:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-5.PNG" alt="" class="block">
                                  </p>

	<p>Again, the <span class="caps"><span class="caps">LSB</span></span> is the side of the stem, but this time we have the serif that sticks out to the right, like so:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-6.PNG" alt="" class="block">
                                  </p>

	<p>So the overlap has to be to the left of the origin point.</p>

	<p>Next up, <code>SerifSpur</code>:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-7.PNG" alt="" class="block">
                                  </p>

	<p>Oh my god, what happened here? Why did this one go below the baseline? Easy. Since the spur attaches to the <em>top</em> of a stem, and that top is (like the bottom) represented by the baseline, the spur must bump against the baseline from below. Just like it bumps against the top of the stem – from below:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-8.PNG" alt="" class="block">
                                  </p>

	<p>Okay, now for the vertical ones, let’s take a look at the <em>bottoms</em> of <code>s</code> and <code>z</code>. This is how the vertical serifs attach to the stems here:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-9.png" alt="" class="block">
                                  </p>

	<p>As you can see, it’s the lowest tip of the serif that actually attaches. So, this tip needs to stick in the origin point. Here is the <code>SerifUpLeft</code> as seen in the bottom left corner of the <code>s</code>:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-10.PNG" alt="" class="block">
                                  </p>

	<p>…and the <code>SerifUpRight</code> as in the bottom right corner of the <code>z</code>:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-11.PNG" alt="" class="block">
                                  </p>

	<h4>Aligning components</h4>

	<p>Why all this fuss about the origin point? Because in Glyphs, you can select a node and a component, then choose <em>Layers &gt; Align Selection</em> and the origin point of the component will align with the point.</p>

	<p>This is great news for us, since we want to precisely move serifs onto corners of stems. So here is what we do:</p>

	<ol>
		<li>Into the yet unseriffed letter, add the serif  component with <em>Layers &gt; Add Component</em> (Cmd-Shift-C).</li>
		<li>Then, select the corner node of the stem we want to attach the serif to. You can drag-select the point or you can just click on it.</li>
		<li>Shift-click the component to add it to the selection. Both the corner node and the component should be selected now.</li>
		<li>Align them with <em>Layers &gt; Align Selection</em> (Cmd-Shift-A). The component should fly onto the stem.</li>
	</ol>

	<p>That’s it. Select a node and the component, align, and you’re done. Cool.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-15.gif" alt="" class="block">
                                  </p>

	<h4>Turning components upside down</h4>

	<p>Sometimes, we need to turn a component, for instance for the top right stroke ending of the <code>s</code>. We <em>cannot mirror</em> components because this would mess up our <a href="http://glyphsapp.com/blog/drawing-good-paths/">path orientation</a> and we don’t want that, do we.</p>

	<p>What we have to do to turn them upside down is <em>rotate</em> them. Go to your Palette (<em>Window &gt; Palette</em>, Cmd-Shift-P) and set your rotation value in the Transformations section to 180 degrees.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-12.PNG" alt="" class="block">
                                  </p>

	<p>Alternatively, you can press both the horizontal and the vertical mirror button. Both methods yield the same result. In any event, you can copy the component, rotate it and align it again, like in the <code>s</code>:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-13.PNG" alt="" class="block">
                                  </p>

	<p>Note the h and v values in the grey info box. ‘h:–100%, v:–100%’ indicates a 180° turn.</p>

	<h4>Taking advantage of component serifs</h4>

	<p>Now you can go ahead and experiment with your serif shapes. Have fun!</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/serifs-14.gif" alt="" class="block">
                                  </p>
        ]]>
      
      </description>
      <dc:subject><![CDATA[]]></dc:subject>
      <dc:date>2013-01-21T20:40:58+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Recipes]]></title>
      <link>http://glyphsapp.com/blog/recipes/</link>
      <guid>http://glyphsapp.com/blog/recipes/#When:22:27:26Z</guid>      
      <description>
      
        
        
          
        
          
        
          
                
        <![CDATA[
          <p>You probably know the <em>Font &gt; Add Glyphs…</em> (Cmd-Shift-G) command. It gives you a text entry sheet like this one:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/recipes-1.PNG" alt="" class="block">
                                  </p>

	<p>Now you can enter glyph names as they appear in the Glyph Info panel, like <code>germandbls</code>, <code>five</code>, <code>guillemetleft</code>. Or you can enter the actual character, like <code>ä</code> or <code>à</code>, and Glyphs will add a glyph with the proper glyph name, in this case <code>adieresis</code> and <code>agrave</code>. The command even recognizes ligatures, so you can enter <code>t_t</code> and you get a ligature glyph called <code>t_t</code> with two <code>t</code> components in it. You can enter many glyph names at once, separated by spaces or carriage returns. This way, you can copy and paste complete glyph lists you keep around in text files, and you can create many glyphs at once.</p>

	<h4>Single component recipes</h4>

	<p>The really cool stuff, however, are recipes. A recipe is a string containing an equals sign, e.g. <code>six.numr=six.sups</code>. Glyphs tries to make a component of what’s left of the equals sign. What’s right of the equals sign is the resulting glyph name. So, in the example of <code>six.numr=six.sups</code>, Glyphs will create a glyph called <code>six.sups</code> and inject a <code>six.numr</code> component.</p>

	<p>Think of the possibilities. Imagine you want to build an uppercase-only font. You could enter something like this:</p>

<pre><code>A=a B=b C=c D=d E=e F=f G=g H=h I=i J=j K=k L=l M=m
N=n O=o P=p Q=q R=r S=s T=t U=u V=v W=w X=x Y=y Z=z</code></pre>

	<p>This creates lowercase letters a-z and inserts the caps A-Z into them, but as components! This way, upper- and lowercase letters will always stay synchronized. Cool.</p>

	<h4>Multiple component recipes</h4>

	<p>Enter the plus sign. Take a look at these recipes:</p>

<pre><code>d+caron.alt=dcaron
t+caron.alt=tcaron</code></pre>

	<p>This takes the <code>d</code> or <code>t</code> component respectively, adds the <code>caron.alt</code> component and creates the glyphs <code>dcaron</code> and <code>tcaron</code>. Please note that in both cases, the second glyph is a diacritical mark. And if all the glyphs involved carry <a href="http://glyphsapp.com/blog/diacritics">corresponding anchors</a>, Glyphs can build proper diacritics right away. This comes in handy if you have to build lesser-known diacritics like the Czech <code>dcaron</code>:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/recipes-2.PNG" alt="" class="block">
                                  </p>

	<p>In most cases, the built-in recipes will do nicely. And you only need to write the glyph name and Glyphs figures out the rest. E.g. if you enter <code>edieresis</code>, Glyphs will build it from <code>e</code> and <code>dieresis</code> components. You can take a look at the built-in recipes in the Components column of <em>Windows &gt; Glyph Info</em>. If you do not agree with the pre-cooked recipe, you can roll your own with the plus sign.</p>

	<p>Let’s take it one step further:</p>

<pre><code>s.sc+s.sc=germandbls.sc</code></pre>

	<p>In this case, the second glyph is not a diacritical mark, but a regular letter. This means that, in this example, Glyphs will insert two <code>s.sc</code> next to each other, forming a smallcap double s, built from <code>s.sc</code> components. This is what <code>germandbls</code> is supposed to be turned into when switching to smallcaps, at least according to official (prescriptive) German orthography:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/recipes-3.PNG" alt="" class="block">
                                  </p>

	<p>To sum up, using recipes, you can add two glyphs to create either a diacritic or a digraph. And the best thing about it is that the resulting glyph will be made of components.</p>

	<p><small><span class="caps"><span class="caps">SAMPLE</span></span> <span class="caps"><span class="caps">FONT</span></span>: <a href="http://www.abclitera.ch"><span class="caps"><span class="caps">ALENA</span></span></a>, <span class="caps"><span class="caps">COURTESY</span></span> OF <span class="caps"><span class="caps">ROLAND</span></span> <span class="caps"><span class="caps">STIEGER</span></span>.</small></p>
        ]]>
      
      </description>
      <dc:subject><![CDATA[]]></dc:subject>
      <dc:date>2013-01-14T22:27:26+00:00</dc:date>
    </item>

    <item>
      <title><![CDATA[Drawing good paths]]></title>
      <link>http://glyphsapp.com/blog/drawing-good-paths/</link>
      <guid>http://glyphsapp.com/blog/drawing-good-paths/#When:20:13:11Z</guid>      
      <description>
      
        
        
          
        
          
        
          
        
          
        
          
        
          
                
        <![CDATA[
          <p>Badly drawn outlines can cause headache. Your letters may look mangled or not appear at all. You can avoid these difficulties if you keep a few basic rules in mind.</p>

	<h4>The magic triangle</h4>

	<p>This is important: every curve segment should fit nicely in a triangle.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/goodpaths-1.png" alt="" class="block">
                                  </p>

	<p>‘What’s a segment?’ I hear you ask. Simple, it’s <em>everything between two adjacent on-curve points</em> a.k.a. nodes. There are two types of segments, straight lines and curves. Straight lines only consist of those two nodes. Curve segments additionally sport two off-curve points a.k.a. Bézier control points (<span class="caps"><span class="caps">BCP</span></span>s) or ‘handles’.</p>

	<p>It’s important to note that the magic triangle is described by the two nodes encompassing the segment and the point where the <em>elongations of the handles</em> intersect. This means that the handles must never extend outside the triangle. If they do, you may want to reconsider the position of your nodes. So these two things should not happen: a handle crossing the other handle, and a handle crossing the elongation of the other handle. This may produce unnecessary inflections, double-inflections, cusp curves or even self-intersections, all of which may put a rasterizer into trouble.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/goodpaths-2.png" alt="" class="block">
                                  </p>

	<p>This may come as a surprise to you if you have prior experience in vector applications like Illustrator. First, the handles <em>do not belong to the nodes, but to the segment.</em> Secondly, a curve segment <em>always has two <span class="caps"><span class="caps">BCP</span></span>s,</em> never just one. Illustrator seems to let you draw curve segments with only one <span class="caps"><span class="caps">BCP</span></span>. But actually, what Illustrator really does is hide the second <span class="caps"><span class="caps">BCP</span></span> in one of the surrounding nodes. This is pretty bad because in font vectors, no two points should share the same coordinates. Plus, you have more control over the path if you make good use of both <span class="caps"><span class="caps">BCP</span></span>s.</p>

	<p>If one of the <span class="caps"><span class="caps">BCP</span></span>s appears to be missing, it’s hiding in the node next to it. The easiest way to fix this is to select a point in the vicinity, be it a handle or a node, and then tab to the hiding handle. Use Shift-tab to go into the opposite direction. A light-grey highlight indicates that the handle is selected. Now, use your arrow keys to drag the handle out of the node. If you add the option key, your handle will keep its direction. Hold down Shift for increments of 10:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/goodpaths-6.gif" alt="" class="block">
                                  </p>

	<p>The triangle rule also implies that a curve segment should only have a single orientation, i.e. not switch from clockwise to counter clockwise. There are, however, exceptions to this rule. Very often, you’re better off with a double inflection when drawing glyphs like an <code>S</code> or a <code>tilde</code>, especially if it’s only a small path movement. When you draw cupped serifs, you even need to have double inflections:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/goodpaths-3.png" alt="" class="block">
                                  </p>

	<p>Make sure Points A and C are on the same height, all the <span class="caps"><span class="caps">BCP</span></span>s are horizontal, and the distance between the base and B is less than 20 units. Set your <code>postscriptBlueShift</code> custom parameter to the depth of your cups plus one. Then the autohinter can apply a so-called flex hint.</p>

	<h4>Path orientation and order</h4>

	<p>Wrong path directions can mess up counters. Paths need to be oriented counter-clockwise, counters need to be oriented clockwise. You can control path directions by selecting paths, right-clicking and picking <em>Reverse Selected Contours</em> from the context menu. Don’t wanna keep that in mind? No problem. Glyphs can do that for you. Just pick <em>Layers &gt; Correct Path Direction</em> (Cmd-Shift-R) and you’re done. This command also works on multiple glyphs, or even the whole font.</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/goodpaths-4.png" alt="" class="block">
                                  </p>

	<p>By the way, <em>Layers &gt; Correct Path Direction</em> (Cmd-Shift-R) also re-orders your paths and resets the starting point in each closed path. You can quickly cure most interpolation problems by running this command in each master.</p>

	<h4>Self-intersection</h4>

	<p>A path in a font must not intersect itself. You can fix a self-intersection by selecting the contour in question and choosing <em>Filter &gt; Remove Overlap</em> (Cmd-Shift-O).</p>

	<p>Sometimes, of course, you will want to insert an intersection for design purposes. In this case, make sure you activate <em>Remove Overlap</em> when you export your font (Cmd-E).</p>

	<h4>Superfluous points</h4>

	<p>Not really a biggie, but it can improve the rendering performance of your font: <em>Layers &gt; Tidy Up Paths</em> (Cmd-Opt-Shift-T) will remove superfluous nodes and <span class="caps"><span class="caps">BCP</span></span>s. This command will also fix the type of your nodes, thus changing a blue corner point into a green curve point (or vice versa) where necessary.</p>

	<h4>Extremum points</h4>

	<p>While we’re at it, a lot of stuff is much easier if you insert nodes at the x and y extremes of your paths. Very often, this allows you to get rid of the other points while achieving simpler paths, fewer points, smaller file sizes.</p>

	<p>You can either choose <em>Layers &gt; Add Extremes</em> to add extrema to the selected outlines, selected glyphs or even the whole font. Or, if you want to have more control, just take your Pen tool (P) and Shift-click on the path. Glyphs will look for the nearest extremum or inflection point of the curve and insert a node there.</p>

	<p>After you inserted extremum points, you can often get rid of intermediate points without compromising on the shape:</p>

	<p>
                                                                                      <img src="/content/images/blog-screenshots/goodpaths-5.png" alt="" class="block">
                                  </p>

	<h4>Open and closed</h4>

	<p>Did a whole path go missing in the final font? Perhaps it was open. Open paths are ignored at export time. So, all paths should be closed.</p>

	<p>To close a path, just drag one of the open ends onto the other one with your Edit tool (V). Or switch to the Pen tool (P) and subsequently click on both end points to add a closing segment.</p>

	<h4>Vectors out of bounds</h4>

	<p>Got super-weird left or right sidebearing values? You probably have some object way off the visible part of your glyph. Here’s how to get rid of it: </p>

	<ol>
		<li>Make sure the right glyph is active, i.e. the cursor is placed before it.</li>
		<li>Switch to the Edit tool by clicking on the arrow symbol in the toolbar.</li>
		<li>Choose <em>Edit &gt; Select All</em> (Cmd-A). All paths in the glyph are selected now.</li>
		<li>While simultaneously holding down your Shift key, drag a rectangle selection across the parts you want to keep. This will deselect them. Now, only the out-of-bounds debris remains selected.</li>
		<li>Hit the Delete key.</li>
	</ol>

	<p>Now is a good time to go through your glyphs and optimize the vectors. Trust me, it will save you some hassle later.</p>
        ]]>
      
      </description>
      <dc:subject><![CDATA[]]></dc:subject>
      <dc:date>2013-01-06T20:13:11+00:00</dc:date>
    </item>

    
    </channel>
</rss>