blob: 5d9120362f9ec2ff793f60e91fa4a9f02d443f3a [file] [log] [blame]
Mike Fleming3933d922018-04-02 10:53:08 -07001Instructions below are for building standalone OTS utilities, if you want to
2use OTS as a library then the recommended way is to copy the source code and
3integrate it into your existing build system. Our build system does not build
4a shared library intentionally.
David Ghandehari9e5b5872016-07-28 09:50:04 -07005
Mike Fleming3933d922018-04-02 10:53:08 -07006General build instructions:
David Ghandehari9e5b5872016-07-28 09:50:04 -07007
Mike Fleming3933d922018-04-02 10:53:08 -07008 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 Ghandehari9e5b5872016-07-28 09:50:04 -070011
Mike Fleming3933d922018-04-02 10:53:08 -070012 $ ./autogen.sh
David Ghandehari9e5b5872016-07-28 09:50:04 -070013
Mike Fleming3933d922018-04-02 10:53:08 -070014 2. Build OTS
David Ghandehari9e5b5872016-07-28 09:50:04 -070015
Mike Fleming3933d922018-04-02 10:53:08 -070016 $ ./configure
17 $ make
David Ghandehari9e5b5872016-07-28 09:50:04 -070018
Mike Fleming3933d922018-04-02 10:53:08 -070019 3. Run the tests (if you wish)
David Ghandehari9e5b5872016-07-28 09:50:04 -070020
Mike Fleming3933d922018-04-02 10:53:08 -070021 $ make check
David Ghandehari9e5b5872016-07-28 09:50:04 -070022
Mike Fleming3933d922018-04-02 10:53:08 -070023Building on Windows:
David Ghandehari9e5b5872016-07-28 09:50:04 -070024
Mike Fleming3933d922018-04-02 10:53:08 -070025 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 Ghandehari9e5b5872016-07-28 09:50:04 -070028
Mike Fleming3933d922018-04-02 10:53:08 -070029 2. Install the required packages:
David Ghandehari9e5b5872016-07-28 09:50:04 -070030
Mike Fleming3933d922018-04-02 10:53:08 -070031 $ pacman -S autoconf automake pkg-config gcc make
David Ghandehari9e5b5872016-07-28 09:50:04 -070032
Mike Fleming3933d922018-04-02 10:53:08 -070033 3. Follow the general build instructions above.
David Ghandehari9e5b5872016-07-28 09:50:04 -070034
Mike Fleming3933d922018-04-02 10:53:08 -070035Developer 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!