Skip to content
Browse files

added support files

  • Loading branch information...
1 parent fcdbaf5 commit fa704da196fddaf5abbeafb52ea2d174afb82841 @puzrin puzrin committed
Showing with 15,873 additions and 0 deletions.
  1. +4 −0 support/README.md
  2. +6 −0 support/ttf2eot/.gitignore
  3. +5 −0 support/ttf2eot/ChangeLog
  4. +5 −0 support/ttf2eot/Makefile
  5. +336 −0 support/ttf2eot/OpenTypeUtilities.cpp
  6. +36 −0 support/ttf2eot/OpenTypeUtilities.h
  7. +35 −0 support/ttf2eot/README
  8. +94 −0 support/ttf2eot/ttf2eot.cpp
  9. +14 −0 support/ttfautohint/.gitignore
  10. +5 −0 support/ttfautohint/AUTHORS
  11. +59 −0 support/ttfautohint/COPYING
  12. +10 −0 support/ttfautohint/ChangeLog
  13. +169 −0 support/ttfautohint/FTL.TXT
  14. +340 −0 support/ttfautohint/GPLv2.TXT
  15. +365 −0 support/ttfautohint/INSTALL
  16. +18 −0 support/ttfautohint/Makefile.am
  17. +70 −0 support/ttfautohint/NEWS
  18. +44 −0 support/ttfautohint/README
  19. +29 −0 support/ttfautohint/THANKS
  20. +104 −0 support/ttfautohint/TODO
  21. +883 −0 support/ttfautohint/bootstrap
  22. +79 −0 support/ttfautohint/bootstrap.conf
  23. +147 −0 support/ttfautohint/configure.ac
  24. +8 −0 support/ttfautohint/frontend/.gitignore
  25. +70 −0 support/ttfautohint/frontend/Makefile.am
  26. +115 −0 support/ttfautohint/frontend/info.cpp
  27. +55 −0 support/ttfautohint/frontend/info.h
  28. +614 −0 support/ttfautohint/frontend/main.cpp
  29. +849 −0 support/ttfautohint/frontend/maingui.cpp
  30. +118 −0 support/ttfautohint/frontend/maingui.h
  31. +5 −0 support/ttfautohint/lib/.gitignore
  32. +48 −0 support/ttfautohint/lib/Makefile.am
  33. +318 −0 support/ttfautohint/lib/ta.h
  34. +1,859 −0 support/ttfautohint/lib/tabytecode.c
  35. +523 −0 support/ttfautohint/lib/tabytecode.h
  36. +223 −0 support/ttfautohint/lib/tacvt.c
  37. +51 −0 support/ttfautohint/lib/tadsig.c
  38. +59 −0 support/ttfautohint/lib/tadummy.c
  39. +33 −0 support/ttfautohint/lib/tadummy.h
  40. +59 −0 support/ttfautohint/lib/taerror.c
  41. +52 −0 support/ttfautohint/lib/tafile.c
  42. +118 −0 support/ttfautohint/lib/tafont.c
  43. +4,958 −0 support/ttfautohint/lib/tafpgm.c
  44. +81 −0 support/ttfautohint/lib/tagasp.c
  45. +399 −0 support/ttfautohint/lib/tagloadr.c
  46. +129 −0 support/ttfautohint/lib/tagloadr.h
  47. +316 −0 support/ttfautohint/lib/taglobal.c
  48. +50 −0 support/ttfautohint/lib/taglobal.h
  49. +1,191 −0 support/ttfautohint/lib/taglyf.c
  50. +715 −0 support/ttfautohint/lib/tagpos.c
