freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] ttfautohint: How to install


From: Werner LEMBERG
Subject: [ft-devel] ttfautohint: How to install
Date: Fri, 17 Jun 2011 09:31:40 +0200 (CEST)

> but i am embarrassed to admit that i have built the library but have
> not found how to use the 'autohint' function :) a quick howto,
> please!

One important thing I've forgotten to mention: You need the current
git version of FreeType to test the ttfautohint library; the
`configure' test for 2.4.4 in ttfautohint is a fake currently since
2.4.5 hasn't been released yet.  I know, I know, I should have done
this already weeks ago :-|

In case you are running a Unix box (this includes recent Macs), please
use the attached script which downloads and builds ttfautohint and
FreeType in a subdirectory called `ttfautohint-build'.  For
convenience, the created `ttfautohint' binary is static and not
dependent on other libraries.  After successful compilation, you can
find it in `ttfautohint-build/out/bin', and you can copy it to any
other directory.

If you run the script another time, it will update the git
repositories instead of downloading, then do a complete build again.

Calling `ttfautohint' is simple:

  ttfautohint <in-file> <out-file>

for example

  ttfautohint Bevan.ttf Bevan-TA.ttf

As mentioned earlier, there aren't options right now.  Note that the
program runs quite slow; adding a progress indicator is on my TODO
list also.

For building the binary you need the following packages installed on
your system:

  git
  autoconf
  automake
  libtool
  gcc (or any other compiler)

ttfautohint should build on Windows also since it is a simple command
line program and doesn't use exotic stuff, however, I haven't found
time yet to learn how to cross-compile (since I don't use Windows at
all :-).


    Werner
#!/bin/sh

test -a ttfautohint-build || mkdir ttfautohint-build
cd ttfautohint-build
test -a out || mkdir out

if test -a freetype2; then
  cd freetype2
  git pull
  cd ..
else
  git clone git://git.sv.nongnu.org/freetype/freetype2.git
fi

cd freetype2
sh autogen.sh
./configure --disable-shared \
            --prefix=`pwd`/../out \
            --without-zlib \
            --without-bzip2
make
make install

cd ..

if test -a ttfautohint; then
  cd ttfautohint
  git pull
  cd ..
else
  git clone git://repo.or.cz/ttfautohint.git
fi

cd ttfautohint
sh autogen.sh
./configure --with-freetype-config=`pwd`/../out/bin/freetype-config \
            --prefix=`pwd`/../out
make
make install

# eof

reply via email to

[Prev in Thread] Current Thread [Next in Thread]