summaryrefslogtreecommitdiff
path: root/ttfautohint/osx.html
blob: 26ab873e4454e064600adcae64b1b899f920a3eb (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
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
<!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="macports">
          <h2>Compilation With MacPorts</h2>

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

          <p>To install the ttfautohint command line executable, open
            Terminal.app and type</p>

          <pre>
sudo port install ttfautohint</pre>

          <p>Enter your Mac login password, then press the return key
            again.  This installs the currently released version.</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>

          <p>To install both the ttfautohint command line executable
            and the GUI version, use</p>

          <pre>
sudo port install ttfautohint +qt5</pre>

          <p>instead of the above installation command.  Enter your
            Mac login password, then press the return key again.  This
            installs the currently released version using
            the <a href="https://www.qt.io">Qt5</a> framework.  If you
            want to use the Qt4 framework (for example, if you have a
            MacOS version that is not supported by Qt5),
            replace <code>+qt5</code> with <code>+qt4</code> in the
            above command.</p>

          <p>After installation you can now type</p>

          <pre>
ttfautohintGUI</pre>

          <p>from the Terminal app to start the GUI.</p>
        </div>


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

          <p class="warning">Warning&nbsp;1: Since autumn 2018,
            Homebrew tries to avoid package options.  As a
            consequence, I had the choice between ttfautohint or
            ttfautohintGUI being part of core Homebrew – I decided to
            stay with the former.  See below if you need
            ttfautohintGUI.</p>

          <p class="warning">Warning&nbsp;2: Homebrew only supports
            recent MacOS versions (i.e., the current one and two older
            releases).  For older MacOS versions please use
            MacPorts, <a href="#macports">see above</a>.</p>

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

          <h3>ttfautohint only</h3>

          <p>If you do not need the GUI version of ttfautohint, you
            can install the ttfautohint command line executable
            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>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>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>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>

          <h3>ttfautohint and ttfautohintGUI</h3>

          <p>If you need the GUI version of ttfautohint (which depends
            on the Qt library), you can't use core Homebrew's version.
            Instead, please
            use <a href="mailto:cosimo@anthrotype.com">Cosimo
            Lupo's</a> Homebrew Tap (i.e., a user's github
            repository).  Calling</p>

          <pre>
brew install anthrotype/ttfautohint/ttfautohintGUI</pre>

          <p>will both install ttfautohint and ttfautohintGUI.  For
            the git HEAD version (i.e., the current development
            version) use</p>

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

          <p>instead.</p>

          <p>If you want to switch from core Homebrew to Cosimo's tap,
            you should start with</p>

          <pre>
brew uninstall ttfautohint</pre>

          <p>before installing from the tap to avoid
            interferences.</p>

          <p>After installation you can now type</p>

          <pre>
ttfautohintGUI</pre>

          <p>from the Terminal app to start the GUI.</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>
            or <a href="https://macports.org">MacPorts</a>, you should
            check out one of these two package managers because both
            are extremely useful and automate all ttfautohint build
            dependency installs for you.  But supposing you don't want
            to use them, 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: 8-Feb-2019</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="#macports">Compilation With MacPorts</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>