Sorry, we could not display the entire diff because it was too big.
View
4 support/README.md
@@ -0,0 +1,4 @@
+3rd-party tools, required by font builder
+
+- [ttf2eot](http://code.google.com/p/ttf2eot/) - converts ttf fonts to eot.
+- [ttfautohint](http://www.freetype.org/ttfautohint/) - build hinting info for ttf fonts.
View
6 support/ttf2eot/.gitignore
@@ -0,0 +1,6 @@
+*.o
+*.core
+*.obj
+*.exe
+core
+ttf2eot
View
5 support/ttf2eot/ChangeLog
@@ -0,0 +1,5 @@
+- 0.0.2-1
+ - Fix implicit declaration of memcmp, required on ubuntu - Thanks adamplumb
+ - Quick modification to make msvc compilation work - Thanks deepikakorapati
+ - Quick fixes for mingw32 compilation - Thanks yorickvanpelt
+- 0.0.2-2
View
5 support/ttf2eot/Makefile
@@ -0,0 +1,5 @@
+ttf2eot: OpenTypeUtilities.o ttf2eot.o
+ g++ -o $@ $^
+
+clean:
+ rm -f *.o *.core *.obj *.exe core ttf2eot
View
336 support/ttf2eot/OpenTypeUtilities.cpp
@@ -0,0 +1,336 @@
+/* Modified for use with ttf2eot, originally from WebKit. */
+
+/*
+ * Copyright (C) 2008 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <string.h>
+#include <stddef.h>
+
+#include <vector>
+
+#ifndef _MSC_VER
+# include <stdint.h>
+#else
+typedef unsigned char uint8_t;
+#endif
+
+#include "OpenTypeUtilities.h"
+
+
+using std::vector;
+
+typedef unsigned Fixed;
+
+#define DEFAULT_CHARSET 1
+
+struct BigEndianUShort {
+ operator unsigned short() const { return (v & 0x00ff) << 8 | v >> 8; }
+ BigEndianUShort(unsigned short u) : v((u & 0x00ff) << 8 | u >> 8) { }
+ unsigned short v;
+};
+
+struct BigEndianULong {
+ operator unsigned() const { return (v & 0xff) << 24 | (v & 0xff00) << 8 | (v & 0xff0000) >> 8 | v >> 24; }
+ BigEndianULong(unsigned u) : v((u & 0xff) << 24 | (u & 0xff00) << 8 | (u & 0xff0000) >> 8 | u >> 24) { }
+ unsigned v;
+};
+
+#pragma pack(1)
+
+struct EOTPrefix {
+ unsigned eotSize;
+ unsigned fontDataSize;
+ unsigned version;
+ unsigned flags;
+ uint8_t fontPANOSE[10];
+ uint8_t charset;
+ uint8_t italic;
+ unsigned weight;
+ unsigned short fsType;
+ unsigned short magicNumber;
+ unsigned unicodeRange[4];
+ unsigned codePageRange[2];
+ unsigned checkSumAdjustment;
+ unsigned reserved[4];
+ unsigned short padding1;
+};
+
+struct TableDirectoryEntry {
+ BigEndianULong tag;
+ BigEndianULong checkSum;
+ BigEndianULong offset;
+ BigEndianULong length;
+};
+
+struct sfntHeader {
+ Fixed version;
+ BigEndianUShort numTables;
+ BigEndianUShort searchRange;
+ BigEndianUShort entrySelector;
+ BigEndianUShort rangeShift;
+ TableDirectoryEntry tables[1];
+};
+
+struct OS2Table {
+ BigEndianUShort version;
+ BigEndianUShort avgCharWidth;
+ BigEndianUShort weightClass;
+ BigEndianUShort widthClass;
+ BigEndianUShort fsType;
+ BigEndianUShort subscriptXSize;
+ BigEndianUShort subscriptYSize;
+ BigEndianUShort subscriptXOffset;
+ BigEndianUShort subscriptYOffset;
+ BigEndianUShort superscriptXSize;
+ BigEndianUShort superscriptYSize;
+ BigEndianUShort superscriptXOffset;
+ BigEndianUShort superscriptYOffset;
+ BigEndianUShort strikeoutSize;
+ BigEndianUShort strikeoutPosition;
+ BigEndianUShort familyClass;
+ uint8_t panose[10];
+ BigEndianULong unicodeRange[4];
+ uint8_t vendID[4];
+ BigEndianUShort fsSelection;
+ BigEndianUShort firstCharIndex;
+ BigEndianUShort lastCharIndex;
+ BigEndianUShort typoAscender;
+ BigEndianUShort typoDescender;
+ BigEndianUShort typoLineGap;
+ BigEndianUShort winAscent;
+ BigEndianUShort winDescent;
+ BigEndianULong codePageRange[2];
+ BigEndianUShort xHeight;
+ BigEndianUShort capHeight;
+ BigEndianUShort defaultChar;
+ BigEndianUShort breakChar;
+ BigEndianUShort maxContext;
+};
+
+struct headTable {
+ Fixed version;
+ Fixed fontRevision;
+ BigEndianULong checkSumAdjustment;
+ BigEndianULong magicNumber;
+ BigEndianUShort flags;
+ BigEndianUShort unitsPerEm;
+ long long created;
+ long long modified;
+ BigEndianUShort xMin;
+ BigEndianUShort xMax;
+ BigEndianUShort yMin;
+ BigEndianUShort yMax;
+ BigEndianUShort macStyle;
+ BigEndianUShort lowestRectPPEM;
+ BigEndianUShort fontDirectionHint;
+ BigEndianUShort indexToLocFormat;
+ BigEndianUShort glyphDataFormat;
+};
+
+struct nameRecord {
+ BigEndianUShort platformID;
+ BigEndianUShort encodingID;
+ BigEndianUShort languageID;
+ BigEndianUShort nameID;
+ BigEndianUShort length;
+ BigEndianUShort offset;
+};
+
+struct nameTable {
+ BigEndianUShort format;
+ BigEndianUShort count;
+ BigEndianUShort stringOffset;
+ nameRecord nameRecords[1];
+};
+
+#pragma pack()
+
+static void appendBigEndianStringToEOTHeader(vector<uint8_t>&eotHeader, const BigEndianUShort* string, unsigned short length)
+{
+ size_t size = eotHeader.size();
+ eotHeader.resize(size + length + 2 * sizeof(unsigned short));
+ unsigned short* dst = reinterpret_cast<unsigned short*>(&eotHeader[0] + size);
+ unsigned i = 0;
+ dst[i++] = length;
+ unsigned numCharacters = length / 2;
+ for (unsigned j = 0; j < numCharacters; j++)
+ dst[i++] = string[j];
+ dst[i] = 0;
+}
+
+bool getEOTHeader(unsigned char* fontData, size_t fontSize, vector<uint8_t>& eotHeader, size_t& overlayDst, size_t& overlaySrc, size_t& overlayLength)
+{
+ overlayDst = 0;
+ overlaySrc = 0;
+ overlayLength = 0;
+
+ size_t dataLength = fontSize;
+ const char* data = (const char *) fontData;
+
+ eotHeader.resize(sizeof(EOTPrefix));
+ EOTPrefix* prefix = reinterpret_cast<EOTPrefix*>(&eotHeader[0]);
+
+ prefix->fontDataSize = dataLength;
+ prefix->version = 0x00020001;
+ prefix->flags = 0;
+
+ if (dataLength < offsetof(sfntHeader, tables))
+ return false;
+
+ const sfntHeader* sfnt = reinterpret_cast<const sfntHeader*>(data);
+
+ if (dataLength < offsetof(sfntHeader, tables) + sfnt->numTables * sizeof(TableDirectoryEntry))
+ return false;
+
+ bool haveOS2 = false;
+ bool haveHead = false;
+ bool haveName = false;
+
+ const BigEndianUShort* familyName = 0;
+ unsigned short familyNameLength = 0;
+ const BigEndianUShort* subfamilyName = 0;
+ unsigned short subfamilyNameLength = 0;
+ const BigEndianUShort* fullName = 0;
+ unsigned short fullNameLength = 0;
+ const BigEndianUShort* versionString = 0;
+ unsigned short versionStringLength = 0;
+
+ for (unsigned i = 0; i < sfnt->numTables; i++) {
+ unsigned tableOffset = sfnt->tables[i].offset;
+ unsigned tableLength = sfnt->tables[i].length;
+
+ if (dataLength < tableOffset || dataLength < tableLength || dataLength < tableOffset + tableLength)
+ return false;
+
+ unsigned tableTag = sfnt->tables[i].tag;
+ switch (tableTag) {
+ case 'OS/2':
+ {
+ if (dataLength < tableOffset + sizeof(OS2Table))
+ return false;
+
+ haveOS2 = true;
+ const OS2Table* OS2 = reinterpret_cast<const OS2Table*>(data + tableOffset);
+ for (unsigned j = 0; j < 10; j++)
+ prefix->fontPANOSE[j] = OS2->panose[j];
+ prefix->italic = OS2->fsSelection & 0x01;
+ prefix->weight = OS2->weightClass;
+ // FIXME: Should use OS2->fsType, but some TrueType fonts set it to an over-restrictive value.
+ // Since ATS does not enforce this on Mac OS X, we do not enforce it either.
+ prefix->fsType = 0;
+ for (unsigned j = 0; j < 4; j++)
+ prefix->unicodeRange[j] = OS2->unicodeRange[j];
+ for (unsigned j = 0; j < 2; j++)
+ prefix->codePageRange[j] = OS2->codePageRange[j];
+ break;
+ }
+ case 'head':
+ {
+ if (dataLength < tableOffset + sizeof(headTable))
+ return false;
+
+ haveHead = true;
+ const headTable* head = reinterpret_cast<const headTable*>(data + tableOffset);
+ prefix->checkSumAdjustment = head->checkSumAdjustment;
+ break;
+ }
+ case 'name':
+ {
+ if (dataLength < tableOffset + offsetof(nameTable, nameRecords))
+ return false;
+
+ haveName = true;
+ const nameTable* name = reinterpret_cast<const nameTable*>(data + tableOffset);
+ for (int j = 0; j < name->count; j++) {
+ if (dataLength < tableOffset + offsetof(nameTable, nameRecords) + (j + 1) * sizeof(nameRecord))
+ return false;
+ if (name->nameRecords[j].platformID == 3 && name->nameRecords[j].encodingID == 1 && name->nameRecords[j].languageID == 0x0409) {
+ if (dataLength < tableOffset + name->stringOffset + name->nameRecords[j].offset + name->nameRecords[j].length)
+ return false;
+
+ unsigned short nameLength = name->nameRecords[j].length;
+ const BigEndianUShort* nameString = reinterpret_cast<const BigEndianUShort*>(data + tableOffset + name->stringOffset + name->nameRecords[j].offset);
+
+ switch (name->nameRecords[j].nameID) {
+ case 1:
+ familyNameLength = nameLength;
+ familyName = nameString;
+ break;
+ case 2:
+ subfamilyNameLength = nameLength;
+ subfamilyName = nameString;
+ break;
+ case 4:
+ fullNameLength = nameLength;
+ fullName = nameString;
+ break;
+ case 5:
+ versionStringLength = nameLength;
+ versionString = nameString;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ if (haveOS2 && haveHead && haveName)
+ break;
+ }
+
+ prefix->charset = DEFAULT_CHARSET;
+ prefix->magicNumber = 0x504c;
+ prefix->reserved[0] = 0;
+ prefix->reserved[1] = 0;
+ prefix->reserved[2] = 0;
+ prefix->reserved[3] = 0;
+ prefix->padding1 = 0;
+
+ appendBigEndianStringToEOTHeader(eotHeader, familyName, familyNameLength);
+ appendBigEndianStringToEOTHeader(eotHeader, subfamilyName, subfamilyNameLength);
+ appendBigEndianStringToEOTHeader(eotHeader, versionString, versionStringLength);
+
+ // If possible, ensure that the family name is a prefix of the full name.
+ if (fullNameLength >= familyNameLength && memcmp(familyName, fullName, familyNameLength)) {
+ overlaySrc = reinterpret_cast<const char*>(fullName) - data;
+ overlayDst = reinterpret_cast<const char*>(familyName) - data;
+ overlayLength = familyNameLength;
+ }
+
+ appendBigEndianStringToEOTHeader(eotHeader, fullName, fullNameLength);
+
+ unsigned short padding = 0;
+ eotHeader.push_back(padding);
+ eotHeader.push_back(padding);
+
+ prefix = reinterpret_cast<EOTPrefix*>(&eotHeader[0]);
+ prefix->eotSize = eotHeader.size() + fontSize;
+
+ return true;
+}
View
36 support/ttf2eot/OpenTypeUtilities.h
@@ -0,0 +1,36 @@
+/* Modified for use with ttf2eot, originally from WebKit. */
+
+/*
+ * Copyright (C) 2008 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef OpenTypeUtilities_h
+#define OpenTypeUtilities_h
+
+using std::vector;
+
+bool getEOTHeader(unsigned char * fontData, size_t fontSize, vector<uint8_t>& eotHeader, size_t& overlayDst, size_t& overlaySrc, size_t& overlayLength);
+
+
+#endif // OpenTypeUtilities_h
View
35 support/ttf2eot/README
@@ -0,0 +1,35 @@
+Very quick commandline wrapper around OpenTypeUtilities.cpp from Chromium, used
+to make EOT (Embeddable Open Type) files from TTF (TrueType/OpenType Font)
+files. This is the format TTLoadEmbeddedFont() accepts, which is what Internet
+Explorer uses for css @font-face declarations.
+
+I've only tested this on Linux.
+
+EOT was documented by Microsoft here:
+ <http://www.w3.org/Submission/2008/SUBM-EOT-20080305/>
+
+TTLoadEmbeddedFont is described here:
+ <http://msdn.microsoft.com/en-us/library/dd145155(VS.85).aspx>
+
+Chromium:
+ <http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/WebKit/WebCore/platform/graphics/win/OpenTypeUtilities.cpp?view=log&pathrev=7591>
+
+To build:
+
+ $ make
+
+Usage:
+
+ $ ./ttf2eot < input.ttf > output.eot
+
+Author: taviso@sdf.lonestar.org 15-Mar-2009
+License: Derived from WebKit, so BSD/LGPL 2/LGPL 2.1.
+
+Keywords for anyone having as much pain as me finding a utility to do this on Linux:
+
+ covert eot to ttf
+ eot converter
+ wtf is an eot file
+
+
+TODO: MTX support?
View
94 support/ttf2eot/ttf2eot.cpp
@@ -0,0 +1,94 @@
+/* Trivial utility to create EOT files on Linux */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <limits.h>
+#include <string.h>
+
+#include <vector>
+
+#ifndef _MSC_VER
+# include <stdint.h>
+#else
+typedef unsigned char uint8_t;
+#endif
+
+#if defined(_MSC_VER) || defined(__MINGW32__)
+# include <io.h>
+# include <fcntl.h>
+# ifndef _O_BINARY
+# define _O_BINARY 0x8000
+# endif
+# ifndef _O_TEXT
+# define _O_TEXT 0x4000
+# endif
+#endif
+
+#include "OpenTypeUtilities.h"
+
+#ifndef SIZE_MAX
+# define SIZE_MAX UINT_MAX
+#endif
+
+using std::vector;
+
+int main(int argc, char **argv)
+{
+ const size_t kFontInitSize = 8192;
+ vector<uint8_t> eotHeader(512);
+ size_t overlayDst = 0;
+ size_t overlaySrc = 0;
+ size_t overlayLength = 0;
+ size_t fontSize = 0;
+ size_t fontOff = 0;
+ FILE *input;
+ unsigned char *fontData;
+
+#if defined(_MSC_VER) || defined(__MINGW32__)
+ setmode(_fileno(stdin), _O_BINARY);
+ setmode(_fileno(stdout), _O_BINARY);
+ setmode(_fileno(stderr), _O_TEXT);
+#endif
+
+ if (argv[1] == NULL || (argv[1][0] == '-' && argv[1][1] == '\0')) {
+ input = stdin;
+ } else {
+ input = fopen(argv[1], "rb");
+ if (input == NULL) {
+ fprintf(stderr, "could not open input file %s, %m\n", argv[1]);
+ return 1;
+ }
+ }
+
+ if ((fontData = (unsigned char *) malloc(fontSize = kFontInitSize)) == NULL) {
+ fprintf(stderr, "Allocation failure, %m\n");
+ return 1;
+ }
+
+ do {
+ size_t ret = fread(fontData + fontOff, 1, fontSize - fontOff, input);
+ if (ret && fontSize <= SIZE_MAX / 2) {
+ fontOff += ret;
+ if ((fontData = (unsigned char *) realloc(fontData, fontSize *= 2)) == NULL) {
+ fprintf(stderr, "Allocation failure, %m\n");
+ return 1;
+ }
+ } else if (ret) {
+ fprintf(stderr, "Too much data, %m\n");
+ return 1;
+ } else {
+ fontData = (unsigned char *) realloc(fontData, fontSize = fontOff);
+ break;
+ }
+ } while (true);
+
+ if (getEOTHeader(fontData, fontSize, eotHeader, overlayDst, overlaySrc, overlayLength)) {
+ fwrite(&eotHeader[0], eotHeader.size(), 1, stdout);
+ fwrite(fontData, fontSize, 1, stdout);
+ return 0;
+ } else {
+ fprintf(stderr, "unknown error parsing input font, %m\n");
+ return 1;
+ }
+}
View
14 support/ttfautohint/.gitignore
@@ -0,0 +1,14 @@
+/Makefile
+/Makefile.in
+/aclocal.m4
+/autom4te.cache/
+/config.h
+/config.h.in
+/config.log
+/config.lt
+/config.status
+/configure
+/gnulib
+/gnulib/
+/libtool
+/stamp-h1
View
5 support/ttfautohint/AUTHORS
@@ -0,0 +1,5 @@
+Authors of ttfautohint.
+
+ Werner Lemberg <wl@gnu.org>
+
+EOF
View
59 support/ttfautohint/COPYING
@@ -0,0 +1,59 @@
+The ttfautohint library is copyrighted work and cannot be used legally
+without a software license. Since it is largely based on FreeType, the same
+license conditions are used.
+
+In order to make this project usable to a vast majority of developers, the
+ttfautohint library is distributed under two mutually exclusive open-source
+licenses.
+
+This means that *you* must choose *one* of the two licenses described below,
+then obey all its terms and conditions when using the ttfautohint library in
+any of your projects or products.
+
+ - The FreeType License, found in the file `FTL.TXT', which is similar
+ to the original BSD license *with* an advertising clause that forces you
+ to explicitly cite the ttfautohint library in your product's
+ documentation. All details are in the license file. This license is
+ suited to products which don't use the GNU General Public License.
+
+ Note that this license is compatible to the GNU General Public License
+ version 3, but not version 2.
+
+ - The GNU General Public License version 2, found in `GPLv2.TXT' (any later
+ version can be used also), for programs which already use the GPL.
+
+In addition, as a special exception to both the FreeType (FTL) and GNU
+General Public License (GPL), the copyright holder of ttfautohint gives you
+unlimited permission to copy, distribute and modify the bytecode that gets
+embedded in the fonts processed by ttfautohint. You need not follow the
+terms of the FTL or GPL when using or distributing such bytecode, even
+though portions of the text of ttfautohint appear in them. The FTL or GPL
+(depending on your choice) does govern all other use of the material that
+constitutes ttfautohint.
+
+This special exception to the FTL and GPL applies to versions of ttfautohint
+released by the copyright holder of ttfautohint. Note that people who make
+modified versions of ttfautohint are not obligated to grant this special
+exception for their modified versions; it is their choice whether to do so.
+Both the FTL and the GPL give permission to release a modified version
+without this exception; this exception also makes it possible to release a
+modified version which carries forward this exception.
+
+-----------------------------------------------------------------------------
+
+The following files are distributed with the source bundle of the
+ttfautohint library to configure and build the library with GNU tools, but
+which aren't part of it due to a different license (GPL only).
+
+ bootstrap
+ bootstrap.conf
+ m4/ltlize_lang.m4
+
+All files of the following directories are distributed with the source
+bundle of the ttfautohint library to configure and build the library with
+GNU tools, but which aren't part of it due to a different license (GPL
+only).
+
+ gnulib
+
+EOF
View
10 support/ttfautohint/ChangeLog
@@ -0,0 +1,10 @@
+This package doesn't provide a detailed ChangeLog. Instead, please check
+out the git repository of `ttfautohint' and use a program like `gitk' to
+inspect the various commits directly. Alternatively, you might directly go
+to the URL below to view the commits with your web browser.
+
+The URL of the git repository is
+
+ http://repo.or.cz/w/ttfautohint.git
+
+EOF
View
169 support/ttfautohint/FTL.TXT
@@ -0,0 +1,169 @@
+ The FreeType Project LICENSE
+ ----------------------------
+
+ 2006-Jan-27
+
+ Copyright 1996-2002, 2006 by
+ David Turner, Robert Wilhelm, and Werner Lemberg
+
+
+
+Introduction
+============
+
+ The FreeType Project is distributed in several archive packages;
+ some of them may contain, in addition to the FreeType font engine,
+ various tools and contributions which rely on, or relate to, the
+ FreeType Project.
+
+ This license applies to all files found in such packages, and
+ which do not fall under their own explicit license. The license
+ affects thus the FreeType font engine, the test programs,
+ documentation and makefiles, at the very least.
+
+ This license was inspired by the BSD, Artistic, and IJG
+ (Independent JPEG Group) licenses, which all encourage inclusion
+ and use of free software in commercial and freeware products
+ alike. As a consequence, its main points are that:
+
+ o We don't promise that this software works. However, we will be
+ interested in any kind of bug reports. (`as is' distribution)
+
+ o You can use this software for whatever you want, in parts or
+ full form, without having to pay us. (`royalty-free' usage)
+
+ o You may not pretend that you wrote this software. If you use
+ it, or only parts of it, in a program, you must acknowledge
+ somewhere in your documentation that you have used the
+ FreeType code. (`credits')
+
+ We specifically permit and encourage the inclusion of this
+ software, with or without modifications, in commercial products.
+ We disclaim all warranties covering The FreeType Project and
+ assume no liability related to The FreeType Project.
+
+
+ Finally, many people asked us for a preferred form for a
+ credit/disclaimer to use in compliance with this license. We thus
+ encourage you to use the following text:
+
+ """
+ Portions of this software are copyright © <year> The FreeType
+ Project (www.freetype.org). All rights reserved.
+ """
+
+ Please replace <year> with the value from the FreeType version you
+ actually use.
+
+
+Legal Terms
+===========
+
+0. Definitions
+--------------
+
+ Throughout this license, the terms `package', `FreeType Project',
+ and `FreeType archive' refer to the set of files originally
+ distributed by the authors (David Turner, Robert Wilhelm, and
+ Werner Lemberg) as the `FreeType Project', be they named as alpha,
+ beta or final release.
+
+ `You' refers to the licensee, or person using the project, where
+ `using' is a generic term including compiling the project's source
+ code as well as linking it to form a `program' or `executable'.
+ This program is referred to as `a program using the FreeType
+ engine'.
+
+ This license applies to all files distributed in the original
+ FreeType Project, including all source code, binaries and
+ documentation, unless otherwise stated in the file in its
+ original, unmodified form as distributed in the original archive.
+ If you are unsure whether or not a particular file is covered by
+ this license, you must contact us to verify this.
+
+ The FreeType Project is copyright (C) 1996-2000 by David Turner,
+ Robert Wilhelm, and Werner Lemberg. All rights reserved except as
+ specified below.
+
+1. No Warranty
+--------------
+
+ THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
+ BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
+ USE, OF THE FREETYPE PROJECT.
+
+2. Redistribution
+-----------------
+
+ This license grants a worldwide, royalty-free, perpetual and
+ irrevocable right and license to use, execute, perform, compile,
+ display, copy, create derivative works of, distribute and
+ sublicense the FreeType Project (in both source and object code
+ forms) and derivative works thereof for any purpose; and to
+ authorize others to exercise some or all of the rights granted
+ herein, subject to the following conditions:
+
+ o Redistribution of source code must retain this license file
+ (`FTL.TXT') unaltered; any additions, deletions or changes to
+ the original files must be clearly indicated in accompanying
+ documentation. The copyright notices of the unaltered,
+ original files must be preserved in all copies of source
+ files.
+
+ o Redistribution in binary form must provide a disclaimer that
+ states that the software is based in part of the work of the
+ FreeType Team, in the distribution documentation. We also
+ encourage you to put an URL to the FreeType web page in your
+ documentation, though this isn't mandatory.
+
+ These conditions apply to any software derived from or based on
+ the FreeType Project, not just the unmodified files. If you use
+ our work, you must acknowledge us. However, no fee need be paid
+ to us.
+
+3. Advertising
+--------------
+
+ Neither the FreeType authors and contributors nor you shall use
+ the name of the other for commercial, advertising, or promotional
+ purposes without specific prior written permission.
+
+ We suggest, but do not require, that you use one or more of the
+ following phrases to refer to this software in your documentation
+ or advertising materials: `FreeType Project', `FreeType Engine',
+ `FreeType library', or `FreeType Distribution'.
+
+ As you have not signed this license, you are not required to
+ accept it. However, as the FreeType Project is copyrighted
+ material, only this license, or another one contracted with the
+ authors, grants you the right to use, distribute, and modify it.
+ Therefore, by using, distributing, or modifying the FreeType
+ Project, you indicate that you understand and accept all the terms
+ of this license.
+
+4. Contacts
+-----------
+
+ There are two mailing lists related to FreeType:
+
+ o freetype@nongnu.org
+
+ Discusses general use and applications of FreeType, as well as
+ future and wanted additions to the library and distribution.
+ If you are looking for support, start in this list if you
+ haven't found anything to help you in the documentation.
+
+ o freetype-devel@nongnu.org
+
+ Discusses bugs, as well as engine internals, design issues,
+ specific licenses, porting, etc.
+
+ Our home page can be found at
+
+ http://www.freetype.org
+
+
+--- end of FTL.TXT ---
View
340 support/ttfautohint/GPLv2.TXT
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
View
365 support/ttfautohint/INSTALL
@@ -0,0 +1,365 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'. This
+is known as a "VPATH" build.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
+
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
View
18 support/ttfautohint/Makefile.am
@@ -0,0 +1,18 @@
+## Makefile.am
+
+# due to a limitation of `autoreconf',
+# all -I directives currently must be set on a single line
+ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4
+
+SUBDIRS = gnulib/src \
+ lib \
+ frontend
+EXTRA_DIST = bootstrap \
+ bootstrap.conf \
+ FTL.TXT \
+ GPLv2.TXT \
+ README \
+ TODO \
+ gnulib/m4/gnulib-cache.m4
+
+## end of Makefile.am
View
70 support/ttfautohint/NEWS
@@ -0,0 +1,70 @@
+New in 0.8:
+
+* Implement option `-x' to increase the x height of the font for small PPEM
+ values by rounding up far more often then rounding down.
+
+* Add option `-G N' to switch off hinting completely above value N.
+
+* ttfautohint now appends version information and the used parameters to the
+ `Version' field(s) in the `name' table. This can be suppressed with
+ option `-n'.
+
+
+New in 0.7:
+
+* A GUI has been added, using the Qt framework. The binary is called
+ `ttfautohintGUI'.
+
+
+New in 0.6.1:
+
+* The improved handling of composite glyphs in 0.6 was buggy under certain
+ circumstances, making ttfautohint crash and FontValidator complain.
+
+* Dropout handling has been activated.
+
+
+New in 0.6:
+
+* Improved handling of composite glyphs.
+
+* Implement option `-p' to pre-hint glyphs with original hints before
+ conversion takes place.
+
+* Don't add a DSIG table if there is none in the input font.
+
+* Human-readable error messages instead of hexadecimal error codes.
+
+* Better tests (both at runtime and compile time) to reject too old FreeType
+ versions.
+
+
+New in 0.5:
+
+* Rendering on iOS is now expected to give good results.
+
+* No bad rendering at very large PPEM values.
+
+
+New in 0.4:
+
+* The bytecode has been changed to `create' twilight points. This should
+ avoid rendering artifacts on some platforms.
+
+
+New in 0.3:
+
+* Fix font generation; sometimes the `glyf' table was one byte too short,
+ making the font invalid.
+
+
+New in 0.2:
+
+* Fix bytecode bugs which prevented correct rendering on some platforms.
+
+
+New in 0.1:
+
+* First release.
+
+EOF
View
44 support/ttfautohint/README
@@ -0,0 +1,44 @@
+ttfautohint 0.8
+---------------
+
+by Werner Lemberg <wl@gnu.org>
+
+
+This project provides a library which takes a TrueType font as the input,
+remove its bytecode instructions (if any), and return a new font where all
+glyphs are bytecode hinted using the information given by FreeType's
+autohinting module. The idea is to provide the excellent quality of the
+autohinter on platforms which don't use FreeType.
+
+The library has a single API function, `TTF_autohint'; see
+`lib/ttfautohint.h' for a detailed description. Note that the library
+itself won't get installed currently.
+
+A command-line interface to the library is the `ttfautohint' program; after
+compilation and installation, say
+
+ ttfautohint --help
+
+for usage information, or say
+
+ man ttfautohint
+
+to read its manual page.
+
+A GUI to the library is `ttfautohintGUI'; it uses the Qt4 framework. The
+compilation of this application can be disabled with the `--without-qt'
+configuration option.
+
+-----------------------------------------------------------------------------
+
+Copyright (C) 2011-2012 by Werner Lemberg.
+
+This file is part of the ttfautohint library, and may only be used,
+modified, and distributed under the terms given in `COPYING'. By
+continuing to use, modify, or distribute this file you indicate that you
+have read `COPYING' and understand and accept it fully.
+
+The file `COPYING' mentioned in the previous paragraph is distributed
+with the ttfautohint library.
+
+EOF
View
29 support/ttfautohint/THANKS
@@ -0,0 +1,29 @@
+The ttfautohint library has been written by Werner Lemberg <wl@gnu.org>.
+
+It is largely based on the FreeType autohinting module, written by David
+Turner <david@freetype.org>.
+
+
+Special thanks to Dave Crossland <dave@understandingfonts.com> for proposing
+the original idea, and to Raph Levien <http://raph.levien.com> and the
+Google Web Fonts team <www.google.com/webfonts> for providing financial
+support to initiate the project.
+
+Thanks also to FontLab, Google (again) and all the other people who
+contributed to the campaign at Pledgie <http://pledgie.com/campaigns/15816>
+for continuing the financial support.
+
+
+The following people have provided help in developing and testing the
+library:
+
+Dave Arnold <darnold@adobe.com>
+Vernon Adams <vern@newtypography.co.uk>
+James Cloos <cloos@jhcloos.com>
+Greg Hitchcock <gregh@microsoft.com>
+Khaled Hosny <khaledhosny@eglug.org>
+Daniel Johnson <il.basso.buffo@gmail.com>
+David Lemon <lemon@adobe.com>
+Adam Twardoch <adam@fontlab.com>
+
+EOF
View
104 support/ttfautohint/TODO
@@ -0,0 +1,104 @@
+
+important improvements
+----------------------
+
+try to reduce size of hints
+ -> handling strong points separately
+ -> `compress' data
+ -> more subroutines to avoid flags
+
+add features to the GUI
+ -> direct control over `actions'
+ -> preview similar to ftgrid
+
+improve handling of GDI ClearType by snapping to the pixel grid (this is,
+ integer coordinates of horizontal segments)
+
+handle OT features
+ -> use HarfBuzz?
+
+control `gasp' table; Adam Twardoch suggest the following:
+
+ 1. Calculate "gaspstem", i.e. the most common thickness of horizontal
+ stems (y direction distances) for lowercase Latin letters.
+ 2. If gaspstem <= 0.03 * upm, apply gasp symmetric smoothing across the
+ entire range (rangeMaxPPEM 0xFFFF, value 15)
+ 3. Else, calculate gaspthreshold as follows:
+ ceil(1.33 * upm / gaspstem) - 1
+ 4. Apply no symmetric smoothing up to the gaspthreshold ppem (rangeMaxPPEM
+ gaspthreshold, value 7), and apply symmetric smoothing above.
+
+ In addition, ttfautohint should provide a commandline parameter that
+ allows the user to override the automatic logic. If that parameter = 0,
+ then gasp value 15 should be applied across the entire range. If the
+ parameter > 0, then up to that parameter value the gasp value 7 should be
+ applied, and gasp value 15 should be applied above.
+
+control activation threshold of blue zone widths
+
+control the width of blue zones
+
+handle normal and bold fonts differently; cf. Infinality patches;
+ this should help avoid filling of bowls (like in `e') for bold shapes.
+
+control the minimum stem width
+
+try to `embolden' fonts at small sizes to avoid drop-outs; cf. Infinality
+ patches
+
+implement `x-height-snapping-exceptions'
+
+improve `pre-hinting' by making the used PPEM value configurable
+
+allow hinting of single glyphs, using a config file which holds the global
+ settings
+
+better handling of `incomplete' fonts (this is, fonts which lack the minimum
+ set of glyphs necessary to determine the blue zones)
+
+
+minor improvements
+------------------
+
+correctly set `lowestRecPPEM' field in `head'
+
+control dropout mode
+
+apply hinting in x direction also?
+ -> warper: shifting with and without scaling
+ -> `standard' autofit hinting
+
+add a config and/or command file for batch handling
+
+warn against overwrite of output file?
+
+reduce output size of option -p:
+ 1. compare outline rendered at EM value with unhinted outline
+ 2. pre-hint only if 1. differs more than given threshold (default 0.5%?)
+
+make it possible to hint fonts which aren't alphabetic at all, for example,
+ icons; to do so, provide means to skip the global feature analysis
+
+
+later enhancements
+------------------
+
+add CJK autohinting module
+add Hebrew autohinting module
+
+instead of emitting bytecode, write the hints as a VTT or FontLab script
+
+Windows/Mac installer
+
+
+various
+-------
+
+testing with Windows and Apple font checkers
+
+man page for ttfautohint library
+
+install library
+
+
+EOF
View
883 support/ttfautohint/bootstrap
@@ -0,0 +1,883 @@
+#! /bin/sh
+# Print a version string.
+scriptversion=2012-01-06.07; # UTC
+
+# Bootstrap this package from checked-out sources.
+
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Originally written by Paul Eggert. The canonical version of this
+# script is maintained as build-aux/bootstrap in gnulib, however, to
+# be useful to your project, you should place a copy of it under
+# version control in the top-level directory of your project. The
+# intent is that all customization can be done with a bootstrap.conf
+# file also maintained in your version control; gnulib comes with a
+# template build-aux/bootstrap.conf to get you started.
+
+# Please report bugs or propose patches to bug-gnulib@gnu.org.
+
+nl='
+'
+
+# Ensure file names are sorted consistently across platforms.
+LC_ALL=C
+export LC_ALL
+
+local_gl_dir=gl
+
+me=$0
+
+usage() {
+ cat <<EOF
+Usage: $me [OPTION]...
+Bootstrap this package from the checked-out sources.
+
+Options:
+ --gnulib-srcdir=DIRNAME specify the local directory where gnulib
+ sources reside. Use this if you already
+ have gnulib sources on your machine, and
+ do not want to waste your bandwidth downloading
+ them again. Defaults to \$GNULIB_SRCDIR
+ --bootstrap-sync if this bootstrap script is not identical to
+ the version in the local gnulib sources,
+ update this script, and then restart it with
+ /bin/sh or the shell \$CONFIG_SHELL
+ --no-bootstrap-sync do not check whether bootstrap is out of sync
+ --copy copy files instead of creating symbolic links
+ --force attempt to bootstrap even if the sources seem
+ not to have been checked out
+ --no-git do not use git to update gnulib. Requires that
+ --gnulib-srcdir point to a correct gnulib snapshot
+ --skip-po do not download po files
+
+If the file $me.conf exists in the same directory as this script, its
+contents are read as shell variables to configure the bootstrap.
+
+For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
+are honored.
+
+Running without arguments will suffice in most cases.
+EOF
+}
+
+# Configuration.
+
+# Name of the Makefile.am
+gnulib_mk=gnulib.mk
+
+# List of gnulib modules needed.
+gnulib_modules=
+
+# Any gnulib files needed that are not in modules.
+gnulib_files=
+
+: ${AUTOPOINT=autopoint}
+: ${AUTORECONF=autoreconf}
+
+# A function to be called to edit gnulib.mk right after it's created.
+# Override it via your own definition in bootstrap.conf.
+gnulib_mk_hook() { :; }
+
+# A function to be called after everything else in this script.
+# Override it via your own definition in bootstrap.conf.
+bootstrap_epilogue() { :; }
+
+# The command to download all .po files for a specified domain into
+# a specified directory. Fill in the first %s is the domain name, and
+# the second with the destination directory. Use rsync's -L and -r
+# options because the latest/%s directory and the .po files within are
+# all symlinks.
+po_download_command_format=\
+"rsync --delete --exclude '*.s1' -Lrtvz \
+ 'translationproject.org::tp/latest/%s/' '%s'"
+
+# Fallback for downloading .po files (if rsync fails).
+po_download_command_format2=\
+"wget --mirror -nd -q -np -A.po -P '%s' \
+ http://translationproject.org/latest/%s/"
+
+extract_package_name='
+ /^AC_INIT(/{
+ /.*,.*,.*, */{
+ s///
+ s/[][]//g
+ s/)$//
+ p
+ q
+ }
+ s/AC_INIT(\[*//
+ s/]*,.*//
+ s/^GNU //
+ y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ s/[^A-Za-z0-9_]/-/g
+ p
+ }
+'
+package=`sed -n "$extract_package_name" configure.ac` || exit
+gnulib_name=lib$package
+
+build_aux=build-aux
+source_base=lib
+m4_base=m4
+doc_base=doc
+tests_base=tests
+gnulib_extra_files=''
+
+# Additional gnulib-tool options to use. Use "\newline" to break lines.
+gnulib_tool_option_extras=
+
+# Other locale categories that need message catalogs.
+EXTRA_LOCALE_CATEGORIES=
+
+# Additional xgettext options to use. Use "\\\newline" to break lines.
+XGETTEXT_OPTIONS='\\\
+ --flag=_:1:pass-c-format\\\
+ --flag=N_:1:pass-c-format\\\
+ --flag=error:3:c-format --flag=error_at_line:5:c-format\\\
+'
+
+# Package bug report address and copyright holder for gettext files
+COPYRIGHT_HOLDER='Free Software Foundation, Inc.'
+MSGID_BUGS_ADDRESS=bug-$package@gnu.org
+
+# Files we don't want to import.
+excluded_files=
+
+# File that should exist in the top directory of a checked out hierarchy,
+# but not in a distribution tarball.
+checkout_only_file=README-hacking
+
+# Whether to use copies instead of symlinks.
+copy=false
+
+# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want
+# those files to be generated in directories like lib/, m4/, and po/.
+# Or set it to 'auto' to make this script select which to use based
+# on which version control system (if any) is used in the source directory.
+vc_ignore=auto
+
+# Set this to true in bootstrap.conf to enable --bootstrap-sync by
+# default.
+bootstrap_sync=false
+
+# Use git to update gnulib sources
+use_git=true
+
+# find_tool ENVVAR NAMES...
+# -------------------------
+# Search for a required program. Use the value of ENVVAR, if set,
+# otherwise find the first of the NAMES that can be run (i.e.,
+# supports --version). If found, set ENVVAR to the program name,
+# die otherwise.
+find_tool ()
+{
+ find_tool_envvar=$1
+ shift
+ find_tool_names=$@
+ eval "find_tool_res=\$$find_tool_envvar"
+ if test x"$find_tool_res" = x; then
+ for i
+ do
+ if ($i --version </dev/null) >/dev/null 2>&1; then
+ find_tool_res=$i
+ break
+ fi
+ done
+ else
+ find_tool_error_prefix="\$$find_tool_envvar: "
+ fi
+ if test x"$find_tool_res" = x; then
+ echo >&2 "$me: one of these is required: $find_tool_names"
+ exit 1
+ fi
+ ($find_tool_res --version </dev/null) >/dev/null 2>&1 || {
+ echo >&2 "$me: ${find_tool_error_prefix}cannot run $find_tool_res --version"
+ exit 1
+ }
+ eval "$find_tool_envvar=\$find_tool_res"
+ eval "export $find_tool_envvar"
+}
+
+# Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6.
+find_tool SHA1SUM sha1sum gsha1sum shasum
+
+# Override the default configuration, if necessary.
+# Make sure that bootstrap.conf is sourced from the current directory
+# if we were invoked as "sh bootstrap".
+case "$0" in
+ */*) test -r "$0.conf" && . "$0.conf" ;;
+ *) test -r "$0.conf" && . ./"$0.conf" ;;
+esac
+
+# Extra files from gnulib, which override files from other sources.
+test -z "${gnulib_extra_files}" && \
+ gnulib_extra_files="
+ $build_aux/install-sh
+ $build_aux/missing
+ $build_aux/mdate-sh
+ $build_aux/texinfo.tex
+ $build_aux/depcomp
+ $build_aux/config.guess
+ $build_aux/config.sub
+ doc/INSTALL
+"
+
+if test "$vc_ignore" = auto; then
+ vc_ignore=
+ test -d .git && vc_ignore=.gitignore
+ test -d CVS && vc_ignore="$vc_ignore .cvsignore"
+fi
+
+# Translate configuration into internal form.
+
+# Parse options.
+
+for option
+do
+ case $option in
+ --help)
+ usage
+ exit;;
+ --gnulib-srcdir=*)
+ GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=\(.*\)'`;;
+ --skip-po)
+ SKIP_PO=t;;
+ --force)
+ checkout_only_file=;;
+ --copy)
+ copy=true;;
+ --bootstrap-sync)
+ bootstrap_sync=true;;
+ --no-bootstrap-sync)
+ bootstrap_sync=false;;
+ --no-git)
+ use_git=false;;
+ *)
+ echo >&2 "$0: $option: unknown option"
+ exit 1;;
+ esac
+done
+
+if $use_git || test -d "$GNULIB_SRCDIR"; then
+ :
+else
+ echo "$0: Error: --no-git requires --gnulib-srcdir" >&2
+ exit 1
+fi
+
+if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
+ echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2
+ exit 1
+fi
+
+# Ensure that lines starting with ! sort last, per gitignore conventions
+# for whitelisting exceptions after a more generic blacklist pattern.
+sort_patterns() {
+ sort -u "$@" | sed '/^!/ {
+ H
+ d
+ }
+ $ {
+ P
+ x
+ s/^\n//
+ }' | sed '/^$/d'
+}
+
+# If $STR is not already on a line by itself in $FILE, insert it,
+# sorting the new contents of the file and replacing $FILE with the result.
+insert_sorted_if_absent() {
+ file=$1
+ str=$2
+ test -f $file || touch $file
+ echo "$str" | sort_patterns - $file | cmp - $file > /dev/null \
+ || { echo "$str" | sort_patterns - $file > $file.bak \
+ && mv $file.bak $file; } \
+ || exit 1
+}
+
+# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
+# insert_sorted_if_absent.
+insert_vc_ignore() {
+ vc_ignore_file="$1"
+ pattern="$2"
+ case $vc_ignore_file in
+ *.gitignore)
+ # A .gitignore entry that does not start with '/' applies
+ # recursively to subdirectories, so prepend '/' to every
+ # .gitignore entry.
+ pattern=`echo "$pattern" | sed s,^,/,`;;
+ esac
+ insert_sorted_if_absent "$vc_ignore_file" "$pattern"
+}
+
+# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
+found_aux_dir=no
+grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
+ >/dev/null && found_aux_dir=yes
+grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
+ >/dev/null && found_aux_dir=yes
+if test $found_aux_dir = no; then
+ echo "$0: expected line not found in configure.ac. Add the following:" >&2
+ echo " AC_CONFIG_AUX_DIR([$build_aux])" >&2
+ exit 1
+fi
+
+# If $build_aux doesn't exist, create it now, otherwise some bits
+# below will malfunction. If creating it, also mark it as ignored.
+if test ! -d $build_aux; then
+ mkdir $build_aux
+ for dot_ig in x $vc_ignore; do
+ test $dot_ig = x && continue
+ insert_vc_ignore $dot_ig $build_aux
+ done
+fi
+
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+sort_ver() { # sort -V is not generally available
+ ver1="$1"
+ ver2="$2"
+
+ # split on '.' and compare each component
+ i=1
+ while : ; do
+ p1=$(echo "$ver1" | cut -d. -f$i)
+ p2=$(echo "$ver2" | cut -d. -f$i)
+ if [ ! "$p1" ]; then
+ echo "$1 $2"
+ break
+ elif [ ! "$p2" ]; then
+ echo "$2 $1"
+ break
+ elif [ ! "$p1" = "$p2" ]; then
+ if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison
+ echo "$2 $1"
+ elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison
+ echo "$1 $2"
+ else # numeric, then lexicographic comparison
+ lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1)
+ if [ "$lp" = "$p2" ]; then
+ echo "$1 $2"
+ else
+ echo "$2 $1"
+ fi
+ fi
+ break
+ fi
+ i=$(($i+1))
+ done
+}
+
+get_version() {
+ app=$1
+
+ $app --version >/dev/null 2>&1 || return 1
+
+ $app --version 2>&1 |
+ sed -n '# Move version to start of line.
+ s/.*[v ]\([0-9]\)/\1/
+
+ # Skip lines that do not start with version.
+ /^[0-9]/!d
+
+ # Remove characters after the version.
+ s/[^.a-z0-9-].*//
+
+ # The first component must be digits only.
+ s/^\([0-9]*\)[a-z-].*/\1/
+
+ #the following essentially does s/5.005/5.5/
+ s/\.0*\([1-9]\)/.\1/g
+ p
+ q'
+}
+
+check_versions() {
+ ret=0
+
+ while read app req_ver; do
+ # We only need libtoolize from the libtool package.
+ if test "$app" = libtool; then
+ app=libtoolize
+ fi
+ # Exempt git if --no-git is in effect.
+ if test "$app" = git; then
+ $use_git || continue
+ fi
+ # Honor $APP variables ($TAR, $AUTOCONF, etc.)
+ appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
+ test "$appvar" = TAR && appvar=AMTAR
+ case $appvar in
+ GZIP) ;; # Do not use $GZIP: it contains gzip options.
+ *) eval "app=\${$appvar-$app}" ;;
+ esac
+ if [ "$req_ver" = "-" ]; then
+ # Merely require app to exist; not all prereq apps are well-behaved
+ # so we have to rely on $? rather than get_version.
+ $app --version >/dev/null 2>&1
+ if [ 126 -le $? ]; then
+ echo "$me: Error: '$app' not found" >&2
+ ret=1
+ fi
+ else
+ # Require app to produce a new enough version string.
+ inst_ver=$(get_version $app)
+ if [ ! "$inst_ver" ]; then
+ echo "$me: Error: '$app' not found" >&2
+ ret=1
+ else
+ latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
+ if [ ! "$latest_ver" = "$inst_ver" ]; then
+ echo "$me: Error: '$app' version == $inst_ver is too old" >&2
+ echo " '$app' version >= $req_ver is required" >&2
+ ret=1
+ fi
+ fi
+ fi
+ done
+
+ return $ret
+}
+
+print_versions() {
+ echo "Program Min_version"
+ echo "----------------------"
+ printf %s "$buildreq"
+ echo "----------------------"
+ # can't depend on column -t
+}
+
+use_libtool=0
+# We'd like to use grep -E, to see if any of LT_INIT,
+# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
+# but that's not portable enough (e.g., for Solaris).
+grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
+ && use_libtool=1
+grep '^[ ]*LT_INIT' configure.ac >/dev/null \
+ && use_libtool=1
+if test $use_libtool = 1; then
+ find_tool LIBTOOLIZE glibtoolize libtoolize
+fi
+
+# gnulib-tool requires at least automake and autoconf.
+# If either is not listed, add it (with minimum version) as a prerequisite.
+case $buildreq in
+ *automake*) ;;
+ *) buildreq="automake 1.9
+$buildreq" ;;
+esac
+case $buildreq in
+ *autoconf*) ;;
+ *) buildreq="autoconf 2.59
+$buildreq" ;;
+esac
+
+# When we can deduce that gnulib-tool will require patch,
+# and when patch is not already listed as a prerequisite, add it, too.
+if test ! -d "$local_gl_dir" \
+ || find "$local_gl_dir" -name '*.diff' -exec false {} +; then
+ :
+else
+ case $buildreq in
+ *patch*) ;;
+ *) buildreq="patch -
+$buildreq" ;;
+ esac
+fi
+
+if ! printf "$buildreq" | check_versions; then
+ echo >&2
+ if test -f README-prereq; then
+ echo "$0: See README-prereq for how to get the prerequisite programs" >&2
+ else
+ echo "$0: Please install the prerequisite programs" >&2
+ fi
+ exit 1
+fi
+
+echo "$0: Bootstrapping from checked-out $package sources..."
+
+# See if we can use gnulib's git-merge-changelog merge driver.
+if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
+ if git config merge.merge-changelog.driver >/dev/null ; then
+ :
+ elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then
+ echo "$0: initializing git-merge-changelog driver"
+ git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
+ git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
+ else
+ echo "$0: consider installing git-merge-changelog from gnulib"
+ fi
+fi
+
+
+cleanup_gnulib() {
+ status=$?
+ rm -fr "$gnulib_path"
+ exit $status
+}
+
+git_modules_config () {
+ test -f .gitmodules && git config --file .gitmodules "$@"
+}
+
+gnulib_path=`git_modules_config submodule..gnulib.path`
+test -z "$gnulib_path" && gnulib_path=gnulib
+
+# Get gnulib files.
+
+case ${GNULIB_SRCDIR--} in
+-)
+ if git_modules_config submodule..gnulib.url >/dev/null; then
+ echo "$0: getting gnulib files..."
+ git submodule init || exit $?
+ git submodule update || exit $?
+
+ elif [ ! -d "$gnulib_path" ]; then
+ echo "$0: getting gnulib files..."
+
+ trap cleanup_gnulib 1 2 13 15
+
+ shallow=
+ git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
+ git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
+ cleanup_gnulib
+
+ trap - 1 2 13 15
+ fi
+ GNULIB_SRCDIR=$gnulib_path
+ ;;
+*)
+ # Use GNULIB_SRCDIR as a reference.
+ if test -d "$GNULIB_SRCDIR"/.git && \
+ git_modules_config submodule..gnulib.url >/dev/null; then
+ echo "$0: getting gnulib files..."
+ if git submodule -h|grep -- --reference > /dev/null; then
+ # Prefer the one-liner available in git 1.6.4 or newer.
+ git submodule update --init --reference "$GNULIB_SRCDIR" \
+ "$gnulib_path" || exit $?
+ else
+ # This fallback allows at least git 1.5.5.
+ if test -f "$gnulib_path"/gnulib-tool; then
+ # Since file already exists, assume submodule init already complete.
+ git submodule update || exit $?
+ else
+ # Older git can't clone into an empty directory.
+ rmdir "$gnulib_path" 2>/dev/null
+ git clone --reference "$GNULIB_SRCDIR" \
+ "$(git_modules_config submodule..gnulib.url)" "$gnulib_path" \
+ && git submodule init && git submodule update \
+ || exit $?
+ fi
+ fi
+ GNULIB_SRCDIR=$gnulib_path
+ fi
+ ;;
+esac
+
+if $bootstrap_sync; then
+ cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
+ echo "$0: updating bootstrap and restarting..."
+ exec sh -c \
+ 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
+ -- "$GNULIB_SRCDIR/build-aux/bootstrap" \
+ "$0" "$@" --no-bootstrap-sync
+ }
+fi
+
+gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
+<$gnulib_tool || exit
+
+# Get translations.
+
+download_po_files() {
+ subdir=$1
+ domain=$2
+ echo "$me: getting translations into $subdir for $domain..."
+ cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
+ eval "$cmd" && return
+ # Fallback to HTTP.
+ cmd=`printf "$po_download_command_format2" "$subdir" "$domain"`
+ eval "$cmd"
+}
+
+# Mirror .po files to $po_dir/.reference and copy only the new
+# or modified ones into $po_dir. Also update $po_dir/LINGUAS.
+# Note po files that exist locally only are left in $po_dir but will
+# not be included in LINGUAS and hence will not be distributed.
+update_po_files() {
+ # Directory containing primary .po files.
+ # Overwrite them only when we're sure a .po file is new.
+ po_dir=$1
+ domain=$2
+
+ # Mirror *.po files into this dir.
+ # Usually contains *.s1 checksum files.
+ ref_po_dir="$po_dir/.reference"
+
+ test -d $ref_po_dir || mkdir $ref_po_dir || return
+ download_po_files $ref_po_dir $domain \
+ && ls "$ref_po_dir"/*.po 2>/dev/null |
+ sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return
+
+ langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
+ test "$langs" = '*' && langs=x
+ for po in $langs; do
+ case $po in x) continue;; esac
+ new_po="$ref_po_dir/$po.po"
+ cksum_file="$ref_po_dir/$po.s1"
+ if ! test -f "$cksum_file" ||
+ ! test -f "$po_dir/$po.po" ||
+ ! $SHA1SUM -c --status "$cksum_file" \
+ < "$new_po" > /dev/null; then
+ echo "$me: updated $po_dir/$po.po..."
+ cp "$new_po" "$po_dir/$po.po" \
+ && $SHA1SUM < "$new_po" > "$cksum_file"
+ fi
+ done
+}
+
+case $SKIP_PO in
+'')
+ if test -d po; then
+ update_po_files po $package || exit
+ fi
+
+ if test -d runtime-po; then
+ update_po_files runtime-po $package-runtime || exit
+ fi;;
+esac
+
+symlink_to_dir()
+{