summaryrefslogtreecommitdiff
path: root/ttfautohint/osx.html
blob: 0fc4ae6a62adfff4b1a6336d599b350bf33ab2cd (plain)
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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          "https://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="ttfautohint for OS X">
  <meta name="keywords"
        content="FreeType TrueType digital font TTF engine autohint
                 hint OSX">

  <link rel="icon"
        href="../image/favicon_90.ico">
  <link rel="shortcut icon"
        href="../image/favicon_90.ico">
  <link rel="stylesheet"
        type="text/css"
        href="../css/freetype2_90.css">

  <script type="text/javascript"
          src="../js/jquery-1.11.0.min.js">
  </script>
  <script type="text/javascript"
          src="../js/jquery.ba-resize.min.js">
  </script>
  <script type="text/javascript"
          src="../js/freetype2.js">
  </script>

  <title>Installation of ttfautohint on Mac OS&nbsp;X</title>
</head>

<body>

<div id="top"
     class="bar">
  <h1><a href="index.html">ttfautohint</a> on OS&nbsp;X</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <p>This page describes how to compile both ttfautohint and
          ttfautohintGUI on Mac OS&nbsp;X.</p>


        <!-- ************************************************** -->

        <div id="homebrew">
          <h2>Compilation With Homebrew</h2>

          <p class="warning">[Homebrew dropped active Qt4 support in
            summer 2016; the new option to activate Qt support for the
            ttfautohint brew formula is thus no
            longer <code>--with-qt</code> but <code>--with-qt5</code>,
            similar to other Homebrew packages that use Qt.]</p>

          <p>If you have <a href="https://brew.sh">Homebrew</a> and are
            comfortable with it, you can install ttfautohint and
            ttfautohintGUI (together with libttfautohint) quite
            easily.</p>

          <p>If you need the GUI version of ttfautohint (includes Qt
            dependency), use</p>

          <pre>
brew install ttfautohint --with-qt5</pre>

          <p>to get the currently released version.  For the git HEAD
            version (i.e., the current development version) use</p>

          <pre>
brew install --HEAD ttfautohint --with-qt5</pre>

          <p>instead.</p>

          <p>If you do not need the GUI version of ttfautohint, you
            can install the ttfautohint command line executable only
            with</p>

          <pre>
brew install ttfautohint</pre>

          <p>to get the currently released version.  For the git HEAD
            version (i.e., the current development version) use</p>

          <pre>
brew install --HEAD ttfautohint</pre>

          <p>instead.</p>

          <p>Note that you need an up-to-date Homebrew version for
          this simple installation.</p>

          <p>To upgrade ttfautohint from an older version, please
            follow the standard instructions given in
            the <a href="https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md#faq">Homebrew
            FAQ</a>.  However, in case you want to update from an
            older <tt>--HEAD</tt> installation to current git HEAD,
            you have to use</p>

          <pre>
brew reinstall --HEAD ttfautohint</pre>

          <p>or</p>

          <pre>
brew reinstall --HEAD ttfautohint --with-qt5</pre>

          <p>instead of calling <tt>brew upgrade ttfautohint</tt>
            (cf. <a href="https://github.com/Homebrew/homebrew/issues/13197">this
            homebrew tracker issue</a>).</p>

          <p>To start the GUI, you can now type</p>

          <pre>
ttfautohintGUI</pre>

          <p>from the Terminal app.</p>

          <p>You can execute the ttfautohint executable on the command
            line with</p>

          <pre>
ttfautohint</pre>

          <p>followed by an appropriate set of arguments as detailed
            in the <a href="doc/ttfautohint.html">usage
            documentation</a>.</p>
        </div>


        <!-- ************************************************** -->

        <div id="scratch">
          <h2>Compilation From Scratch</h2>

          <p>A simple solution to automatically compile ttfautohint
            (but not ttfautohintGUI) is Chris
            Simpkins's <a href="https://github.com/source-foundry/ttfautohint-build">ttfautohint-build</a>
            script.</p>

          <p>If you don't have <a href="https://brew.sh">Homebrew</a>,
            you should check it out because it's extremely useful and
            automates all ttfautohint build dependency installs for
            you.  But supposing you don't want to use it, you can
            install the command line executable ttfautohint and the
            ttfautohint GUI on Mac OS&nbsp;X from scratch.</p>

          <p>Following the instructions below, everything except XCode
            and Qt gets installed into the
            &lsquo;<tt>/usr/local/</tt>&rsquo; directory tree.  You
            should thus <em>prepend</em>
            &lsquo;<tt>/usr/local/bin</tt>&rsquo; to your path now (so
            that the new programs and scripts get found before the
            system ones).
            See <a href="https://architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/#.Uvm23FZr7RY">here</a>,
            for example, how to do that easily.  It is possible to
            change the default installation directory hierarchy,
            though; please read the
            generic <a href="https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=doc/INSTALL;hb=HEAD">GNU
            installation instructions</a> for more.</p>


          <h3>XCode</h3>

          <p>We start by installing XCode from the App Store, and then the Command Line
            Tools.  Instructions are at
            <a href="https://guide.macports.org/chunked/installing.html#installing.xcode">https://guide.macports.org/chunked/installing.html#installing.xcode</a>.</p>


          <h3>pkg-config</h3>

          <p>Another preliminary is pkg-config, which is a helper tool
            to get library information for both compilation and
            linking.</p>

          <p>Create a folder in your Home folder called
            &lsquo;<tt>src</tt>&rsquo;.</p>

          <p>In your browser,
            download <a href="https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz">https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz</a>.</p>

          <p>In Finder, go to your Downloads folder and double click
            the <tt>pkg-config-0.29.2.tar.gz</tt> file to unpack it
            into a folder named
            &lsquo;<tt>pkg-config-0.29.2</tt>&rsquo;.  Move that
            folder now into the <tt>src</tt> folder you created in
            your Home folder.</p>

          <p>Open Terminal.app, type</p>

          <pre>
