Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 1 | Instructions below are for building standalone OTS utilities, if you want to |
| 2 | use OTS as a library then the recommended way is to copy the source code and |
| 3 | integrate it into your existing build system. Our build system does not build |
| 4 | a shared library intentionally. |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 5 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 6 | General build instructions: |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 7 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 8 | 1. If you are building from cloned Git repository, you will need to update |
| 9 | the git sub modules, as well as run autoreconf. A convenience script is |
| 10 | provided: |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 11 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 12 | $ ./autogen.sh |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 13 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 14 | 2. Build OTS |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 15 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 16 | $ ./configure |
| 17 | $ make |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 18 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 19 | 3. Run the tests (if you wish) |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 20 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 21 | $ make check |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 22 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 23 | Building on Windows: |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 24 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 25 | 1. A POSIX-compatible environment is required to build OTS, MSYS2 is |
| 26 | recommended. Follow the installation instructions on |
| 27 | https://msys2.github.io/. |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 28 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 29 | 2. Install the required packages: |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 30 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 31 | $ pacman -S autoconf automake pkg-config gcc make |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 32 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 33 | 3. Follow the general build instructions above. |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 34 | |
Mike Fleming | 3933d92 | 2018-04-02 10:53:08 -0700 | [diff] [blame] | 35 | Developer build instructions: |
| 36 | |
| 37 | 1. If you would like to see the source code lines related to reported |
| 38 | errors, then replace configure call above with: |
| 39 | |
| 40 | $ ./configure --enable-debug |
| 41 | |
| 42 | For example, |
| 43 | |
| 44 | $ ./ots-sanitize ~/fonts/ofl/merriweathersans/MerriweatherSans-Bold.ttf |
| 45 | ERROR at src/layout.cc:100 (ParseScriptTable) |
| 46 | ERROR: Layout: DFLT table doesn't satisfy the spec. for script tag DFLT |
| 47 | ERROR at src/layout.cc:1247 (ParseScriptListTable) |
| 48 | ERROR: Layout: Failed to parse script table 0 |
| 49 | ERROR at src/gsub.cc:642 (ots_gsub_parse) |
| 50 | ERROR: GSUB: Failed to parse script list table |
| 51 | ERROR at src/ots.cc:669 (ProcessGeneric) |
| 52 | Failed to sanitize file! |