/usr/share/doc/libfreetype6/glyphs/glyphs-4.html is in libfreetype6-dev 2.5.2-1ubuntu2.8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type"
content="text/css">
<meta http-equiv="Content-Script-Type"
content="text/javascript">
<meta name="description"
content="FreeType Documentation">
<meta name="Author"
content="David Turner">
<link rel="icon"
sizes="16x16"
href="../../../image/favicon_-90.ico">
<link rel="shortcut icon"
href="../../../image/favicon_-90.ico">
<link rel="stylesheet"
type="text/css"
href="../../../freetype2_-90.css">
<script type="text/javascript"
src="../../../jquery-1.8.3.min.js">
</script>
<script type="text/javascript"
src="../../../jquery.ba-resize.min.js">
</script>
<script type="text/javascript"
src="../../../freetype2.js">
</script>
<title>FreeType Glyph Conventions / IV</title>
</head>
<body>
<div id="top"
class="bar">
<h1><a href="../../../index.html">FreeType</a> Glyph
Conventions / IV</h1>
</div>
<div id="wrapper">
<div class="colmask leftmenu">
<div class="colright">
<div class="col1wrap">
<div class="col1">
<!-- ************************************************** -->
<div id="kerning">
<h2>IV. Kerning</h2>
<p>The term <em>kerning</em> refers to specific information
used to adjust the relative positions of successive glyphs
in a string of text. This section describes several types
of kerning information, as well as the way to process them
when performing text layout.</p>
<h3 id="section-1">1. Kerning pairs</h3>
<p>Kerning consists of modifying the spacing between two
successive glyphs according to their outlines. For
example, a ‘T’ and a ‘y’ can be
easily moved closer, as the top of the ‘y’
fits nicely under the upper right bar of the
‘T’.</p>
<p>When laying out text with only their standard widths,
some consecutive glyphs seem a bit too close or too
distant. For example, the space between the
‘A’ and the ‘V’ in the following
word seems a little wider than needed.</p>
<p align="center">
<img src="bravo_unkerned.png"
height="37"
width="116"
alt="the word 'bravo' unkerned">
</p>
<p>Compare this to the same word, where the distance between
these two letters has been slightly reduced:</p>
<p align="center">
<img src="bravo_kerned.png"
height="37"
width="107"
alt="the word 'bravo' with kerning">
</p>
<p>As you can see, this adjustment can make a great
difference. Some font faces thus include a table
containing kerning distances for a set of given glyph
pairs for text layout.</p>
<ul>
<li>
<p>The pairs are ordered, i.e., the space for pair
‘(A,V)’ isn't necessarily the space for
pair ‘(V,A)’. They also use glyph
indices, not character codes.</p>
</li>
<li>
<p>Kerning distances can be expressed in horizontal or
vertical directions, depending on the layout and/or
the script. For example, some horizontal layouts like
Arabic can make use of vertical kerning adjustments
between successive glyphs. A vertical script can have
vertical kerning distances.</p>
</li>
<li>
<p>Kerning distances are expressed in grid units. They
are usually oriented in the <i>X</i> axis, which
means that a negative value indicates that two glyphs
must be set closer in a horizontal layout.</p>
</li>
</ul>
<p>Note that OpenType fonts (OTF) provide two distinct
mechanisms for kerning, using the ‘kern’ and
‘GPOS’ tables, respectively, which are part of
the OTF files. Older fonts only contain the former, while
recent fonts contain both tables or even
‘GPOS’ data only. FreeType only supports
kerning via the (rather simple) ‘kern’ table.
For the interpretation of kerning data in the (highly
sophisticated) ‘GPOS’ table you need a
higher-level library
like <a href="http://icu-project.org/">ICU</a> or
<a href="http://harfbuzz.org">HarfBuzz</a> since it can be
context dependent (this is, the kerning may vary depending
on the position within a text string, for example).</p>
<h3 id="section-2">2. Applying kerning</h3>
<p>Applying kerning when rendering text is a rather easy
process. It merely consists in adding the scaled kern
distance to the pen position before rendering the next
glyph. However, the typographically correct renderer must
take a few more details in consideration.</p>
<p>The ‘sliding dot’ problem is a good example:
Many font faces include a kerning distance between capital
letters like ‘T’ or ‘F’ and a
following dot (‘.’), in order to slide the
latter glyph just right to their main leg.</p>
<p align="center">
<img src="twlewis1.png"
height="38"
width="314"
alt="example for sliding dots">
</p>
<p>This sometimes requires additional adjustments between
the dot and the letter following it, depending on the
shapes of the enclosing letters. When applying
‘standard’ kerning adjustments, the previous
sentence would become</p>
<p align="center">
<img src="twlewis2.png"
height="36"
width="115"
alt="example for too much kerning">
</p>
<p>This is clearly too contracted. The solution here, as
exhibited in the first example, is to only slide the dots
if the conditions fit. Of course, this requires a certain
knowledge of the text's meaning, and this is exactly what
‘GPOS’ kerning is good for: Depending on the
context, different kerning values can be applied to get a
typographically correct result.</p>
</div>
<!-- ************************************************** -->
<div class="updated">
<p>Last update: 1-Jul-2013</p>
</div>
</div>
</div>
<!-- ************************************************** -->
<div class="col2">
</div>
</div>
</div>
<!-- ************************************************** -->
<div id="TOC">
<ul>
<li class="funding">
<p><a href="http://pledgie.com/campaigns/18808">
<img alt="Click here to lend your support to the FreeType project and make a donation at pledgie.com!"
src="http://pledgie.com/campaigns/18808.png?skin_name=chrome"
border="0"
align="middle">
</a></p>
<p><a href="http://flattr.com/thing/882217/The-FreeType-Project"
target="_blank">
<img class="with-border"
src="http://api.flattr.com/button/flattr-badge-large.png"
alt="Flattr this"
title="Flattr this"
border="0"
align="middle">
</a></p>
</li>
<li class="primary">
<a href="../../../index.html">Home</a>
</li>
<li class="primary">
<a href="../../../index.html#news">News</a>
</li>
<li class="primary">
<a href="../../index.html">Overview</a>
</li>
<li class="primary">
<a href="../../documentation.html">Documentation</a>
</li>
<li class="primary">
<a href="../../../developer.html">Development</a>
</li>
<li class="primary">
<a href="../../../contact.html"
class="emphasis">Contact</a>
</li>
<li>
<!-- separate primary from secondary entries -->
</li>
<li class="secondary">
<a href="index.html">FreeType Glyph Conventions</a>
</li>
<li class="tertiary">
<a href="glyphs-1.html">Basic Typographic Concepts</a>
</li>
<li class="tertiary">
<a href="glyphs-2.html">Glyph Outlines</a>
</li>
<li class="tertiary">
<a href="glyphs-3.html">Glyph Metrics</a>
</li>
<li class="tertiary">
<a href="glyphs-4.html" class="current">Kerning</a>
</li>
<li class="tertiary">
<a href="glyphs-5.html">Text Processing</a>
</li>
<li class="tertiary">
<a href="glyphs-6.html">FreeType Outlines</a>
</li>
<li class="tertiary">
<a href="glyphs-7.html">FreeType Bitmaps</a>
</li>
</ul>
</div>
</div> <!-- id="wrapper" -->
<div id="TOC-bottom">
</div>
</body>
</html>
|