cd ~/src/pkg-config-0.29.2</pre>

          <p>and press the return key.  Continue with</p>

          <pre>
./configure</pre>

          <p>and press the return key again.  You will see a bunch of
            text rolling through the Terminal app.  When it is done,
            type</p>

          <pre>
make</pre>

          <p>and press the return key to see more text rolling
            through.  When it is done, type</p>

          <pre>
sudo make install</pre>

          <p>and press the return key.  Enter your Mac login password,
            then press the return key again.</p>


          <h3>FreeType</h3>

          <p>Next we install FreeType, the system that ttfautohint is
            based on.</p>

          <p>In your browser, download
            <a href="https://sourceforge.net/projects/freetype/files/freetype2/2.9.1/freetype-2.9.1.tar.gz/download">https://sourceforge.net/projects/freetype/files/freetype2/2.9.1/freetype-2.9.1.tar.gz/download</a>.</p>

          <p>In Finder, go to your Downloads folder and double click
            the <tt>freetype-2.9.1.tar.gz</tt> file to unpack it into
            a folder named &lsquo;<tt>freetype-2.9.1</tt>&rsquo;.
            Move that folder now into the <tt>src</tt> folder you
            created in your Home folder.</p>

          <p>Open Terminal.app, type</p>

          <pre>
cd ~/src/freetype-2.9.1</pre>

          <p>and press the return key.  Continue with</p>

          <pre>
./configure</pre>

          <p>and press the return key again.  You will see a bunch of
            text rolling through the Terminal app.  When it is done,
            type</p>

          <pre>
make</pre>

          <p>and press the return key to see more text rolling
            through.  When it is done, type</p>

          <pre>
sudo make install</pre>

          <p>and press the return key.  Enter your Mac login password,
            then press the return key again.</p>


          <h3>HarfBuzz</h3>

          <p>This library is also used by ttfautohint to handle
            OpenType features in TrueType fonts.</p>

          <p>In your browser, download
            <a href="https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.8.4.tar.bz2">https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.8.4.tar.bz2</a>.</p>

          <p>In Finder, go to your Downloads folder and double click
            the <tt>harfbuzz-1.8.4.tar.bz2</tt> file to unpack it
            into a folder named
            &lsquo;<tt>harfbuzz-1.8.4</tt>&rsquo;.  Move that folder
            now into the <tt>src</tt> folder you created in your Home
            folder.</p>

          <p>Open Terminal.app, type</p>

          <pre>
cd ~/src/harfbuzz-1.8.4</pre>

          <p>and press the return key.  Continue with</p>

          <pre>
./configure --with-glib=no</pre>

          <p>and press the return key again.  You will see a bunch of
            text rolling through the Terminal app.  When it is done,
            type</p>

          <pre>
make</pre>

          <p>and press the return key to see more text rolling
            through.  When it is done, type</p>

          <pre>
sudo make install</pre>

          <p>and press the return key.  Enter your Mac login password,
            then press the return key again.</p>

          <p>[Note: For a complete installation of FreeType you should
            now compile and install FreeType again to make it use the
            most recent version of HarfBuzz.  However, this is not
            necessary if you only want to build ttfautohint and
            nothing else.]</p>


          <h3>Qt</h3>

          <p>This step is optional and only required if you intend to
            install ttfautohintGUI (the GUI version of ttfautohint).
            These steps install the <a href="https://qt.io/">Qt</a>
            libraries for ttfautohint's Graphical User Interface.</p>

          <p>With your browser, download the latest &lsquo;Qt
            Libraries for Mac&rsquo; <tt>.dmg</tt> file from
            <a href="https://qt.io/download">https://qt.io/download</a>
            and install Qt in the normal way.  Currently, a direct
            link is
            <a href="https://download.qt.io/official_releases/qt/5.11/5.11.1/qt-opensource-mac-x64-5.11.1.dmg">https://download.qt.io/official_releases/qt/5.11/5.11.1/qt-opensource-mac-x64-5.11.1.dmg</a>.</p>

          <p>[In case you need Qt&nbsp;4,
            use <a href="https://download.qt.io/archive/qt/4.8/4.8.7/qt-opensource-mac-4.8.7.dmg">https://download.qt.io/archive/qt/4.8/4.8.7/qt-opensource-mac-4.8.7.dmg</a>
            instead.]</p>


          <h3>ttfautohint</h3>

          <p>We are almost finished.
            Visit <a href="https://freetype.org/ttfautohint">https://freetype.org/ttfautohint</a>
            and in the download section, download the latest version
            of the source code.  Currently the direct link is
            <a href="https://sourceforge.net/projects/freetype/files/ttfautohint/1.8.2/ttfautohint-1.8.2.tar.gz/download">https://sourceforge.net/projects/freetype/files/ttfautohint/1.8.2/ttfautohint-1.8.2.tar.gz/download</a>.</p>

          <p>In Finder, go to your Downloads folder and double click the
            <tt>ttfautohint-1.8.2.tar.gz</tt> file to unpack it into a
            folder named &lsquo;<tt>ttfautohint-1.8.2</tt>&rsquo;.
            Move the <tt>ttfautohint-1.8.2</tt> folder to
            the <tt>src</tt> folder in your Home folder.</p>

          <p>In Terminal, type</p>

          <pre>
cd ~/src/ttfautohint-1.8.2</pre>

          <p>and press the return key.</p>

          <p>To include the GUI version of ttfautohint in the
            installation, use the following command.</p>

          <pre>
./configure --with-doc=no</pre>

          <p>To install only the ttfautohint command line executable
            (without the GUI version of ttfautohint), use the
            following command.</p>

          <pre>
./configure --with-doc=no --with-qt=no</pre>

          <p>Press the return key again.  You will see a bunch of text
            rolling through the Terminal app.  When it is done,
            type</p>

          <pre>
make</pre>

          <p>and press the return key.  Again you will see a bunch of
            text rolling through the Terminal app.  When it is done,
            type</p>

          <pre>
sudo make install</pre>

          <p>followed by a press to the return key.  As above, enter
            your Mac login password, then press the return key again.
            You will see a bunch of text rolling through the Terminal
            app.</p>

          <p>For GUI installs, you can launch ttfautohintGUI by
            typing</p>

          <pre>
ttfautohintGUI</pre>

          <p>After pressing the return key, you should now see the
            GUI!</p>

          <p>You can execute the ttfautohint executable on the command
            line with</p>

          <pre>
ttfautohint</pre>

          <p>followed by an appropriate set of arguments as detailed
            in
            the <a href="https://www.freetype.org/ttfautohint/doc/ttfautohint.html">usage
            documentation</a>.</p>
        </div>


        <!-- ************************************************** -->

        <div class="webmaintainer">
          <p>This page is maintained by
            <a href="mailto:wl@gnu.org">Werner Lemberg</a>, based on
            instructions written
            by <a href="mailto:dave@understandingfonts.com">David
            Crossland</a>
            and <a href="mailto:git.simpkins@gmail.com">Chris
            Simpkins</a>.</p>
        </div>
        <div class="updated">
          <p>Last update: 24-Jul-2018</p>
        </div>
      </div>
    </div>


    <!-- ************************************************** -->

    <div class="col2">
    </div>
  </div>
</div>


<!-- ************************************************** -->

<div id="TOC">
  <ul>
    <li class="funding">
      <form action="https://www.paypal.com/cgi-bin/webscr"
            method="post"
            target="_top">
        <input type="hidden"
               name="cmd"
               value="_s-xclick">
        <input type="hidden"
               name="hosted_button_id"
               value="SK827YKEALMT4">
        <input type="image"
               src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
               name="submit"
               alt="PayPal - The safer, easier way to pay online!">
        <img alt=""
             border="0"
             src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif"
             width="1"
             height="1">
      </form>
    </li>
    <li class="primary">
      <a href="index.html">Home</a>
    </li>

    <li>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="osx.html" class="current">ttfautohint on OS&nbsp;X</a>
    </li>
    <li class="tertiary">
      <a href="#homebrew">Compilation With Homebrew</a>
    </li>
    <li class="tertiary">
      <a href="#scratch">Compilation From Scratch</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>