diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-04-27 08:55:29 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-04-27 08:55:29 +0000 |
commit | 8f99fe933d73e2b309e130ddcc3c8111145ba407 (patch) | |
tree | bcf754070198a05580a080c2606608ee5745c096 | |
parent | 60d6c6efe18d17d75800fffdf7fe2fec2a1d2ec5 (diff) |
lcdf-typetools 2.83
git-svn-id: svn://tug.org/texlive/trunk@18026 c570f23f-e606-0410-a88d-b1316a301751
129 files changed, 1356 insertions, 878 deletions
diff --git a/Build/source/texk/README b/Build/source/texk/README index 4b8091fde40..784b8b2c113 100644 --- a/Build/source/texk/README +++ b/Build/source/texk/README @@ -68,9 +68,9 @@ kpathsea - maintained here by Karl Berry, Akira Kakuto, ... lacheck - ? -lcdf-typetools - checked 15jun09 +lcdf-typetools - checked 26apr10 http://www.lcdf.org/type/ - http://www.lcdf.org/type/lcdf-typetools-2.79.tar.gz + http://www.lcdf.org/type/lcdf-typetools-2.83.tar.gz makeindexk - maintained here, by us diff --git a/Build/source/texk/lcdf-typetools/Makefile.am b/Build/source/texk/lcdf-typetools/Makefile.am index 83276915dc3..4f814240e17 100644 --- a/Build/source/texk/lcdf-typetools/Makefile.am +++ b/Build/source/texk/lcdf-typetools/Makefile.am @@ -3,7 +3,7 @@ ACLOCAL_AMFLAGS = -I ../../m4 -I m4 DISTCHECK_CONFIGURE_FLAGS = --without-kpathsea -SUBDIRS = . $(SELECTED_SUBDIRS) +SUBDIRS = . liblcdf libefont @SELECTED_SUBDIRS@ DIST_SUBDIRS = liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 all-local: config.force @@ -89,22 +89,17 @@ libefont: liblcdf cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42: liblcdf libefont cd $@ && $(MAKE) -srclinks: - cd liblcdf && $(MAKE) srclinks - cd libefont && $(MAKE) srclinks - versionize: perl -pi -e 's/^\.ds V.*/.ds V $(VERSION)/;' $(top_srcdir)/cfftot1/cfftot1.1 $(top_srcdir)/mmafm/mmafm.1 $(top_srcdir)/mmpfb/mmpfb.1 $(top_srcdir)/otfinfo/otfinfo.1 $(top_srcdir)/otftotfm/otftotfm.1 $(top_srcdir)/t1dotlessj/t1dotlessj.1 $(top_srcdir)/t1lint/t1lint.1 $(top_srcdir)/t1reencode/t1reencode.1 $(top_srcdir)/t1testpage/t1testpage.1 $(top_srcdir)/ttftotype42/ttftotype42.1 perl -pi -e 's/^(\U$(PACKAGE)\E) [\d.ab]+$$/$$1 $(VERSION)/;' $(top_srcdir)/README perl -pi -e 's/^Version: [\d.ab]+$$/Version: $(VERSION)/;' $(top_srcdir)/lcdf-typetools.spec -.PHONY: srclinks rpm liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 +.PHONY: rpm liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 ## Changes for TeX Live ## -EXTRA_DIST += ChangeLog.TL +EXTRA_DIST += lcdf-typetools-$(LCDF_TYPETOOLS_VERSION)-PATCHES ## Original files from lcdf-typetools distribution ## EXTRA_DIST += Makefile.am.orig configure.ac.orig - diff --git a/Build/source/texk/lcdf-typetools/Makefile.am.orig b/Build/source/texk/lcdf-typetools/Makefile.am.orig index 8f584119f76..09cb8c34eb4 100644 --- a/Build/source/texk/lcdf-typetools/Makefile.am.orig +++ b/Build/source/texk/lcdf-typetools/Makefile.am.orig @@ -14,6 +14,7 @@ EXTRA_DIST = \ include/lcdf/error.hh \ include/lcdf/filename.hh \ include/lcdf/globmatch.hh \ + include/lcdf/hashcode.hh \ include/lcdf/hashmap.hh include/lcdf/hashmap.cc \ include/lcdf/inttypes.h \ include/lcdf/landmark.hh \ @@ -55,6 +56,7 @@ EXTRA_DIST = \ include/efont/t1unparser.hh \ include/efont/ttfcs.hh \ include/efont/ttfhead.hh \ + include/efont/ttfkern.hh \ glyphlist.txt \ texglyphlist.txt \ 7t.enc @@ -65,13 +67,9 @@ libefont: liblcdf cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42: liblcdf libefont cd $@ && $(MAKE) -srclinks: - cd liblcdf && $(MAKE) srclinks - cd libefont && $(MAKE) srclinks - versionize: perl -pi -e 's/^\.ds V.*/.ds V $(VERSION)/;' $(top_srcdir)/cfftot1/cfftot1.1 $(top_srcdir)/mmafm/mmafm.1 $(top_srcdir)/mmpfb/mmpfb.1 $(top_srcdir)/otfinfo/otfinfo.1 $(top_srcdir)/otftotfm/otftotfm.1 $(top_srcdir)/t1dotlessj/t1dotlessj.1 $(top_srcdir)/t1lint/t1lint.1 $(top_srcdir)/t1reencode/t1reencode.1 $(top_srcdir)/t1testpage/t1testpage.1 $(top_srcdir)/ttftotype42/ttftotype42.1 perl -pi -e 's/^(\U$(PACKAGE)\E) [\d.ab]+$$/$$1 $(VERSION)/;' $(top_srcdir)/README perl -pi -e 's/^Version: [\d.ab]+$$/Version: $(VERSION)/;' $(top_srcdir)/lcdf-typetools.spec -.PHONY: srclinks rpm liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 +.PHONY: rpm liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 diff --git a/Build/source/texk/lcdf-typetools/Makefile.in b/Build/source/texk/lcdf-typetools/Makefile.in index 493398dc7fa..1d3711062f5 100644 --- a/Build/source/texk/lcdf-typetools/Makefile.in +++ b/Build/source/texk/lcdf-typetools/Makefile.in @@ -183,6 +183,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -273,7 +274,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I ../../m4 -I m4 DISTCHECK_CONFIGURE_FLAGS = --without-kpathsea -SUBDIRS = . $(SELECTED_SUBDIRS) +SUBDIRS = . liblcdf libefont @SELECTED_SUBDIRS@ DIST_SUBDIRS = liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 DISTCLEANFILES = config.force @texlive_build_TRUE@glyphlistdir = ${prefix}/texmf-dist/fonts/map/glyphlist @@ -307,7 +308,8 @@ EXTRA_DIST = ONEWS lcdf-typetools.spec include/lcdf/bezier.hh \ include/efont/t1rw.hh include/efont/t1unparser.hh \ include/efont/ttfcs.hh include/efont/ttfhead.hh \ include/efont/ttfkern.hh glyphlist.txt texglyphlist.txt 7t.enc \ - ChangeLog.TL Makefile.am.orig configure.ac.orig + lcdf-typetools-$(LCDF_TYPETOOLS_VERSION)-PATCHES \ + Makefile.am.orig configure.ac.orig all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -890,16 +892,12 @@ libefont: liblcdf cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42: liblcdf libefont cd $@ && $(MAKE) -srclinks: - cd liblcdf && $(MAKE) srclinks - cd libefont && $(MAKE) srclinks - versionize: perl -pi -e 's/^\.ds V.*/.ds V $(VERSION)/;' $(top_srcdir)/cfftot1/cfftot1.1 $(top_srcdir)/mmafm/mmafm.1 $(top_srcdir)/mmpfb/mmpfb.1 $(top_srcdir)/otfinfo/otfinfo.1 $(top_srcdir)/otftotfm/otftotfm.1 $(top_srcdir)/t1dotlessj/t1dotlessj.1 $(top_srcdir)/t1lint/t1lint.1 $(top_srcdir)/t1reencode/t1reencode.1 $(top_srcdir)/t1testpage/t1testpage.1 $(top_srcdir)/ttftotype42/ttftotype42.1 perl -pi -e 's/^(\U$(PACKAGE)\E) [\d.ab]+$$/$$1 $(VERSION)/;' $(top_srcdir)/README perl -pi -e 's/^Version: [\d.ab]+$$/Version: $(VERSION)/;' $(top_srcdir)/lcdf-typetools.spec -.PHONY: srclinks rpm liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 +.PHONY: rpm liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/Build/source/texk/lcdf-typetools/NEWS b/Build/source/texk/lcdf-typetools/NEWS index c2d8abc825e..e2e574e76b8 100644 --- a/Build/source/texk/lcdf-typetools/NEWS +++ b/Build/source/texk/lcdf-typetools/NEWS @@ -1,8 +1,33 @@ LCDF Typetools NEWS -Version 2.76-rc1 2.Mar.2009 +Version 2.83 23.Apr.2010 -* Adapt to new TeX Live build scheme. +* otftotfm: If -fkern loads no GPOS lookups, apply the TTF kern table (if + it exists). This should use the TTF kern table strictly more often than + the previous version. Based on draft changes to the OpenType spec. + +* Update with changes from TeX Live. Thanks to Peter Breitenlohner. + + +Version 2.82 19.Jan.2010 + +* otftotfm: Correctly handle multiply-encoded glyphs (for example, if "j" + ends up encoded in more than one slot, apply the j => j.smcp feature to + both occurrences). Reported by Michael Ummels. + + +Version 2.81 7.Jan.2010 + +* otftotfm: Fix "em" and "ex" measurements (QUAD and XHEIGHT font + dimensions) for TrueType fonts. Problem reported by Nico Schlömer. + +* otftotfm: Add --type42 option. + + +Version 2.80 10.Nov.2009 + +* otftotfm: Add --fixed-width, --proportional-width, and --italic-angle + options. Requested by Karl Berry. Version 2.79 12.Jun.2009 diff --git a/Build/source/texk/lcdf-typetools/README b/Build/source/texk/lcdf-typetools/README index 0eafa76d80e..40fd5c59d95 100644 --- a/Build/source/texk/lcdf-typetools/README +++ b/Build/source/texk/lcdf-typetools/README @@ -1,4 +1,4 @@ -LCDF-TYPETOOLS 2.79 +LCDF-TYPETOOLS 2.83 =================== USAGE @@ -125,7 +125,7 @@ for a particular font. COPYRIGHT/LICENSE ----------------- - All source code is Copyright (c) 1997-2006 Eddie Kohler. + All source code is Copyright (c) 1997-2010 Eddie Kohler. This code is distributed under the GNU General Public License, Version 2 (and only Version 2). The GNU General Public License is available via the diff --git a/Build/source/texk/lcdf-typetools/ac/lcdf-typetools.ac b/Build/source/texk/lcdf-typetools/ac/lcdf-typetools.ac index 7df15574618..7aaff4c33af 100644 --- a/Build/source/texk/lcdf-typetools/ac/lcdf-typetools.ac +++ b/Build/source/texk/lcdf-typetools/ac/lcdf-typetools.ac @@ -1,18 +1,13 @@ -## texk/lcdf-typetools/ac/lcdf-typetools.ac: configure.ac fragment for the TeX Live subdirectory texk/lcdf-typetools/ -dnl -dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> -dnl You may freely use, modify and/or distribute this file. -dnl -## configure options for lcdf-typetools +## Define configure options for lcdf-typetools. Extracted from configure.ac +## for ease of building TeX Live. m4_define_default([kpse_indent_26], [26])[]dnl -m4_define([kpse_lcdf_typetools_progs], -[cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42])[]dnl +m4_define([kpse_lcdf_typetools_progs], [cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42])[]dnl AC_FOREACH([Kpse_Prog], kpse_lcdf_typetools_progs, [AC_ARG_ENABLE(Kpse_Prog, AS_HELP_STRING([--disable-]Kpse_Prog, [do not build the ]Kpse_Prog[ program], kpse_indent_26))]) -m4_define([kpse_otftotfm_auto_opts], [cfftot1 t1dotlessj updmap])[]dnl +m4_define([kpse_otftotfm_auto_opts], [cfftot1 t1dotlessj ttftotype42 updmap])[]dnl AC_FOREACH([Kpse_Opt], kpse_otftotfm_auto_opts, [AC_ARG_ENABLE(Kpse_Opt, AS_HELP_STRING([--disable-auto-]Kpse_Opt, diff --git a/Build/source/texk/lcdf-typetools/cfftot1/Makefile.am b/Build/source/texk/lcdf-typetools/cfftot1/Makefile.am index b9a54e2e20a..6bfd3a37b6c 100644 --- a/Build/source/texk/lcdf-typetools/cfftot1/Makefile.am +++ b/Build/source/texk/lcdf-typetools/cfftot1/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = cfftot1 man_MANS = cfftot1.1 diff --git a/Build/source/texk/lcdf-typetools/cfftot1/Makefile.in b/Build/source/texk/lcdf-typetools/cfftot1/Makefile.in index 3c6e50edeb1..1b69cfbe52b 100644 --- a/Build/source/texk/lcdf-typetools/cfftot1/Makefile.in +++ b/Build/source/texk/lcdf-typetools/cfftot1/Makefile.in @@ -150,6 +150,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -238,6 +239,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign man_MANS = cfftot1.1 cfftot1_SOURCES = cfftot1.cc \ maket1font.cc maket1font.hh diff --git a/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.1 b/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.1 index 8a6e9a4dbb5..6c505fece8e 100644 --- a/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.1 +++ b/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.1 @@ -1,4 +1,4 @@ -.ds V 2.79 +.ds V 2.83 .de M .BR "\\$1" "(\\$2)\\$3" .. diff --git a/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.cc b/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.cc index 4a12f271dae..f0ae6b41953 100644 --- a/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.cc +++ b/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.cc @@ -1,6 +1,6 @@ /* cfftot1.cc -- driver for translating CFF fonts to Type 1 fonts * - * Copyright (c) 2002-2009 Eddie Kohler + * Copyright (c) 2002-2010 Eddie Kohler * * 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 @@ -210,7 +210,7 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("cfftot1 (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 2002-2009 Eddie Kohler\n\ + printf("Copyright (C) 2002-2010 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); diff --git a/Build/source/texk/lcdf-typetools/cfftot1/maket1font.cc b/Build/source/texk/lcdf-typetools/cfftot1/maket1font.cc index 317d5744255..68a35f62303 100644 --- a/Build/source/texk/lcdf-typetools/cfftot1/maket1font.cc +++ b/Build/source/texk/lcdf-typetools/cfftot1/maket1font.cc @@ -1,6 +1,6 @@ /* maket1font.{cc,hh} -- translate CFF fonts to Type 1 fonts * - * Copyright (c) 2002-2009 Eddie Kohler + * Copyright (c) 2002-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/config.h.in b/Build/source/texk/lcdf-typetools/config.h.in index c2170785b87..dd6df364f01 100644 --- a/Build/source/texk/lcdf-typetools/config.h.in +++ b/Build/source/texk/lcdf-typetools/config.h.in @@ -24,6 +24,9 @@ /* Define to run t1dotlessj from otftotfm. */ #undef HAVE_AUTO_T1DOTLESSJ +/* Define to run ttftotype42 from otftotfm. */ +#undef HAVE_AUTO_TTFTOTYPE42 + /* Define to run updmap from otftotfm. */ #undef HAVE_AUTO_UPDMAP @@ -150,9 +153,6 @@ /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR @@ -212,9 +212,6 @@ /* Define to 1 if you have the `waitpid' function. */ #undef HAVE_WAITPID -/* Define to 1 if you have the <winsock2.h> header file. */ -#undef HAVE_WINSOCK2_H - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR @@ -322,6 +319,8 @@ double good_strtod(const char *nptr, char **endptr); #ifdef __cplusplus } +/* Get rid of a possible inline macro under C++. */ +# define inline inline #endif #endif /* LCDF_TYPETOOLS_CONFIG_H */ diff --git a/Build/source/texk/lcdf-typetools/configure b/Build/source/texk/lcdf-typetools/configure index bb2327de740..b7f78b74e40 100755 --- a/Build/source/texk/lcdf-typetools/configure +++ b/Build/source/texk/lcdf-typetools/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for LCDF typetools 2.79. +# Generated by GNU Autoconf 2.65 for LCDF typetools for TeX Live 2.83. # # Report bugs to <tex-k@tug.org>. # @@ -699,10 +699,10 @@ MFLAGS= MAKEFLAGS= # Identity of this package. -PACKAGE_NAME='LCDF typetools' -PACKAGE_TARNAME='lcdf-typetools' -PACKAGE_VERSION='2.79' -PACKAGE_STRING='LCDF typetools 2.79' +PACKAGE_NAME='LCDF typetools for TeX Live' +PACKAGE_TARNAME='lcdf-typetools-for-tex-live' +PACKAGE_VERSION='2.83' +PACKAGE_STRING='LCDF typetools for TeX Live 2.83' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -747,6 +747,8 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +FIXLIBC_FALSE +FIXLIBC_TRUE have_kpathsea_FALSE have_kpathsea_TRUE KPATHSEA_RULE @@ -766,6 +768,7 @@ CXXDEPMODE ac_ct_CXX CXXFLAGS CXX +LCDF_TYPETOOLS_VERSION WARNING_CFLAGS CPP OTOOL64 @@ -903,7 +906,6 @@ enable_t1reencode enable_t1testpage enable_ttftotype42 enable_updmap -enable_texlive_build with_kpathsea with_system_kpathsea with_kpathsea_includes @@ -1464,7 +1466,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures LCDF typetools 2.79 to adapt to many kinds of systems. +\`configure' configures LCDF typetools for TeX Live 2.83 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1512,7 +1514,8 @@ Fine tuning of the installation directories: --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/lcdf-typetools] + --docdir=DIR documentation root + [DATAROOTDIR/doc/lcdf-typetools-for-tex-live] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1534,7 +1537,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of LCDF typetools 2.79:";; + short | recursive ) echo "Configuration of LCDF typetools for TeX Live 2.83:";; esac cat <<\_ACEOF @@ -1570,8 +1573,9 @@ Optional Features: --disable-auto-cfftot1 disable running cfftot1 from otftotfm --disable-auto-t1dotlessj disable running t1dotlessj from otftotfm + --disable-auto-ttftotype42 + disable running ttftotype42 from otftotfm --disable-auto-updmap disable running updmap from otftotfm - --enable-texlive-build build as part of a TeX Live installation --disable-selfauto-set disable setting SELFAUTO variables from kpsewhich Optional Packages: @@ -1666,7 +1670,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -LCDF typetools configure 2.79 +LCDF typetools for TeX Live configure 2.83 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2579,7 +2583,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by LCDF typetools $as_me 2.79, which was +It was created by LCDF typetools for TeX Live $as_me 2.83, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -5029,13 +5033,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5032: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5036: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5035: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5039: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5038: output\"" >&5) + (eval echo "\"\$as_me:5042: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6238,7 +6242,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6241 "configure"' > conftest.$ac_ext + echo '#line 6245 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7303,8 +7307,8 @@ fi # Define the identity of the package. - PACKAGE='lcdf-typetools' - VERSION='2.79' + PACKAGE='lcdf-typetools-for-tex-live' + VERSION='2.83' cat >>confdefs.h <<_ACEOF @@ -8168,11 +8172,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8171: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8175: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8175: \$? = $ac_status" >&5 + echo "$as_me:8179: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8507,11 +8511,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8510: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8514: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8514: \$? = $ac_status" >&5 + echo "$as_me:8518: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8612,11 +8616,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8615: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8619: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8619: \$? = $ac_status" >&5 + echo "$as_me:8623: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8667,11 +8671,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8670: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8674: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8674: \$? = $ac_status" >&5 + echo "$as_me:8678: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11034,7 +11038,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11037 "configure" +#line 11041 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11130,7 +11134,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11133 "configure" +#line 11137 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12234,6 +12238,9 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags +LCDF_TYPETOOLS_VERSION=2.83 + + ac_config_headers="$ac_config_headers config.h" @@ -14929,11 +14936,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14932: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14939: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14936: \$? = $ac_status" >&5 + echo "$as_me:14943: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15028,11 +15035,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15031: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15038: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15035: \$? = $ac_status" >&5 + echo "$as_me:15042: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15080,11 +15087,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15083: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15090: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15087: \$? = $ac_status" >&5 + echo "$as_me:15094: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16494,8 +16501,8 @@ fi -## texk/lcdf-typetools/ac/lcdf-typetools.ac: configure.ac fragment for the TeX Live subdirectory texk/lcdf-typetools/ -## configure options for lcdf-typetools +## Define configure options for lcdf-typetools. Extracted from configure.ac +## for ease of building TeX Live. # Check whether --enable-cfftot1 was given. if test "${enable_cfftot1+set}" = set; then : enableval=$enable_cfftot1; @@ -16549,13 +16556,18 @@ fi if test "${enable_t1dotlessj+set}" = set; then : enableval=$enable_t1dotlessj; fi +# Check whether --enable-ttftotype42 was given. +if test "${enable_ttftotype42+set}" = set; then : + enableval=$enable_ttftotype42; +fi # Check whether --enable-updmap was given. if test "${enable_updmap+set}" = set; then : enableval=$enable_updmap; fi -SELECTED_SUBDIRS='liblcdf libefont' + +SELECTED_SUBDIRS= test "x$enable_cfftot1" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS cfftot1" test "x$enable_mmafm" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS mmafm" test "x$enable_mmpfb" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS mmpfb" @@ -16580,6 +16592,11 @@ if test "x$enable_auto_t1dotlessj" != xno; then : $as_echo "#define HAVE_AUTO_T1DOTLESSJ 1" >>confdefs.h fi +if test "x$enable_auto_ttftotype42" != xno; then : + +$as_echo "#define HAVE_AUTO_TTFTOTYPE42 1" >>confdefs.h + +fi if test "x$enable_auto_updmap" != xno; then : $as_echo "#define HAVE_AUTO_UPDMAP 1" >>confdefs.h @@ -16588,12 +16605,6 @@ fi -# Check whether --enable-texlive-build was given. -if test "${enable_texlive_build+set}" = set; then : - enableval=$enable_texlive_build; : -else - enable_texlive_build=no -fi if test "x$enable_texlive_build" = xyes; then @@ -17032,7 +17043,7 @@ Usage: $0 [OPTIONS] Report bugs to <bug-libtool@gnu.org>." lt_cl_version="\ -LCDF typetools config.lt 2.79 +LCDF typetools for TeX Live config.lt 2.83 configured by $0, generated by GNU Autoconf 2.65. Copyright (C) 2008 Free Software Foundation, Inc. @@ -18525,16 +18536,17 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_link="./libtool --mode=link --tag=CC $ac_link" -for ac_func in strdup strerror +need_fixlibc=0 +for ac_func in strerror do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : + ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_STRERROR 1 _ACEOF - + : +else + need_fixlibc=1 fi done @@ -18570,7 +18582,8 @@ fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_strtod" >&5 $as_echo "$ac_cv_working_strtod" >&6; } -if test $ac_cv_working_strtod = no; then +if test "x$ac_cv_working_strtod" = xno; then + need_fixlibc=1 $as_echo "#define BROKEN_STRTOD 1" >>confdefs.h @@ -18705,6 +18718,14 @@ fi done + if test x$need_fixlibc = x1; then + FIXLIBC_TRUE= + FIXLIBC_FALSE='#' +else + FIXLIBC_TRUE='#' + FIXLIBC_FALSE= +fi + @@ -18939,7 +18960,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_link="./libtool --mode=link --tag=CXX $ac_link" -for ac_header in byteorder.h netinet/in.h sys/param.h winsock2.h +for ac_header in byteorder.h netinet/in.h sys/param.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -18965,16 +18986,14 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext # include <byteorder.h> #elif HAVE_NETINET_IN_H # include <netinet/in.h> -#elif defined(HAVE_SYS_PARAM_H) || defined(WIN32) -# if defined(HAVE_SYS_PARAM_H) -# include <sys/param.h> -# endif -# if defined(WIN32) -# ifdef __MSC_VER -# pragma warning (disable: 4290) -# endif -# include <winsock2.h> +#elif HAVE_SYS_PARAM_H +# include <sys/param.h> +#endif +#ifdef WIN32 +# ifdef __MSC_VER +# pragma warning (disable: 4290) # endif +# include <winsock2.h> #endif int @@ -19348,6 +19367,10 @@ if test -z "${have_kpathsea_TRUE}" && test -z "${have_kpathsea_FALSE}"; then as_fn_error "conditional \"have_kpathsea\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${FIXLIBC_TRUE}" && test -z "${FIXLIBC_FALSE}"; then + as_fn_error "conditional \"FIXLIBC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 @@ -19756,7 +19779,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by LCDF typetools $as_me 2.79, which was +This file was extended by LCDF typetools for TeX Live $as_me 2.83, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19822,7 +19845,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -LCDF typetools config.status 2.79 +LCDF typetools for TeX Live config.status 2.83 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" diff --git a/Build/source/texk/lcdf-typetools/configure.ac b/Build/source/texk/lcdf-typetools/configure.ac index da88626e40d..37c2465cfa5 100644 --- a/Build/source/texk/lcdf-typetools/configure.ac +++ b/Build/source/texk/lcdf-typetools/configure.ac @@ -1,6 +1,7 @@ dnl Process this file with autoconf to produce a configure script. dnl Adapted for TeX Live. -AC_INIT([LCDF typetools], [2.79], [tex-k@tug.org]) +m4_define([lcdf_typetools_version], [2.83])[]dnl using unmodified lcdf-typetools source tree +AC_INIT([LCDF typetools for TeX Live], lcdf_typetools_version, [tex-k@tug.org]) AC_PREREQ([2.65]) AC_CONFIG_SRCDIR([NEWS]) AC_CONFIG_AUX_DIR([../../build-aux]) @@ -9,6 +10,9 @@ AC_CONFIG_MACRO_DIR([../../m4]) dnl Common code for all programs using libkpathsea. KPSE_COMMON([lcdf-typetools], [check-news]) +LCDF_TYPETOOLS_VERSION=lcdf_typetools_version +AC_SUBST([LCDF_TYPETOOLS_VERSION]) + AM_CONFIG_HEADER(config.h) AC_PROG_CXX @@ -30,11 +34,12 @@ AC_HEADER_DIRENT dnl -dnl select programs to be compiled, otftotfm auto-options +dnl select programs to be compiled and automatically run dnl m4_include([ac/lcdf-typetools.ac]) -SELECTED_SUBDIRS='liblcdf libefont' + +SELECTED_SUBDIRS= AC_FOREACH([Kpse_Prog], kpse_lcdf_typetools_progs, [test "x$enable_[]Kpse_Prog" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS Kpse_Prog" ]) @@ -46,15 +51,13 @@ AC_FOREACH([Kpse_Opt], kpse_otftotfm_auto_opts, [Define to run ]Kpse_Opt[ from otftotfm.])]) ]) + dnl dnl kpathsea dnl -AC_ARG_ENABLE([texlive-build], - AS_HELP_STRING([--enable-texlive-build], - [build as part of a TeX Live installation]), - [:], - [enable_texlive_build=no]) +dnl The configure option '--enable-texlive-build' is inherited +dnl and automatically enabled, when built as part of TeX Live. AM_CONDITIONAL([texlive_build], [test "x$enable_texlive_build" = xyes]) @@ -137,7 +140,7 @@ AC_CACHE_CHECK([whether <new> works], ac_cv_good_new_hdr, if test "$ac_cv_good_new_hdr" = yes; then AC_DEFINE(HAVE_NEW_HDR, 1, [Define if <new> exists and works.]) fi -AC_CHECK_HEADERS([new.h unistd.h]) +AC_CHECK_HEADERS(new.h unistd.h) dnl @@ -146,7 +149,8 @@ dnl headers such as unistd.h dnl AC_LANG_C -AC_CHECK_FUNCS([strdup strerror]) +need_fixlibc=0 +AC_CHECK_FUNCS(strerror, :, [need_fixlibc=1]) AC_CACHE_CHECK(whether strtod works, ac_cv_working_strtod, [AC_TRY_RUN([#include <stdio.h> @@ -156,9 +160,10 @@ int main(int c, char **v) { char *endp; double d = strtod(s, &endp); exit(*endp == 0 ? 1 : 0); -}], ac_cv_working_strtod=yes, ac_cv_working_strtod=no, -ac_cv_working_strtod=yes)]) -if test $ac_cv_working_strtod = no; then +}], [ac_cv_working_strtod=yes], [ac_cv_working_strtod=no], +[ac_cv_working_strtod=yes])]) +if test "x$ac_cv_working_strtod" = xno; then + need_fixlibc=1 AC_DEFINE(BROKEN_STRTOD, 1, [Define if strtod is broken.]) fi @@ -166,6 +171,7 @@ AC_CHECK_FUNCS(strtoul ctime mkstemp ftruncate sigaction waitpid) AC_CHECK_FUNC(floor, :, [AC_CHECK_LIB(m, floor)]) AC_CHECK_FUNC(fabs, :, [AC_CHECK_LIB(m, fabs)]) AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/wait.h) +AM_CONDITIONAL([FIXLIBC], [test x$need_fixlibc = x1]) dnl @@ -221,8 +227,7 @@ dnl ntohs, ntohl (need them in C++ code) dnl AC_LANG_CPLUSPLUS -dnl MinGW32 has <sys/param.h> but also needs <winsock2.h> -AC_CHECK_HEADERS(byteorder.h netinet/in.h sys/param.h winsock2.h) +AC_CHECK_HEADERS(byteorder.h netinet/in.h sys/param.h) AC_MSG_CHECKING([whether ntohs and ntohl are defined]) ac_ntoh_defined=no AC_COMPILE_IFELSE( @@ -233,16 +238,14 @@ AC_COMPILE_IFELSE( # include <byteorder.h> #elif HAVE_NETINET_IN_H # include <netinet/in.h> -#elif defined(HAVE_SYS_PARAM_H) || defined(WIN32) -# if defined(HAVE_SYS_PARAM_H) -# include <sys/param.h> -# endif -# if defined(WIN32) -# ifdef __MSC_VER -# pragma warning (disable: 4290) -# endif -# include <winsock2.h> +#elif HAVE_SYS_PARAM_H +# include <sys/param.h> +#endif +#ifdef WIN32 +# ifdef __MSC_VER +# pragma warning (disable: 4290) # endif +# include <winsock2.h> #endif ]], [[(void) ntohs(0x0020), (void) ntohl(0x03040020);]])], [AC_MSG_RESULT(yes) @@ -344,6 +347,8 @@ double good_strtod(const char *nptr, char **endptr); #ifdef __cplusplus } +/* Get rid of a possible inline macro under C++. */ +# define inline inline #endif #endif /* LCDF_TYPETOOLS_CONFIG_H */]) diff --git a/Build/source/texk/lcdf-typetools/configure.ac.orig b/Build/source/texk/lcdf-typetools/configure.ac.orig index 8e3b4557e4f..8e583c21dd6 100644 --- a/Build/source/texk/lcdf-typetools/configure.ac.orig +++ b/Build/source/texk/lcdf-typetools/configure.ac.orig @@ -1,6 +1,7 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(NEWS) -AM_INIT_AUTOMAKE(lcdf-typetools, 2.78) +AC_INIT([lcdf-typetools], [2.83]) +AC_CONFIG_SRCDIR([NEWS]) +AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE @@ -84,8 +85,8 @@ EOF TEMPLATE_OBJS="" ;; *) TEMPLATE_OBJS="$ac_cv_cxx_templobjs" ;; - esac - AC_SUBST(TEMPLATE_OBJS)])]) + esac]) + AC_SUBST(TEMPLATE_OBJS)]) AC_CXX_TEMPLATE_OBJS @@ -98,31 +99,26 @@ AC_HEADER_DIRENT dnl -dnl select programs to be compiled +dnl select programs to be compiled and automatically run dnl -AC_ARG_ENABLE(cfftot1, [ --disable-cfftot1 do not build the cfftot1 program], :, enable_cfftot1=yes) -AC_ARG_ENABLE(mmafm, [ --disable-mmafm do not build the mmafm program], :, enable_mmafm=yes) -AC_ARG_ENABLE(mmpfb, [ --disable-mmpfb do not build the mmpfb program], :, enable_mmpfb=yes) -AC_ARG_ENABLE(otfinfo, [ --disable-otfinfo do not build the otfinfo program], :, enable_otfinfo=yes) -AC_ARG_ENABLE(otftotfm, [ --disable-otftotfm do not build the otftotfm program], :, enable_otftotfm=yes) -AC_ARG_ENABLE(t1dotlessj, [ --disable-t1dotlessj do not build the t1dotlessj program], :, enable_t1dotlessj=yes) -AC_ARG_ENABLE(t1lint, [ --disable-t1lint do not build the t1lint program], :, enable_t1lint=yes) -AC_ARG_ENABLE(t1rawafm, [ --disable-t1rawafm do not build the t1rawafm program], :, enable_t1dotlessj=yes) -AC_ARG_ENABLE(t1reencode, [ --disable-t1reencode do not build the t1reencode program], :, enable_t1reencode=yes) -AC_ARG_ENABLE(t1testpage, [ --disable-t1testpage do not build the t1testpage program], :, enable_t1testpage=yes) -AC_ARG_ENABLE(ttftotype42, [ --disable-ttftotype42 do not build the ttftotype42 program], :, enable_ttftotype42=yes) - -SELECTED_SUBDIRS='' -for i in cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42; do - y=`eval 'echo $enable_'"$i"` - if test "x$y" != xno; then SELECTED_SUBDIRS="$SELECTED_SUBDIRS $i"; fi -done +m4_include([m4/lcdf-typetools.m4]) + +SELECTED_SUBDIRS= +AC_FOREACH([Kpse_Prog], kpse_lcdf_typetools_progs, + [test "x$enable_[]Kpse_Prog" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS Kpse_Prog" +]) AC_SUBST(SELECTED_SUBDIRS) +AC_FOREACH([Kpse_Opt], kpse_otftotfm_auto_opts, + [AS_IF([test "x$enable_auto_]Kpse_Opt[" != xno], + [AC_DEFINE([HAVE_AUTO_]AS_TR_CPP(Kpse_Opt), 1, + [Define to run ]Kpse_Opt[ from otftotfm.])]) +]) + dnl -dnl kpathsea, auto-cfftot1 +dnl kpathsea dnl AC_ARG_ENABLE(tetex-build, [ --enable-tetex-build build as part of a teTeX installation], :, enable_tetex_build=no) @@ -232,19 +228,13 @@ Either supply the correct PREFIX to --with-kpathsea, or supply AC_DEFINE_UNQUOTED(SELFAUTOPARENT, "$SELFAUTOPARENT", [kpsewhich's $SELFAUTOPARENT variable]) fi -AC_ARG_ENABLE(auto-cfftot1, [ --disable-auto-cfftot1 disable running cfftot1 from otftotfm], :, enable_auto_cfftot1=yes) -AC_ARG_ENABLE(auto-t1dotlessj, [ --disable-auto-t1dotlessj disable running t1dotlessj from otftotfm], :, enable_auto_t1dotlessj=yes) -AC_ARG_ENABLE(auto-updmap, [ --disable-auto-updmap disable running updmap from otftotfm], :, enable_auto_updmap=yes) -if test "x$enable_auto_cfftot1" = xyes; then - AC_DEFINE(HAVE_AUTO_CFFTOT1, 1, [Define to run cfftot1 automatically from otftotfm.]) -fi -if test "x$enable_auto_t1dotlessj" = xyes; then - AC_DEFINE(HAVE_AUTO_T1DOTLESSJ, 1, [Define to run t1dotlessj automatically from otftotfm.]) -fi -if test "x$enable_auto_updmap" = xyes; then - AC_DEFINE(HAVE_AUTO_UPDMAP, 1, [Define to run system updmap automatically from otftotfm.]) -fi +dnl +dnl TeX Live build stub +dnl + +KPATHSEA_RULE= +AC_SUBST([KPATHSEA_RULE]) dnl @@ -270,8 +260,8 @@ dnl headers such as unistd.h dnl AC_LANG_C -FIXLIBC_O='' -AC_CHECK_FUNCS(strerror, :, FIXLIBC_O='fixlibc.o') +need_fixlibc=0 +AC_CHECK_FUNCS(strerror, :, [need_fixlibc=1]) AC_CACHE_CHECK(whether strtod works, ac_cv_working_strtod, [AC_TRY_RUN([#include <stdio.h> @@ -281,10 +271,10 @@ int main(int c, char **v) { char *endp; double d = strtod(s, &endp); exit(*endp == 0 ? 1 : 0); -}], ac_cv_working_strtod=yes, ac_cv_working_strtod=no, -ac_cv_working_strtod=yes)]) +}], [ac_cv_working_strtod=yes], [ac_cv_working_strtod=no], +[ac_cv_working_strtod=yes])]) if test $ac_cv_working_strtod = no; then - FIXLIBC_O='fixlibc.o' + need_fixlibc=1 AC_DEFINE(BROKEN_STRTOD, 1, [Define if strtod is broken.]) fi @@ -292,8 +282,7 @@ AC_CHECK_FUNCS(strtoul ctime mkstemp ftruncate sigaction waitpid) AC_CHECK_FUNC(floor, :, [AC_CHECK_LIB(m, floor)]) AC_CHECK_FUNC(fabs, :, [AC_CHECK_LIB(m, fabs)]) AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/wait.h) - -AC_SUBST(FIXLIBC_O) +AM_CONDITIONAL([FIXLIBC], [test x$need_fixlibc = x1]) dnl diff --git a/Build/source/texk/lcdf-typetools/include/efont/otfgpos.hh b/Build/source/texk/lcdf-typetools/include/efont/otfgpos.hh index 4a23f2453e2..84de5a2126b 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/otfgpos.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/otfgpos.hh @@ -128,6 +128,7 @@ class Positioning { public: Glyph left_glyph() const { return _left.g; } const Position &right() const { return _right; } Glyph right_glyph() const { return _right.g; } + inline void all_in_glyphs(Vector<Glyph> &gs) const; void unparse(StringAccum &, const Vector<PermString> * = 0) const; String unparse(const Vector<PermString> * = 0) const; @@ -235,5 +236,14 @@ inline bool Positioning::is_pairkern() const return _left.g != 0 && !_left.placed() && _right.g != 0 && _right.h_empty(); } +inline void Positioning::all_in_glyphs(Vector<Glyph> &gs) const +{ + gs.clear(); + if (_left.g != 0) + gs.push_back(_left.g); + if (_right.g != 0) + gs.push_back(_right.g); +} + }} #endif diff --git a/Build/source/texk/lcdf-typetools/include/efont/otfgsub.hh b/Build/source/texk/lcdf-typetools/include/efont/otfgsub.hh index 38588e449c4..bff8fc42f39 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/otfgsub.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/otfgsub.hh @@ -175,8 +175,8 @@ class Substitution { public: inline Glyph *right_glyphptr(); inline const Glyph *right_glyphptr() const; - bool all_in_glyphs(Vector<Glyph> &) const; - bool all_out_glyphs(Vector<Glyph> &) const; + bool all_in_glyphs(Vector<Glyph> &gs) const; + bool all_out_glyphs(Vector<Glyph> &gs) const; // alter void add_outer_left(Glyph); diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/clp.h b/Build/source/texk/lcdf-typetools/include/lcdf/clp.h index bcec630fe49..15476d52d35 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/clp.h +++ b/Build/source/texk/lcdf-typetools/include/lcdf/clp.h @@ -8,7 +8,7 @@ extern "C" { /* clp.h - Public interface to CLP. * This file is part of CLP, the command line parser package. * - * Copyright (c) 1997-2008 Eddie Kohler, ekohler@gmail.com + * Copyright (c) 1997-2010 Eddie Kohler, ekohler@gmail.com * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -224,6 +224,9 @@ Clp_ErrorHandler Clp_SetErrorHandler(Clp_Parser *clp, Clp_ErrorHandler errh); /** @brief Set @a clp's UTF-8 mode. */ int Clp_SetUTF8(Clp_Parser *clp, int utf8); +/** @brief Return @a clp's treatment of character @a c. */ +int Clp_OptionChar(Clp_Parser *clp, int c); + /** @brief Set @a clp's treatment of character @a c. */ int Clp_SetOptionChar(Clp_Parser *clp, int c, int type); diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/vector.cc b/Build/source/texk/lcdf-typetools/include/lcdf/vector.cc index 0c7fedba22e..559d3766f2d 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/vector.cc +++ b/Build/source/texk/lcdf-typetools/include/lcdf/vector.cc @@ -7,6 +7,7 @@ * * Copyright (c) 1999-2000 Massachusetts Institute of Technology * Copyright (c) 2001-2003 International Computer Science Institute + * Copyright (c) 1999-2010 Eddie Kohler * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,16 +23,16 @@ /* #include <lcdf/vector.hh> */ template <class T> -Vector<T>::Vector(const Vector<T> &o) +Vector<T>::Vector(const Vector<T> &x) : _l(0), _n(0), _capacity(0) { - *this = o; + *this = x; } template <class T> Vector<T>::~Vector() { - for (int i = 0; i < _n; i++) + for (size_type i = 0; i < _n; i++) _l[i].~T(); delete[] (unsigned char *)_l; } @@ -40,12 +41,20 @@ template <class T> Vector<T> & Vector<T>::operator=(const Vector<T> &o) { if (&o != this) { - for (int i = 0; i < _n; i++) + for (size_type i = 0; i < _n; i++) _l[i].~T(); +#ifdef VALGRIND_MAKE_MEM_NOACCESS + if (_l && _n) + VALGRIND_MAKE_MEM_NOACCESS(_l, _n * sizeof(T)); +#endif _n = 0; if (reserve(o._n)) { _n = o._n; - for (int i = 0; i < _n; i++) +#ifdef VALGRIND_MAKE_MEM_UNDEFINED + if (_l && _n) + VALGRIND_MAKE_MEM_UNDEFINED(_l, _n * sizeof(T)); +#endif + for (size_type i = 0; i < _n; i++) new(velt(i)) T(o._l[i]); } } @@ -53,78 +62,141 @@ Vector<T>::operator=(const Vector<T> &o) } template <class T> Vector<T> & -Vector<T>::assign(int n, const T &e) +Vector<T>::assign(size_type n, const T &x) { - resize(0, e); - resize(n, e); - return *this; + if (&x >= begin() && &x < end()) { + T x_copy(x); + return assign(n, x_copy); + } else { + resize(0, x); + resize(n, x); + return *this; + } } template <class T> typename Vector<T>::iterator -Vector<T>::erase(iterator a, iterator b) +Vector<T>::insert(iterator it, const T &x) { - if (b > a) { - assert(a >= begin() && b <= end()); - iterator i = a, j = b; - for (; j < end(); i++, j++) { - i->~T(); - new((void*) i) T(*j); + assert(it >= begin() && it <= end()); + if (&x >= begin() && &x < end()) { + T x_copy(x); + return insert(it, x_copy); + } + if (_n == _capacity) { + size_type pos = it - begin(); + if (!reserve(RESERVE_GROW)) + return end(); + it = begin() + pos; + } +#ifdef VALGRIND_MAKE_MEM_UNDEFINED + VALGRIND_MAKE_MEM_UNDEFINED(velt(_n), sizeof(T)); +#endif + for (iterator j = end(); j > it; ) { + --j; + new((void*) (j + 1)) T(*j); + j->~T(); +#ifdef VALGRIND_MAKE_MEM_UNDEFINED + VALGRIND_MAKE_MEM_UNDEFINED(j, sizeof(T)); +#endif } - for (; i < end(); i++) - i->~T(); - _n -= b - a; - return a; - } else - return b; + new((void*) it) T(x); + _n++; + return it; +} + +template <class T> typename Vector<T>::iterator +Vector<T>::erase(iterator a, iterator b) +{ + if (b > a) { + assert(a >= begin() && b <= end()); + iterator i = a, j = b; + for (; j < end(); i++, j++) { + i->~T(); +#ifdef VALGRIND_MAKE_MEM_UNDEFINED + VALGRIND_MAKE_MEM_UNDEFINED(i, sizeof(T)); +#endif + new((void*) i) T(*j); + } + for (; i < end(); i++) + i->~T(); + _n -= b - a; +#ifdef VALGRIND_MAKE_MEM_NOACCESS + VALGRIND_MAKE_MEM_NOACCESS(_l + _n, (b - a) * sizeof(T)); +#endif + return a; + } else + return b; } template <class T> bool -Vector<T>::reserve(int want) +Vector<T>::reserve_and_push_back(size_type want, const T *push_x) { + if (push_x && push_x >= begin() && push_x < end()) { + T x_copy(*push_x); + return reserve_and_push_back(want, &x_copy); + } + if (want < 0) - want = _capacity > 0 ? _capacity * 2 : 4; - if (want <= _capacity) - return true; + want = (_capacity > 0 ? _capacity * 2 : 4); - T *new_l = (T *)new unsigned char[sizeof(T) * want]; - if (!new_l) - return false; + if (want > _capacity) { + T *new_l = (T *)new unsigned char[sizeof(T) * want]; + if (!new_l) + return false; +#ifdef VALGRIND_MAKE_MEM_NOACCESS + VALGRIND_MAKE_MEM_NOACCESS(new_l + _n, (want - _n) * sizeof(T)); +#endif - for (int i = 0; i < _n; i++) { - new(velt(new_l, i)) T(_l[i]); - _l[i].~T(); + for (size_type i = 0; i < _n; i++) { + new(velt(new_l, i)) T(_l[i]); + _l[i].~T(); + } + delete[] (unsigned char *)_l; + + _l = new_l; + _capacity = want; } - delete[] (unsigned char *)_l; - _l = new_l; - _capacity = want; + if (push_x) + push_back(*push_x); return true; } template <class T> void -Vector<T>::resize(int nn, const T &e) +Vector<T>::resize(size_type n, const T &x) { - if (nn <= _capacity || reserve(nn)) { - for (int i = nn; i < _n; i++) + if (&x >= begin() && &x < end()) { + T x_copy(x); + resize(n, x_copy); + } else if (n <= _capacity || reserve(n)) { + for (size_type i = n; i < _n; i++) _l[i].~T(); - for (int i = _n; i < nn; i++) - new(velt(i)) T(e); - _n = nn; +#ifdef VALGRIND_MAKE_MEM_NOACCESS + if (n < _n) + VALGRIND_MAKE_MEM_NOACCESS(_l + n, (_n - n) * sizeof(T)); + if (_n < n) + VALGRIND_MAKE_MEM_UNDEFINED(_l + _n, (n - _n) * sizeof(T)); +#endif + for (size_type i = _n; i < n; i++) + new(velt(i)) T(x); + _n = n; } } template <class T> void -Vector<T>::swap(Vector<T> &o) +Vector<T>::swap(Vector<T> &x) { T *l = _l; - int n = _n; - int cap = _capacity; - _l = o._l; - _n = o._n; - _capacity = o._capacity; - o._l = l; - o._n = n; - o._capacity = cap; + _l = x._l; + x._l = l; + + size_type n = _n; + _n = x._n; + x._n = n; + + size_type cap = _capacity; + _capacity = x._capacity; + x._capacity = cap; } #endif diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/vector.hh b/Build/source/texk/lcdf-typetools/include/lcdf/vector.hh index 8b390c0a2f6..86e64e238ba 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/vector.hh +++ b/Build/source/texk/lcdf-typetools/include/lcdf/vector.hh @@ -9,247 +9,316 @@ #else static inline void *operator new(size_t, void *v) { return v; } #endif +#if HAVE_VALGRIND && HAVE_VALGRIND_MEMCHECK_H +# include <valgrind/memcheck.h> +#endif template <class T> class Vector { public: - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef T* pointer; - typedef const T* const_pointer; - - typedef int size_type; - - typedef T* iterator; - typedef const T* const_iterator; - - explicit Vector() : _l(0), _n(0), _capacity(0) { } - explicit Vector(size_type n, const T &e) : _l(0), _n(0), _capacity(0) { resize(n, e); } - // template <class In> ... - Vector(const Vector<T> &); - ~Vector(); - - Vector<T>& operator=(const Vector<T>&); - Vector<T>& assign(size_type n, const T& e = T()); - // template <class In> ... - - // iterators - iterator begin() { return _l; } - const_iterator begin() const { return _l; } - iterator end() { return _l + _n; } - const_iterator end() const { return _l + _n; } - - // capacity - size_type size() const { return _n; } - void resize(size_type nn, const T& e = T()); - size_type capacity() const { return _capacity; } - bool empty() const { return _n == 0; } - bool reserve(size_type); - - // element access - T& operator[](size_type i) { assert(i>=0 && i<_n); return _l[i]; } - const T& operator[](size_type i) const{ assert(i>=0 && i<_n); return _l[i]; } - T& at(size_type i) { return operator[](i); } - const T& at(size_type i) const { return operator[](i); } - T& front() { return operator[](0); } - const T& front() const { return operator[](0); } - T& back() { return operator[](_n - 1); } - const T& back() const { return operator[](_n - 1); } - T& at_u(size_type i) { return _l[i]; } - const T& at_u(size_type i) const { return _l[i]; } - - // modifiers - inline void push_back(const T&); - inline void pop_back(); - inline iterator erase(iterator); - iterator erase(iterator, iterator); - void swap(Vector<T> &); - void clear() { erase(begin(), end()); } + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T* pointer; + typedef const T* const_pointer; + typedef const T& const_access_type; + + typedef int size_type; + enum { RESERVE_GROW = (size_type) -1 }; + + typedef T* iterator; + typedef const T* const_iterator; + + explicit Vector() + : _l(0), _n(0), _capacity(0) { + } + explicit Vector(size_type n, const T &e) + : _l(0), _n(0), _capacity(0) { + resize(n, e); + } + // template <class In> ... + Vector(const Vector<T> &x); + ~Vector(); + + Vector<T>& operator=(const Vector<T>&); + Vector<T>& assign(size_type n, const T& e = T()); + // template <class In> ... + + // iterators + iterator begin() { return _l; } + const_iterator begin() const { return _l; } + iterator end() { return _l + _n; } + const_iterator end() const { return _l + _n; } + + // capacity + size_type size() const { return _n; } + void resize(size_type nn, const T& e = T()); + size_type capacity() const { return _capacity; } + bool empty() const { return _n == 0; } + bool reserve(size_type n) { return reserve_and_push_back(n, 0); } + + // element access + T &operator[](size_type i) { + assert((unsigned) i < (unsigned) _n); + return _l[i]; + } + const T &operator[](size_type i) const { + assert((unsigned) i < (unsigned) _n); + return _l[i]; + } + T& at(size_type i) { return operator[](i); } + const T& at(size_type i) const { return operator[](i); } + T& front() { return operator[](0); } + const T& front() const { return operator[](0); } + T& back() { return operator[](_n - 1); } + const T& back() const { return operator[](_n - 1); } + T& at_u(size_type i) { return _l[i]; } + const T& at_u(size_type i) const { return _l[i]; } + + // modifiers + inline void push_back(const T& x); + inline void pop_back(); + inline void push_front(const T& x); + inline void pop_front(); + iterator insert(iterator it, const T& x); + inline iterator erase(iterator it); + iterator erase(iterator a, iterator b); + void swap(Vector<T>& x); + void clear() { erase(begin(), end()); } private: - T *_l; - size_type _n; - size_type _capacity; + T *_l; + size_type _n; + size_type _capacity; - void *velt(size_type i) const { return (void *)&_l[i]; } - static void *velt(T *l, size_type i) { return (void *)&l[i]; } + void *velt(size_type i) const { return (void *)&_l[i]; } + static void *velt(T *l, size_type i) { return (void *)&l[i]; } + bool reserve_and_push_back(size_type n, const T *x); }; template <class T> inline void -Vector<T>::push_back(const T &e) +Vector<T>::push_back(const T& x) { - if (_n < _capacity || reserve(-1)) { - new(velt(_n)) T(e); - _n++; - } + if (_n < _capacity) { +#ifdef VALGRIND_MAKE_MEM_UNDEFINED + VALGRIND_MAKE_MEM_UNDEFINED(velt(_n), sizeof(T)); +#endif + new(velt(_n)) T(x); + ++_n; + } else + reserve_and_push_back(RESERVE_GROW, &x); } template <class T> inline void Vector<T>::pop_back() { - assert(_n > 0); - --_n; - _l[_n].~T(); + assert(_n > 0); + --_n; + _l[_n].~T(); +#ifdef VALGRIND_MAKE_MEM_NOACCESS + VALGRIND_MAKE_MEM_NOACCESS(&_l[_n], sizeof(T)); +#endif } template <class T> inline typename Vector<T>::iterator -Vector<T>::erase(iterator e) +Vector<T>::erase(iterator it) +{ + return (it < end() ? erase(it, it + 1) : it); +} + +template <class T> inline void +Vector<T>::push_front(const T& x) +{ + insert(begin(), x); +} + +template <class T> inline void +Vector<T>::pop_front() { - return (e < end() ? erase(e, e + 1) : e); + erase(begin()); } template <> class Vector<void*> { public: - typedef void* value_type; - typedef void*& reference; - typedef void* const& const_reference; - typedef void** pointer; - typedef void* const* const_pointer; - - typedef int size_type; - - typedef void** iterator; - typedef void* const* const_iterator; - - explicit Vector() : _l(0), _n(0), _capacity(0) { } - explicit Vector(size_type n, void* e) : _l(0), _n(0), _capacity(0) { resize(n, e); } - Vector(const Vector<void*> &); - ~Vector(); - - Vector<void*> &operator=(const Vector<void*> &); - Vector<void*> &assign(size_type n, void* e = 0); - - // iterators - iterator begin() { return _l; } - const_iterator begin() const { return _l; } - iterator end() { return _l + _n; } - const_iterator end() const { return _l + _n; } - - // capacity - size_type size() const { return _n; } - void resize(size_type nn, void* e = 0); - size_type capacity() const { return _capacity; } - bool empty() const { return _n == 0; } - bool reserve(size_type); - - // element access - void*& operator[](size_type i) { assert(i>=0 && i<_n); return _l[i]; } - void* operator[](size_type i) const { assert(i>=0 && i<_n); return _l[i]; } - void*& at(size_type i) { return operator[](i); } - void* at(size_type i) const { return operator[](i); } - void*& front() { return operator[](0); } - void* front() const { return operator[](0); } - void*& back() { return operator[](_n - 1); } - void* back() const { return operator[](_n - 1); } - void*& at_u(size_type i) { return _l[i]; } - void* at_u(size_type i) const { return _l[i]; } - - // modifiers - inline void push_back(void*); - inline void pop_back(); - inline iterator erase(iterator); - iterator erase(iterator, iterator); - void swap(Vector<void*> &); - void clear() { _n = 0; } + typedef void* value_type; + typedef void*& reference; + typedef void* const& const_reference; + typedef void** pointer; + typedef void* const* const_pointer; + typedef void* const_access_type; + + typedef int size_type; + enum { RESERVE_GROW = (size_type) -1 }; + + typedef void** iterator; + typedef void* const* const_iterator; + + explicit Vector() + : _l(0), _n(0), _capacity(0) { + } + explicit Vector(size_type n, void* e) + : _l(0), _n(0), _capacity(0) { + resize(n, e); + } + Vector(const Vector<void*> &); + ~Vector(); + + Vector<void*> &operator=(const Vector<void*> &); + Vector<void*> &assign(size_type n, void* x = 0); + + // iterators + iterator begin() { return _l; } + const_iterator begin() const { return _l; } + iterator end() { return _l + _n; } + const_iterator end() const { return _l + _n; } + + // capacity + size_type size() const { return _n; } + void resize(size_type n, void* x = 0); + size_type capacity() const { return _capacity; } + bool empty() const { return _n == 0; } + bool reserve(size_type n); + + // element access + void*& operator[](size_type i) { assert(i>=0 && i<_n); return _l[i]; } + void* operator[](size_type i) const { assert(i>=0 && i<_n); return _l[i]; } + void*& at(size_type i) { return operator[](i); } + void* at(size_type i) const { return operator[](i); } + void*& front() { return operator[](0); } + void* front() const { return operator[](0); } + void*& back() { return operator[](_n - 1); } + void* back() const { return operator[](_n - 1); } + void*& at_u(size_type i) { return _l[i]; } + void* at_u(size_type i) const { return _l[i]; } + + // modifiers + inline void push_back(void* x); + inline void pop_back(); + inline void push_front(void* x); + inline void pop_front(); + iterator insert(iterator it, void* x); + inline iterator erase(iterator it); + iterator erase(iterator a, iterator b); + void swap(Vector<void*> &x); + void clear() { _n = 0; } private: - void **_l; - size_type _n; - size_type _capacity; + void **_l; + size_type _n; + size_type _capacity; }; inline void -Vector<void*>::push_back(void *e) +Vector<void*>::push_back(void* x) { - if (_n < _capacity || reserve(-1)) { - _l[_n] = e; - _n++; - } + if (_n < _capacity || reserve(RESERVE_GROW)) { + _l[_n] = x; + _n++; + } } inline void Vector<void*>::pop_back() { - assert(_n > 0); - --_n; + assert(_n > 0); + --_n; +#ifdef VALGRIND_MAKE_MEM_NOACCESS + VALGRIND_MAKE_MEM_NOACCESS(&_l[_n], sizeof(void *)); +#endif } inline Vector<void*>::iterator -Vector<void*>::erase(Vector<void*>::iterator e) +Vector<void*>::erase(Vector<void*>::iterator it) +{ + return (it < end() ? erase(it, it + 1) : it); +} + +inline void +Vector<void*>::push_front(void* x) +{ + insert(begin(), x); +} + +inline void +Vector<void*>::pop_front() { - return (e < end() ? erase(e, e + 1) : e); + erase(begin()); } template <class T> class Vector<T*>: private Vector<void*> { - typedef Vector<void*> Base; + typedef Vector<void*> Base; public: - typedef T* value_type; - typedef T*& reference; - typedef T* const& const_reference; - typedef T** pointer; - typedef T* const* const_pointer; - - typedef int size_type; - - typedef T** iterator; - typedef T* const* const_iterator; - - explicit Vector() : Base() { } - explicit Vector(size_type n, T* e) : Base(n, (void *)e) { } - Vector(const Vector<T *> &o) : Base(o) { } - ~Vector() { } - - Vector<T *> &operator=(const Vector<T *> &o) - { Base::operator=(o); return *this; } - Vector<T *> &assign(size_type n, T *e = 0) - { Base::assign(n, (void *)e); return *this; } - - // iterators - const_iterator begin() const { return (const_iterator)(Base::begin()); } - iterator begin() { return (iterator)(Base::begin()); } - const_iterator end() const { return (const_iterator)(Base::end()); } - iterator end() { return (iterator)(Base::end()); } - - // capacity - size_type size() const { return Base::size(); } - void resize(size_type n, T *e = 0) { Base::resize(n, (void *)e); } - size_type capacity() const { return Base::capacity(); } - bool empty() const { return Base::empty(); } - bool reserve(size_type n) { return Base::reserve(n); } - - // element access - T*& operator[](size_type i) { return (T*&)(Base::at(i)); } - T* operator[](size_type i) const { return (T*)(Base::operator[](i)); } - T*& at(size_type i) { return (T*&)(Base::operator[](i)); } - T* at(size_type i) const { return (T*)(Base::at(i)); } - T*& front() { return (T*&)(Base::front()); } - T* front() const { return (T*)(Base::front()); } - T*& back() { return (T*&)(Base::back()); } - T* back() const { return (T*)(Base::back()); } - T*& at_u(size_type i) { return (T*&)(Base::at_u(i)); } - T* at_u(size_type i) const { return (T*)(Base::at_u(i)); } - - // modifiers - void push_back(T* e) { Base::push_back((void*)e); } - void pop_back() { Base::pop_back(); } - iterator erase(iterator i) { return Base::erase((void**)i); } - iterator erase(iterator i, iterator j) { return Base::erase((void**)i, (void**)j); } - void swap(Vector<T *> &o) { Base::swap(o); } - void clear() { Base::clear(); } + typedef T* value_type; + typedef T*& reference; + typedef T* const& const_reference; + typedef T** pointer; + typedef T* const* const_pointer; + typedef T* const_access_type; + + typedef int size_type; + enum { RESERVE_GROW = Base::RESERVE_GROW }; + + typedef T** iterator; + typedef T* const* const_iterator; + + explicit Vector() : Base() { } + explicit Vector(size_type n, T* x) : Base(n, (void *)x) { } + Vector(const Vector<T*>& x) : Base(x) { } + ~Vector() { } + + Vector<T*>& operator=(const Vector<T*>& x) + { Base::operator=(x); return *this; } + Vector<T*>& assign(size_type n, T* x = 0) + { Base::assign(n, (void*)x); return *this; } + + // iterators + const_iterator begin() const { return (const_iterator)(Base::begin()); } + iterator begin() { return (iterator)(Base::begin()); } + const_iterator end() const { return (const_iterator)(Base::end()); } + iterator end() { return (iterator)(Base::end()); } + + // capacity + size_type size() const { return Base::size(); } + void resize(size_type n, T* x = 0) { Base::resize(n, (void*)x); } + size_type capacity() const { return Base::capacity(); } + bool empty() const { return Base::empty(); } + bool reserve(size_type n) { return Base::reserve(n); } + + // element access + T*& operator[](size_type i) { return (T*&)(Base::at(i)); } + T* operator[](size_type i) const { return (T*)(Base::operator[](i)); } + T*& at(size_type i) { return (T*&)(Base::operator[](i)); } + T* at(size_type i) const { return (T*)(Base::at(i)); } + T*& front() { return (T*&)(Base::front()); } + T* front() const { return (T*)(Base::front()); } + T*& back() { return (T*&)(Base::back()); } + T* back() const { return (T*)(Base::back()); } + T*& at_u(size_type i) { return (T*&)(Base::at_u(i)); } + T* at_u(size_type i) const { return (T*)(Base::at_u(i)); } + + // modifiers + void push_back(T* x) { Base::push_back((void*)x); } + void pop_back() { Base::pop_back(); } + void push_front(T* x) { Base::push_front((void*)x); } + void pop_front() { Base::pop_front(); } + iterator insert(iterator it, T* x) { return (iterator)Base::insert((void**)it, (void*)x); } + iterator erase(iterator it) { return (iterator)Base::erase((void**)it); } + iterator erase(iterator a, iterator b) { return (iterator)Base::erase((void**)a, (void**)b); } + void swap(Vector<T*>& x) { Base::swap(x); } + void clear() { Base::clear(); } }; -#include <lcdf/vector.cc> // necessary to support GCC 3.3 +#include <lcdf/vector.cc> #endif diff --git a/Build/source/texk/lcdf-typetools/ChangeLog.TL b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.83-PATCHES/ChangeLog index ab1b6dcaeb7..d028f0ce4b9 100644 --- a/Build/source/texk/lcdf-typetools/ChangeLog.TL +++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.83-PATCHES/ChangeLog @@ -1,5 +1,8 @@ -ChangeLog.TL: TeX Live (TL) changes for lcdf-typetools -====================================================== +2010-04-26 Peter Breitenlohner <peb@mppmu.mpg.de> + + Import lcdf-typetools-2.83. + * configure.ac, Makefile.am: Adapt. + * patch-01-otftotfm-Makefile (new): Adapt otftotfm/Makefile.am. 2010-02-21 Peter Breitenlohner <peb@mppmu.mpg.de> diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.83-PATCHES/TL-Changes b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.83-PATCHES/TL-Changes new file mode 100644 index 00000000000..2a6cc641a8b --- /dev/null +++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.83-PATCHES/TL-Changes @@ -0,0 +1,16 @@ +Changes applied to the lcdf-typetools tree as obtained from: + http://www.lcdf.org/type/lcdf-typetools-2.83.tar.gz + +Removed: + depcomp + install-sh + missing + +Renamed/Moved: + Makefile.am -> Makefile.am.orig + configure.ac -> configure.ac.orig + m4/lcdf-typetools.m4 -> ac/lcdf-typetools.ac + +Created Autoconf macro file m4/ac_cxx_template_objs.m4 + adapting code in configure.ac.orig. + diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.83-PATCHES/patch-01-otftotfm-Makefile b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.83-PATCHES/patch-01-otftotfm-Makefile new file mode 100644 index 00000000000..be454bf7d99 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.83-PATCHES/patch-01-otftotfm-Makefile @@ -0,0 +1,30 @@ +diff -ur -x Makefile.in -x aclocal.m4 -x config.h.in -x configure lcdf-typetools-2.83.orig/otftotfm/Makefile.am lcdf-typetools-2.83/otftotfm/Makefile.am +--- lcdf-typetools-2.83.orig/otftotfm/Makefile.am 2010-04-23 19:25:45.000000000 +0200 ++++ lcdf-typetools-2.83/otftotfm/Makefile.am 2010-04-26 20:03:08.136096771 +0200 +@@ -13,18 +13,21 @@ + secondary.cc secondary.hh \ + uniprop.cc uniprop.hh \ + util.cc util.hh +-EXTRA_otftotfm_SOURCES = kpseinterface.c kpseinterface.h + +-otftotfm_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a @KPSEINTERFACE_O@ @LIBKPATHSEA@ +-otftotfm_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a @KPSEINTERFACE_O@ @LIBKPATHSEA_DEP@ ++otftotfm_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a ++otftotfm_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a + + INCLUDES = -I$(top_srcdir)/include + CLEANFILES = @TEMPLATE_OBJS@ + + EXTRA_DIST = otftotfm.1 + +-$(top_builddir)/../../texk/kpathsea/.libs/libkpathsea.a: +- cd $(top_builddir)/../../texk/kpathsea && $(MAKE) ++if have_kpathsea ++otftotfm_SOURCES += kpseinterface.c kpseinterface.h ++INCLUDES += $(KPATHSEA_INCLUDES) ++otftotfm_LDADD += $(KPATHSEA_LIBS) ++otftotfm_DEPENDENCIES += $(KPATHSEA_DEPEND) ++endif have_kpathsea + + ## Rebuild libkpathsea in a TeX Live build + @KPATHSEA_RULE@ diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools.spec b/Build/source/texk/lcdf-typetools/lcdf-typetools.spec index 24ce1fa1aa6..1d79474cd3f 100644 --- a/Build/source/texk/lcdf-typetools/lcdf-typetools.spec +++ b/Build/source/texk/lcdf-typetools/lcdf-typetools.spec @@ -1,6 +1,6 @@ Summary: Programs to manipulate OpenType and multiple-master fonts Name: lcdf-typetools -Version: 2.79 +Version: 2.83 Copyright: GPL Vendor: Little Cambridgeport Design Factory <http://www.lcdf.org/> Group: Utilities/Printing diff --git a/Build/source/texk/lcdf-typetools/libefont/Makefile.am b/Build/source/texk/lcdf-typetools/libefont/Makefile.am index 45b97ca269b..a967616d6f8 100644 --- a/Build/source/texk/lcdf-typetools/libefont/Makefile.am +++ b/Build/source/texk/lcdf-typetools/libefont/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + noinst_LIBRARIES = libefont.a libefont_a_SOURCES = \ @@ -39,12 +41,3 @@ libefont_a_LIBADD = @TEMPLATE_OBJS@ CLEANFILES = @TEMPLATE_OBJS@ INCLUDES = -I$(top_srcdir)/include - -srclinks: - test -d $(top_srcdir)/include || mkdir $(top_srcdir)/include - test -d $(top_srcdir)/include/efont || mkdir $(top_srcdir)/include/efont - I=../../libefont/include/efont S=../../libefont/libefont; \ - cd $(srcdir); for i in $(libefont_a_SOURCES); do \ - j=`echo $$i | sed 's/.cc$$//'`; \ - test -f $$I/$$j.hh && ln -sf ../$$I/$$j.hh ../include/efont/$$j.hh; \ - test -f $$S/$$i && ln -sf $$S/$$i $$i; done diff --git a/Build/source/texk/lcdf-typetools/libefont/Makefile.in b/Build/source/texk/lcdf-typetools/libefont/Makefile.in index 904b999bdfc..76f2332a4f6 100644 --- a/Build/source/texk/lcdf-typetools/libefont/Makefile.in +++ b/Build/source/texk/lcdf-typetools/libefont/Makefile.in @@ -127,6 +127,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -215,6 +216,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign noinst_LIBRARIES = libefont.a libefont_a_SOURCES = \ afm.cc \ @@ -560,15 +562,6 @@ uninstall-am: pdf pdf-am ps ps-am tags uninstall uninstall-am -srclinks: - test -d $(top_srcdir)/include || mkdir $(top_srcdir)/include - test -d $(top_srcdir)/include/efont || mkdir $(top_srcdir)/include/efont - I=../../libefont/include/efont S=../../libefont/libefont; \ - cd $(srcdir); for i in $(libefont_a_SOURCES); do \ - j=`echo $$i | sed 's/.cc$$//'`; \ - test -f $$I/$$j.hh && ln -sf ../$$I/$$j.hh ../include/efont/$$j.hh; \ - test -f $$S/$$i && ln -sf $$S/$$i $$i; done - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/Build/source/texk/lcdf-typetools/libefont/afm.cc b/Build/source/texk/lcdf-typetools/libefont/afm.cc index be7a7aa6cec..5a558c181c7 100644 --- a/Build/source/texk/lcdf-typetools/libefont/afm.cc +++ b/Build/source/texk/lcdf-typetools/libefont/afm.cc @@ -2,7 +2,7 @@ /* afm.{cc,hh} -- Adobe Font Metrics files * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/afmparse.cc b/Build/source/texk/lcdf-typetools/libefont/afmparse.cc index dd379689d0c..f6e2640ce57 100644 --- a/Build/source/texk/lcdf-typetools/libefont/afmparse.cc +++ b/Build/source/texk/lcdf-typetools/libefont/afmparse.cc @@ -2,7 +2,7 @@ /* afmparse.{cc,hh} -- Adobe Font Metrics parsing * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/afmw.cc b/Build/source/texk/lcdf-typetools/libefont/afmw.cc index 023fe9bea0e..0d7a4a21d95 100644 --- a/Build/source/texk/lcdf-typetools/libefont/afmw.cc +++ b/Build/source/texk/lcdf-typetools/libefont/afmw.cc @@ -2,7 +2,7 @@ /* afmw.{cc,hh} -- Adobe Font Metrics writing * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/amfm.cc b/Build/source/texk/lcdf-typetools/libefont/amfm.cc index 731fc673172..77a3d83c6a7 100644 --- a/Build/source/texk/lcdf-typetools/libefont/amfm.cc +++ b/Build/source/texk/lcdf-typetools/libefont/amfm.cc @@ -2,7 +2,7 @@ /* amfm.{cc,hh} -- Adobe Multiple-Master Font Metrics * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/cff.cc b/Build/source/texk/lcdf-typetools/libefont/cff.cc index 219f781abf4..29c950a0932 100644 --- a/Build/source/texk/lcdf-typetools/libefont/cff.cc +++ b/Build/source/texk/lcdf-typetools/libefont/cff.cc @@ -2,7 +2,7 @@ /* cff.{cc,hh} -- Compact Font Format fonts * - * Copyright (c) 1998-2007 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/encoding.cc b/Build/source/texk/lcdf-typetools/libefont/encoding.cc index ee71957874f..7547415138a 100644 --- a/Build/source/texk/lcdf-typetools/libefont/encoding.cc +++ b/Build/source/texk/lcdf-typetools/libefont/encoding.cc @@ -2,7 +2,7 @@ /* encoding.{cc,hh} -- 8-bit encodings * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/findmet.cc b/Build/source/texk/lcdf-typetools/libefont/findmet.cc index 10a39fffa93..4abf938d5fc 100644 --- a/Build/source/texk/lcdf-typetools/libefont/findmet.cc +++ b/Build/source/texk/lcdf-typetools/libefont/findmet.cc @@ -2,7 +2,7 @@ /* findmet.{cc,hh} -- find font metrics * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/metrics.cc b/Build/source/texk/lcdf-typetools/libefont/metrics.cc index e0b834ff9e2..a1d5af8a79d 100644 --- a/Build/source/texk/lcdf-typetools/libefont/metrics.cc +++ b/Build/source/texk/lcdf-typetools/libefont/metrics.cc @@ -2,7 +2,7 @@ /* metrics.{cc,hh} -- generic font metrics * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/otf.cc b/Build/source/texk/lcdf-typetools/libefont/otf.cc index 947d0de3466..414f3f6ef86 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otf.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otf.cc @@ -2,7 +2,7 @@ /* otf.{cc,hh} -- OpenType font basics * - * Copyright (c) 2002-2006 Eddie Kohler + * Copyright (c) 2002-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/otfcmap.cc b/Build/source/texk/lcdf-typetools/libefont/otfcmap.cc index 2bda5c816b5..c918d08c02a 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfcmap.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfcmap.cc @@ -2,7 +2,7 @@ /* otfcmap.{cc,hh} -- OpenType cmap table * - * Copyright (c) 2002-2006 Eddie Kohler + * Copyright (c) 2002-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/otfdata.cc b/Build/source/texk/lcdf-typetools/libefont/otfdata.cc index 9c7afee92ea..79052a716a4 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfdata.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfdata.cc @@ -2,7 +2,7 @@ /* otfdata.{cc,hh} -- OpenType bounds-checked string type * - * Copyright (c) 2003-2006 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/otfdescrip.cc b/Build/source/texk/lcdf-typetools/libefont/otfdescrip.cc index 14719db2d36..3e48f597f6c 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfdescrip.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfdescrip.cc @@ -1,6 +1,6 @@ /* otfdescrip.cc -- descriptions for OpenType tags * - * Copyright (c) 2002-2006 Eddie Kohler + * Copyright (c) 2002-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/otfgpos.cc b/Build/source/texk/lcdf-typetools/libefont/otfgpos.cc index 2e15c29a5e6..a66a4dd31f2 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfgpos.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfgpos.cc @@ -2,7 +2,7 @@ /* otfgpos.{cc,hh} -- OpenType GPOS table * - * Copyright (c) 2003-2007 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/otfgsub.cc b/Build/source/texk/lcdf-typetools/libefont/otfgsub.cc index eeb7e506800..5ecaa5209e1 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfgsub.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfgsub.cc @@ -2,7 +2,7 @@ /* otfgsub.{cc,hh} -- OpenType GSUB table * - * Copyright (c) 2003-2007 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 @@ -354,14 +354,15 @@ Substitution::is_noop() const } bool -Substitution::all_in_glyphs(Vector<Glyph> &v) const +Substitution::all_in_glyphs(Vector<Glyph> &gs) const { bool ok = true; + gs.clear(); if (_left_is != T_NONE) - ok &= extract_glyphs(_left, _left_is, v, false); - ok &= extract_glyphs(_in, _in_is, v, false); + ok &= extract_glyphs(_left, _left_is, gs, false); + ok &= extract_glyphs(_in, _in_is, gs, false); if (_right_is != T_NONE) - ok &= extract_glyphs(_right, _right_is, v, false); + ok &= extract_glyphs(_right, _right_is, gs, false); return ok; } diff --git a/Build/source/texk/lcdf-typetools/libefont/otfname.cc b/Build/source/texk/lcdf-typetools/libefont/otfname.cc index 55e161ea963..298ca0bd982 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfname.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfname.cc @@ -2,7 +2,7 @@ /* otfname.{cc,hh} -- OpenType name table * - * Copyright (c) 2003-2006 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/otfos2.cc b/Build/source/texk/lcdf-typetools/libefont/otfos2.cc index f7c5641dc8a..21d4e0cd8cb 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfos2.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfos2.cc @@ -2,7 +2,7 @@ /* otfos2.{cc,hh} -- OpenType OS/2 table * - * Copyright (c) 2005-2006 Eddie Kohler + * Copyright (c) 2005-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/otfpost.cc b/Build/source/texk/lcdf-typetools/libefont/otfpost.cc index 829ca9a199b..1497f98f059 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfpost.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfpost.cc @@ -2,7 +2,7 @@ /* otfpost.{cc,hh} -- OpenType post table * - * Copyright (c) 2006 Eddie Kohler + * Copyright (c) 2006-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/pairop.cc b/Build/source/texk/lcdf-typetools/libefont/pairop.cc index 7ec07bf8938..22b86b29a47 100644 --- a/Build/source/texk/lcdf-typetools/libefont/pairop.cc +++ b/Build/source/texk/lcdf-typetools/libefont/pairop.cc @@ -2,7 +2,7 @@ /* pairop.{cc,hh} -- ligature/kern font metrics * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/psres.cc b/Build/source/texk/lcdf-typetools/libefont/psres.cc index 48f4be7b82b..6c691317ac1 100644 --- a/Build/source/texk/lcdf-typetools/libefont/psres.cc +++ b/Build/source/texk/lcdf-typetools/libefont/psres.cc @@ -2,7 +2,7 @@ /* psres.{cc,hh} -- PSres.upr files * - * Copyright (c) 1999-2006 Eddie Kohler + * Copyright (c) 1999-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/t1bounds.cc b/Build/source/texk/lcdf-typetools/libefont/t1bounds.cc index a9cff1585cb..2e26c22303e 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1bounds.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1bounds.cc @@ -2,7 +2,7 @@ /* t1bounds.{cc,hh} -- charstring bounding box finder * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/t1cs.cc b/Build/source/texk/lcdf-typetools/libefont/t1cs.cc index 69072ff3504..d7c6652aeae 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1cs.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1cs.cc @@ -2,7 +2,7 @@ /* t1cs.{cc,hh} -- Type 1/2 charstrings * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/t1csgen.cc b/Build/source/texk/lcdf-typetools/libefont/t1csgen.cc index dc75228e4ca..ce21daa3d23 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1csgen.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1csgen.cc @@ -2,7 +2,7 @@ /* t1csgen.{cc,hh} -- Type 1 charstring generation * - * Copyright (c) 1998-2009 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/t1font.cc b/Build/source/texk/lcdf-typetools/libefont/t1font.cc index 2607718dddb..feae7914827 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1font.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1font.cc @@ -2,7 +2,7 @@ /* t1font.{cc,hh} -- Type 1 font * - * Copyright (c) 1998-2009 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/t1fontskel.cc b/Build/source/texk/lcdf-typetools/libefont/t1fontskel.cc index aededff03ae..bb591777815 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1fontskel.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1fontskel.cc @@ -1,6 +1,6 @@ /* t1fontskel.cc -- Type 1 font skeleton * - * Copyright (c) 1998-2007 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/t1interp.cc b/Build/source/texk/lcdf-typetools/libefont/t1interp.cc index c9b6995ae1f..5b093fe7c57 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1interp.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1interp.cc @@ -2,7 +2,7 @@ /* t1interp.{cc,hh} -- Type 1/2 charstring interpretation * - * Copyright (c) 1998-2009 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/t1item.cc b/Build/source/texk/lcdf-typetools/libefont/t1item.cc index 5b7171e4b3f..5fa32404093 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1item.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1item.cc @@ -2,7 +2,7 @@ /* t1item.{cc,hh} -- items in a Type 1 font * - * Copyright (c) 1998-2008 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/t1mm.cc b/Build/source/texk/lcdf-typetools/libefont/t1mm.cc index c94ba479ce3..e95a3350774 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1mm.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1mm.cc @@ -2,7 +2,7 @@ /* t1mm.{cc,hh} -- Type 1 multiple master font information * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/t1rw.cc b/Build/source/texk/lcdf-typetools/libefont/t1rw.cc index d0024d66755..c7008631b05 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1rw.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1rw.cc @@ -2,7 +2,7 @@ /* t1rw.{cc,hh} -- Type 1 font reading and writing * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/t1unparser.cc b/Build/source/texk/lcdf-typetools/libefont/t1unparser.cc index f3e788d5d94..38a22d60e06 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1unparser.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1unparser.cc @@ -2,7 +2,7 @@ /* t1unparser.{cc,hh} -- debug printing of Type 1 fonts * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/ttfcs.cc b/Build/source/texk/lcdf-typetools/libefont/ttfcs.cc index d1c25846882..c5b1d9bb437 100644 --- a/Build/source/texk/lcdf-typetools/libefont/ttfcs.cc +++ b/Build/source/texk/lcdf-typetools/libefont/ttfcs.cc @@ -2,7 +2,7 @@ /* ttfcs.{cc,hh} -- TrueType "charstring" emulation * - * Copyright (c) 2006-2007 Eddie Kohler + * Copyright (c) 2006-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/ttfhead.cc b/Build/source/texk/lcdf-typetools/libefont/ttfhead.cc index be415c1ad0d..869f9a80e4a 100644 --- a/Build/source/texk/lcdf-typetools/libefont/ttfhead.cc +++ b/Build/source/texk/lcdf-typetools/libefont/ttfhead.cc @@ -2,7 +2,7 @@ /* ttfhead.{cc,hh} -- TrueType head table * - * Copyright (c) 2007 Eddie Kohler + * Copyright (c) 2007-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/libefont/ttfkern.cc b/Build/source/texk/lcdf-typetools/libefont/ttfkern.cc index edf10732537..59cee8c30dd 100644 --- a/Build/source/texk/lcdf-typetools/libefont/ttfkern.cc +++ b/Build/source/texk/lcdf-typetools/libefont/ttfkern.cc @@ -2,7 +2,7 @@ /* ttfkern.{cc,hh} -- TrueType kern table * - * Copyright (c) 2009 Eddie Kohler + * Copyright (c) 2009-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/liblcdf/Makefile.am b/Build/source/texk/lcdf-typetools/liblcdf/Makefile.am index bae23d0ad08..bc1048edb33 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/Makefile.am +++ b/Build/source/texk/lcdf-typetools/liblcdf/Makefile.am @@ -1,11 +1,12 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + noinst_LIBRARIES = liblcdf.a liblcdf_a_SOURCES = bezier.cc \ clp.c \ error.cc \ filename.cc \ - fixlibc.c \ globmatch.cc \ landmark.cc \ md5.c \ @@ -18,26 +19,13 @@ liblcdf_a_SOURCES = bezier.cc \ transform.cc \ vectorv.cc +if FIXLIBC +liblcdf_a_SOURCES += fixlibc.c +endif FIXLIBC + liblcdf_a_LIBADD = @TEMPLATE_OBJS@ CLEANFILES = @TEMPLATE_OBJS@ INCLUDES = -I$(top_srcdir)/include -srclinks: - test -d $(top_srcdir)/include || mkdir $(top_srcdir)/include - test -d $(top_srcdir)/include/lcdf || mkdir $(top_srcdir)/include/lcdf - cd $(top_srcdir); for i in bezier error filename globmatch landmark permstr point slurper straccum string transform; do \ - ln -sf ../../liblcdf/liblcdf/$$i.cc liblcdf/$$i.cc ; \ - ln -sf ../../../liblcdf/include/lcdf/$$i.hh include/lcdf/$$i.hh ; done - cd $(top_srcdir); for i in clp strtonum md5; do \ - ln -sf ../../liblcdf/liblcdf/$$i.c liblcdf/$$i.c ; \ - ln -sf ../../../liblcdf/include/lcdf/$$i.h include/lcdf/$$i.h ; done - cd $(top_srcdir); for i in fixlibc.c vectorv.cc; do \ - ln -sf ../../liblcdf/liblcdf/$$i liblcdf/$$i ; done - cd $(top_srcdir); for i in hashmap vector; do \ - ln -sf ../../../liblcdf/include/lcdf/$$i.cc include/lcdf/$$i.cc ; \ - ln -sf ../../../liblcdf/include/lcdf/$$i.hh include/lcdf/$$i.hh ; done - cd $(top_srcdir); for i in inttypes; do \ - ln -sf ../../../liblcdf/include/lcdf/$$i.h include/lcdf/$$i.h ; done - cd $(top_srcdir); for i in hashcode; do \ - ln -sf ../../../liblcdf/include/lcdf/$$i.hh include/lcdf/$$i.hh ; done +EXTRA_DIST = fixlibc.c diff --git a/Build/source/texk/lcdf-typetools/liblcdf/Makefile.in b/Build/source/texk/lcdf-typetools/liblcdf/Makefile.in index 84e1b36f50a..3a197f9ea2d 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/Makefile.in +++ b/Build/source/texk/lcdf-typetools/liblcdf/Makefile.in @@ -34,6 +34,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@FIXLIBC_TRUE@am__append_1 = fixlibc.c subdir = liblcdf DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -59,12 +60,17 @@ LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru liblcdf_a_AR = $(AR) $(ARFLAGS) liblcdf_a_DEPENDENCIES = +am__liblcdf_a_SOURCES_DIST = bezier.cc clp.c error.cc filename.cc \ + globmatch.cc landmark.cc md5.c permstr.cc point.cc slurper.cc \ + straccum.cc string.cc strtonum.c transform.cc vectorv.cc \ + fixlibc.c +@FIXLIBC_TRUE@am__objects_1 = fixlibc.$(OBJEXT) am_liblcdf_a_OBJECTS = bezier.$(OBJEXT) clp.$(OBJEXT) error.$(OBJEXT) \ - filename.$(OBJEXT) fixlibc.$(OBJEXT) globmatch.$(OBJEXT) \ - landmark.$(OBJEXT) md5.$(OBJEXT) permstr.$(OBJEXT) \ - point.$(OBJEXT) slurper.$(OBJEXT) straccum.$(OBJEXT) \ - string.$(OBJEXT) strtonum.$(OBJEXT) transform.$(OBJEXT) \ - vectorv.$(OBJEXT) + filename.$(OBJEXT) globmatch.$(OBJEXT) landmark.$(OBJEXT) \ + md5.$(OBJEXT) permstr.$(OBJEXT) point.$(OBJEXT) \ + slurper.$(OBJEXT) straccum.$(OBJEXT) string.$(OBJEXT) \ + strtonum.$(OBJEXT) transform.$(OBJEXT) vectorv.$(OBJEXT) \ + $(am__objects_1) liblcdf_a_OBJECTS = $(am_liblcdf_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp @@ -88,7 +94,7 @@ CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(liblcdf_a_SOURCES) -DIST_SOURCES = $(liblcdf_a_SOURCES) +DIST_SOURCES = $(am__liblcdf_a_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -131,6 +137,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -219,27 +226,15 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign noinst_LIBRARIES = liblcdf.a -liblcdf_a_SOURCES = bezier.cc \ - clp.c \ - error.cc \ - filename.cc \ - fixlibc.c \ - globmatch.cc \ - landmark.cc \ - md5.c \ - permstr.cc \ - point.cc \ - slurper.cc \ - straccum.cc \ - string.cc \ - strtonum.c \ - transform.cc \ - vectorv.cc - +liblcdf_a_SOURCES = bezier.cc clp.c error.cc filename.cc globmatch.cc \ + landmark.cc md5.c permstr.cc point.cc slurper.cc straccum.cc \ + string.cc strtonum.c transform.cc vectorv.cc $(am__append_1) liblcdf_a_LIBADD = @TEMPLATE_OBJS@ CLEANFILES = @TEMPLATE_OBJS@ INCLUDES = -I$(top_srcdir)/include +EXTRA_DIST = fixlibc.c all: all-am .SUFFIXES: @@ -552,25 +547,6 @@ uninstall-am: pdf pdf-am ps ps-am tags uninstall uninstall-am -srclinks: - test -d $(top_srcdir)/include || mkdir $(top_srcdir)/include - test -d $(top_srcdir)/include/lcdf || mkdir $(top_srcdir)/include/lcdf - cd $(top_srcdir); for i in bezier error filename globmatch landmark permstr point slurper straccum string transform; do \ - ln -sf ../../liblcdf/liblcdf/$$i.cc liblcdf/$$i.cc ; \ - ln -sf ../../../liblcdf/include/lcdf/$$i.hh include/lcdf/$$i.hh ; done - cd $(top_srcdir); for i in clp strtonum md5; do \ - ln -sf ../../liblcdf/liblcdf/$$i.c liblcdf/$$i.c ; \ - ln -sf ../../../liblcdf/include/lcdf/$$i.h include/lcdf/$$i.h ; done - cd $(top_srcdir); for i in fixlibc.c vectorv.cc; do \ - ln -sf ../../liblcdf/liblcdf/$$i liblcdf/$$i ; done - cd $(top_srcdir); for i in hashmap vector; do \ - ln -sf ../../../liblcdf/include/lcdf/$$i.cc include/lcdf/$$i.cc ; \ - ln -sf ../../../liblcdf/include/lcdf/$$i.hh include/lcdf/$$i.hh ; done - cd $(top_srcdir); for i in inttypes; do \ - ln -sf ../../../liblcdf/include/lcdf/$$i.h include/lcdf/$$i.h ; done - cd $(top_srcdir); for i in hashcode; do \ - ln -sf ../../../liblcdf/include/lcdf/$$i.hh include/lcdf/$$i.hh ; done - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/Build/source/texk/lcdf-typetools/liblcdf/bezier.cc b/Build/source/texk/lcdf-typetools/liblcdf/bezier.cc index 4d874695052..d5c084e5e91 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/bezier.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/bezier.cc @@ -2,7 +2,7 @@ /* bezier.{cc,hh} -- cubic Bezier curves * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/liblcdf/clp.c b/Build/source/texk/lcdf-typetools/liblcdf/clp.c index 5b0d870e828..038faab15d2 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/clp.c +++ b/Build/source/texk/lcdf-typetools/liblcdf/clp.c @@ -2,7 +2,7 @@ /* clp.c - Complete source code for CLP. * This file is part of CLP, the command line parser package. * - * Copyright (c) 1997-2008 Eddie Kohler, ekohler@gmail.com + * Copyright (c) 1997-2010 Eddie Kohler, ekohler@gmail.com * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -393,11 +393,11 @@ compare_options(Clp_Parser *clp, const Clp_Option *o1, Clp_InternOption *io1, int short2 = (io2->ishort ? o2->short_name : -3); int shortx2 = long_as_short(cli, o2, io2, -4); if (short1 == short2) - Clp_OptionError(clp, "CLP internal error: more than 1 option has short name %`%c%'", short1); + Clp_OptionError(clp, "CLP internal error: more than 1 option has short name %<%c%>", short1); else if ((short1 == shortx2 || shortx1 == short2 || shortx1 == shortx2) && ((io1->ipos && io2->ipos && cli->long1pos) || (io1->ineg && io2->ineg && cli->long1neg))) - Clp_OptionError(clp, "CLP internal error: 1-char long name conflicts with short name %`%c%'", (short1 == shortx2 ? shortx2 : shortx1)); + Clp_OptionError(clp, "CLP internal error: 1-char long name conflicts with short name %<%c%>", (short1 == shortx2 ? shortx2 : shortx1)); } /* analyze longest minimum match */ @@ -419,7 +419,7 @@ compare_options(Clp_Parser *clp, const Clp_Option *o1, Clp_InternOption *io1, if (io2->ilong) { const char *name2 = o2->long_name + io2->ilongoff; if (strcmp(name1, name2) == 0) - Clp_OptionError(clp, "CLP internal error: duplicate long name %`%s%'", name1); + Clp_OptionError(clp, "CLP internal error: duplicate long name %<%s%>", name1); if (io1->ipos && io2->ipos && !strncmp(name1, name2, io1->lmmpos) && (!io1->iprefmatch || strncmp(name1, name2, strlen(name1)))) io1->lmmpos = min_different_chars(name1, name2); @@ -448,14 +448,14 @@ compare_options(Clp_Parser *clp, const Clp_Option *o1, Clp_InternOption *io1, * first argument returned by Clp_Next() will be the second argument in @a * argv. Note that this behavior differs from Clp_SetArguments.</li> * <li>UTF-8 support is on iff the <tt>LANG</tt> environment variable contains - * one of the substrings "UTF-8", "UTF8", or "utf8".</li> + * one of the substrings "UTF-8", "UTF8", or "utf8". Override this with + * Clp_SetUTF8().</li> * <li>The Clp_ValString, Clp_ValStringNotOption, Clp_ValInt, Clp_ValUnsigned, * Clp_ValBool, and Clp_ValDouble types are installed.</li> * <li>Errors are reported to standard error.</li> * </ul> * - * To override these characteristics, either call functions like - * Clp_SetUTF8(), or create your Clp_Parser with no arguments or options + * You may also create a Clp_Parser with no arguments or options * (<tt>Clp_NewParser(0, 0, 0, 0)</tt>) and set the arguments and options * later. * @@ -471,7 +471,9 @@ Clp_NewParser(int argc, const char * const *argv, int nopt, const Clp_Option *op Clp_Parser *clp = (Clp_Parser *)malloc(sizeof(Clp_Parser)); Clp_Internal *cli = (Clp_Internal *)malloc(sizeof(Clp_Internal)); Clp_InternOption *iopt = (Clp_InternOption *)malloc(sizeof(Clp_InternOption) * nopt); - if (!clp || !cli || !iopt) + if (cli) + cli->valtype = (Clp_ValType *)malloc(sizeof(Clp_ValType) * Clp_InitialValType); + if (!clp || !cli || !iopt || !cli->valtype) goto failed; clp->negated = 0; @@ -508,11 +510,7 @@ Clp_NewParser(int argc, const char * const *argv, int nopt, const Clp_Option *op cli->long1pos = cli->long1neg = 0; /* Add default type parsers */ - cli->valtype = (Clp_ValType *)malloc(sizeof(Clp_ValType) * Clp_InitialValType); - if (!cli->valtype) - goto failed; cli->nvaltype = 0; - Clp_AddType(clp, Clp_ValString, 0, parse_string, 0); Clp_AddType(clp, Clp_ValStringNotOption, Clp_DisallowOptions, parse_string, 0); Clp_AddType(clp, Clp_ValInt, 0, parse_int, 0); @@ -612,7 +610,14 @@ Clp_SetUTF8(Clp_Parser *clp, int utf8) return old_utf8; } -static int +/** @param clp the parser + * @param c character + * @return option character treatment + * + * Returns an integer specifying how CLP treats arguments that begin + * with character @a c. See Clp_SetOptionChar for possibilities. + */ +int Clp_OptionChar(Clp_Parser *clp, int c) { Clp_Internal *cli = clp->internal; @@ -1088,8 +1093,8 @@ parse_int(Clp_Parser *clp, const char *arg, int complain, void *user_data) return 1; else if (complain) { const char *message = user_data != 0 - ? "%`%O%' expects a nonnegative integer, not %`%s%'" - : "%`%O%' expects an integer, not %`%s%'"; + ? "%<%O%> expects a nonnegative integer, not %<%s%>" + : "%<%O%> expects an integer, not %<%s%>"; return Clp_OptionError(clp, message, arg); } else return 0; @@ -1107,7 +1112,7 @@ parse_double(Clp_Parser *clp, const char *arg, int complain, void *user_data) if (*arg != 0 && *val == 0) return 1; else if (complain) - return Clp_OptionError(clp, "%`%O%' expects a real number, not %`%s%'", arg); + return Clp_OptionError(clp, "%<%O%> expects a real number, not %<%s%>", arg); else return 0; } @@ -1139,7 +1144,7 @@ parse_bool(Clp_Parser *clp, const char *arg, int complain, void *user_data) error: if (complain) - Clp_OptionError(clp, "%`%O%' expects a true-or-false value, not %`%s%'", arg); + Clp_OptionError(clp, "%<%O%> expects a true-or-false value, not %<%s%>", arg); return 0; } @@ -1178,7 +1183,7 @@ parse_string_list(Clp_Parser *clp, const char *arg, int complain, void *user_dat } return ambiguity_error (clp, ambiguous, ambiguous_values, sl->items, sl->iopt, - "", "option %`%O%' value %`%s%' is %s", arg, complaint); + "", "option %<%O%> value %<%s%> is %s", arg, complaint); } else return 0; } @@ -1844,13 +1849,13 @@ Clp_Next(Clp_Parser *clp) if (cli->ambiguous) ambiguity_error(clp, cli->ambiguous, cli->ambiguous_values, cli->opt, cli->iopt, cli->option_chars, - "option %`%s%s%' is ambiguous", + "option %<%s%s%> is ambiguous", cli->option_chars, cli->xtext); else if (cli->is_short && !cli->could_be_short) - Clp_OptionError(clp, "unrecognized option %`%s%C%'", + Clp_OptionError(clp, "unrecognized option %<%s%C%>", cli->option_chars, cli->xtext); else - Clp_OptionError(clp, "unrecognized option %`%s%s%'", + Clp_OptionError(clp, "unrecognized option %<%s%s%>", cli->option_chars, cli->xtext); return Clp_BadOption; @@ -1865,7 +1870,7 @@ Clp_Next(Clp_Parser *clp) if (clp->negated || (!cli->iopt[optno].imandatory && !cli->iopt[optno].ioptional)) { if (clp->have_val) { - Clp_OptionError(clp, "%`%O%' can't take an argument"); + Clp_OptionError(clp, "%<%O%> can%,t take an argument"); return Clp_BadOption; } else return cli->opt[optno].option_id; @@ -1895,9 +1900,9 @@ Clp_Next(Clp_Parser *clp) int got_option = cli->xtext != 0; Clp_RestoreParser(clp, &clpsave); if (got_option) - Clp_OptionError(clp, "%`%O%' requires a non-option argument"); + Clp_OptionError(clp, "%<%O%> requires a non-option argument"); else - Clp_OptionError(clp, "%`%O%' requires an argument"); + Clp_OptionError(clp, "%<%O%> requires an argument"); return Clp_BadOption; } @@ -2116,11 +2121,14 @@ Clp_VaOptionError(Clp_Parser *clp, Clp_BuildString *bs, *bs->pos++ = '%'; break; - case '`': + case '`': /* backwards compatibility */ + case '<': append_build_string(bs, (cli->utf8 ? "\342\200\230" : "'"), -1); break; - case '\'': + case '\'': /* backwards compatibility */ + case ',': + case '>': append_build_string(bs, (cli->utf8 ? "\342\200\231" : "'"), -1); break; @@ -2185,12 +2193,15 @@ do_error(Clp_Parser *clp, Clp_BuildString *bs) * current option is defined in the Clp_Parser object itself.</dd> * <dt><tt>%%</tt></dt> * <dd>Prints a percent character.</dd> - * <dt><tt>%</tt><tt>`</tt></dt> - * <dd>In UTF-8 mode, prints a left single quote. Otherwise prints a single - * quote.</dd> - * <dt><tt>%</tt><tt>'</tt></dt> - * <dd>In UTF-8 mode, prints a right single quote. Otherwise prints a single - * quote.</dd> + * <dt><tt>%</tt><tt><</tt></dt> + * <dd>Prints an open quote string. In UTF-8 mode, prints a left single + * quote. Otherwise prints a single quote.</dd> + * <dt><tt>%</tt><tt>></tt></dt> + * <dd>Prints a closing quote string. In UTF-8 mode, prints a right single + * quote. Otherwise prints a single quote.</dd> + * <dt><tt>%</tt><tt>,</tt></dt> + * <dd>Prints an apostrophe. In UTF-8 mode, prints a right single quote. + * Otherwise prints a single quote.</dd> * </dl> * * Note that no flag characters, precision, or field width characters are diff --git a/Build/source/texk/lcdf-typetools/liblcdf/error.cc b/Build/source/texk/lcdf-typetools/liblcdf/error.cc index 236fba4833c..f04ddfaf76b 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/error.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/error.cc @@ -4,7 +4,7 @@ * Eddie Kohler * * Copyright (c) 1999-2000 Massachusetts Institute of Technology - * Copyright (c) 2001-2008 Eddie Kohler + * Copyright (c) 2001-2010 Eddie Kohler * Copyright (c) 2008 Meraki, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/Build/source/texk/lcdf-typetools/liblcdf/filename.cc b/Build/source/texk/lcdf-typetools/liblcdf/filename.cc index dd603088b05..30c2fcf1096 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/filename.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/filename.cc @@ -2,7 +2,7 @@ /* filename.{cc,hh} -- filenames * - * Copyright (c) 1999-2006 Eddie Kohler + * Copyright (c) 1999-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/liblcdf/globmatch.cc b/Build/source/texk/lcdf-typetools/liblcdf/globmatch.cc index 33b59521ecf..98ad98ed6c1 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/globmatch.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/globmatch.cc @@ -2,7 +2,7 @@ /* globmatch.{cc,hh} -- glob_match() function for shell globbing * - * Copyright (c) 2000-2006 Eddie Kohler + * Copyright (c) 2000-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/liblcdf/landmark.cc b/Build/source/texk/lcdf-typetools/liblcdf/landmark.cc index 339ae4ac98e..18bf36b5c8a 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/landmark.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/landmark.cc @@ -2,7 +2,7 @@ /* landmark.{cc,hh} -- FILE:LINE type landmarks * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/liblcdf/permstr.cc b/Build/source/texk/lcdf-typetools/liblcdf/permstr.cc index b7c1eb52d97..41fb02e64c8 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/permstr.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/permstr.cc @@ -2,7 +2,7 @@ /* permstr.{cc,hh} -- permanent strings * - * Copyright (c) 1998-2008 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/liblcdf/point.cc b/Build/source/texk/lcdf-typetools/liblcdf/point.cc index c39ff60ac77..49c375b3335 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/point.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/point.cc @@ -2,7 +2,7 @@ /* point.{cc,hh} -- 2D points * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/liblcdf/slurper.cc b/Build/source/texk/lcdf-typetools/liblcdf/slurper.cc index ec09e76a147..2d8d822edd2 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/slurper.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/slurper.cc @@ -2,7 +2,7 @@ /* slurper.{cc,hh} -- reading from files a line at a time * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/liblcdf/straccum.cc b/Build/source/texk/lcdf-typetools/liblcdf/straccum.cc index 78f8d217493..7f82fc4ef11 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/straccum.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/straccum.cc @@ -4,7 +4,7 @@ * Eddie Kohler * * Copyright (c) 1999-2000 Massachusetts Institute of Technology - * Copyright (c) 2001-2008 Eddie Kohler + * Copyright (c) 2001-2010 Eddie Kohler * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/Build/source/texk/lcdf-typetools/liblcdf/string.cc b/Build/source/texk/lcdf-typetools/liblcdf/string.cc index 0acbddd214a..f1c065f44c1 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/string.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/string.cc @@ -4,7 +4,7 @@ * Eddie Kohler * * Copyright (c) 1999-2000 Massachusetts Institute of Technology - * Copyright (c) 2001-2008 Eddie Kohler + * Copyright (c) 2001-2010 Eddie Kohler * Copyright (c) 2008 Meraki, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/Build/source/texk/lcdf-typetools/liblcdf/transform.cc b/Build/source/texk/lcdf-typetools/liblcdf/transform.cc index d8b58a02d08..b8b4b123379 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/transform.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/transform.cc @@ -2,7 +2,7 @@ /* transform.{cc,hh} -- planar affine transformations * - * Copyright (c) 2000-2006 Eddie Kohler + * Copyright (c) 2000-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/mmafm/Makefile.am b/Build/source/texk/lcdf-typetools/mmafm/Makefile.am index 7a5fc397a20..4d535e5cfbd 100644 --- a/Build/source/texk/lcdf-typetools/mmafm/Makefile.am +++ b/Build/source/texk/lcdf-typetools/mmafm/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = mmafm man_MANS = mmafm.1 diff --git a/Build/source/texk/lcdf-typetools/mmafm/Makefile.in b/Build/source/texk/lcdf-typetools/mmafm/Makefile.in index 5f854a10dba..c2c355c3e07 100644 --- a/Build/source/texk/lcdf-typetools/mmafm/Makefile.in +++ b/Build/source/texk/lcdf-typetools/mmafm/Makefile.in @@ -141,6 +141,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -229,6 +230,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign man_MANS = mmafm.1 mmafm_SOURCES = main.cc mmafm_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a diff --git a/Build/source/texk/lcdf-typetools/mmafm/main.cc b/Build/source/texk/lcdf-typetools/mmafm/main.cc index 655e60e30c8..7b7e5b3544d 100644 --- a/Build/source/texk/lcdf-typetools/mmafm/main.cc +++ b/Build/source/texk/lcdf-typetools/mmafm/main.cc @@ -1,6 +1,6 @@ /* main.cc -- driver for mmafm program * - * Copyright (c) 1997-2009 Eddie Kohler + * Copyright (c) 1997-2010 Eddie Kohler * * 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 @@ -322,7 +322,7 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("mmafm (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 1997-2009 Eddie Kohler\n\ + printf("Copyright (C) 1997-2010 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); diff --git a/Build/source/texk/lcdf-typetools/mmafm/mmafm.1 b/Build/source/texk/lcdf-typetools/mmafm/mmafm.1 index 304c2750d86..df5db5618a1 100644 --- a/Build/source/texk/lcdf-typetools/mmafm/mmafm.1 +++ b/Build/source/texk/lcdf-typetools/mmafm/mmafm.1 @@ -1,5 +1,5 @@ .\" -*-nroff-*- -.ds V 2.79 +.ds V 2.83 .de M .BR "\\$1" "(\\$2)\\$3" .. diff --git a/Build/source/texk/lcdf-typetools/mmpfb/Makefile.am b/Build/source/texk/lcdf-typetools/mmpfb/Makefile.am index 18b00d4dae6..5d579edca5c 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/Makefile.am +++ b/Build/source/texk/lcdf-typetools/mmpfb/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = mmpfb man_MANS = mmpfb.1 diff --git a/Build/source/texk/lcdf-typetools/mmpfb/Makefile.in b/Build/source/texk/lcdf-typetools/mmpfb/Makefile.in index f176cc24ac4..16af843b836 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/Makefile.in +++ b/Build/source/texk/lcdf-typetools/mmpfb/Makefile.in @@ -151,6 +151,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -239,6 +240,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign man_MANS = mmpfb.1 mmpfb_SOURCES = myfont.cc myfont.hh \ main.cc \ diff --git a/Build/source/texk/lcdf-typetools/mmpfb/main.cc b/Build/source/texk/lcdf-typetools/mmpfb/main.cc index d12798727fa..f84b6b0685e 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/main.cc +++ b/Build/source/texk/lcdf-typetools/mmpfb/main.cc @@ -1,6 +1,6 @@ /* main.cc -- driver for mmpfb program * - * Copyright (c) 1997-2009 Eddie Kohler + * Copyright (c) 1997-2010 Eddie Kohler * * 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 @@ -355,7 +355,7 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("mmpfb (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 1997-2009 Eddie Kohler\n\ + printf("Copyright (C) 1997-2010 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); diff --git a/Build/source/texk/lcdf-typetools/mmpfb/mmpfb.1 b/Build/source/texk/lcdf-typetools/mmpfb/mmpfb.1 index 9ad0fdadc12..9d8e1e28757 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/mmpfb.1 +++ b/Build/source/texk/lcdf-typetools/mmpfb/mmpfb.1 @@ -1,5 +1,5 @@ .\" -*-nroff-*- -.ds V 2.79 +.ds V 2.83 .de M .BR "\\$1" "(\\$2)\\$3" .. diff --git a/Build/source/texk/lcdf-typetools/mmpfb/myfont.cc b/Build/source/texk/lcdf-typetools/mmpfb/myfont.cc index 3d0119e230e..5caaa584976 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/myfont.cc +++ b/Build/source/texk/lcdf-typetools/mmpfb/myfont.cc @@ -1,6 +1,6 @@ /* myfont.cc -- general multiple- to single-master conversion * - * Copyright (c) 1997-2006 Eddie Kohler + * Copyright (c) 1997-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/mmpfb/t1minimize.cc b/Build/source/texk/lcdf-typetools/mmpfb/t1minimize.cc index 02d3d16aac5..7ceecf1d9cb 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/t1minimize.cc +++ b/Build/source/texk/lcdf-typetools/mmpfb/t1minimize.cc @@ -1,6 +1,6 @@ /* t1minimize.cc -- make minimal copy of a Type 1 font * - * Copyright (c) 2003-2006 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/mmpfb/t1rewrit.cc b/Build/source/texk/lcdf-typetools/mmpfb/t1rewrit.cc index e1216c69c1f..22f35440213 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/t1rewrit.cc +++ b/Build/source/texk/lcdf-typetools/mmpfb/t1rewrit.cc @@ -1,6 +1,6 @@ /* t1rewrit.cc -- routines for multiple- to single-master charstring conversion * - * Copyright (c) 1997-2009 Eddie Kohler + * Copyright (c) 1997-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/otfinfo/Makefile.am b/Build/source/texk/lcdf-typetools/otfinfo/Makefile.am index 3e95e338f3a..c1541be0c33 100644 --- a/Build/source/texk/lcdf-typetools/otfinfo/Makefile.am +++ b/Build/source/texk/lcdf-typetools/otfinfo/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = otfinfo man_MANS = otfinfo.1 diff --git a/Build/source/texk/lcdf-typetools/otfinfo/Makefile.in b/Build/source/texk/lcdf-typetools/otfinfo/Makefile.in index 30da9ba2b6d..db1cefea9ce 100644 --- a/Build/source/texk/lcdf-typetools/otfinfo/Makefile.in +++ b/Build/source/texk/lcdf-typetools/otfinfo/Makefile.in @@ -140,6 +140,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -228,6 +229,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign man_MANS = otfinfo.1 otfinfo_SOURCES = \ otfinfo.cc diff --git a/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.1 b/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.1 index 5d13b8c1df9..2a5c9724da4 100644 --- a/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.1 +++ b/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.1 @@ -1,5 +1,5 @@ '\"t -.ds V 2.79 +.ds V 2.83 .de M .BR "\\$1" "(\\$2)\\$3" .. diff --git a/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.cc b/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.cc index ee1a1320039..584824295a8 100644 --- a/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.cc +++ b/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.cc @@ -1,6 +1,6 @@ /* otfinfo.cc -- driver for reporting information about OpenType fonts * - * Copyright (c) 2003-2009 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 @@ -537,7 +537,7 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("otfinfo (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 2003-2009 Eddie Kohler\n\ + printf("Copyright (C) 2003-2010 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); diff --git a/Build/source/texk/lcdf-typetools/otftotfm/Makefile.am b/Build/source/texk/lcdf-typetools/otftotfm/Makefile.am index 0a8a66a4ef8..09af4e1376c 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/Makefile.am +++ b/Build/source/texk/lcdf-typetools/otftotfm/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = otftotfm man_MANS = otftotfm.1 @@ -18,6 +20,8 @@ otftotfm_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a INCLUDES = -I$(top_srcdir)/include CLEANFILES = @TEMPLATE_OBJS@ +EXTRA_DIST = otftotfm.1 + if have_kpathsea otftotfm_SOURCES += kpseinterface.c kpseinterface.h INCLUDES += $(KPATHSEA_INCLUDES) @@ -25,7 +29,5 @@ otftotfm_LDADD += $(KPATHSEA_LIBS) otftotfm_DEPENDENCIES += $(KPATHSEA_DEPEND) endif have_kpathsea -EXTRA_DIST = otftotfm.1 - -## Rebuild libkpathsea +## Rebuild libkpathsea in a TeX Live build @KPATHSEA_RULE@ diff --git a/Build/source/texk/lcdf-typetools/otftotfm/Makefile.in b/Build/source/texk/lcdf-typetools/otftotfm/Makefile.in index e60bfa9b130..c54586100dd 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/Makefile.in +++ b/Build/source/texk/lcdf-typetools/otftotfm/Makefile.in @@ -164,6 +164,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -252,6 +253,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign man_MANS = otftotfm.1 otftotfm_SOURCES = automatic.cc automatic.hh dvipsencoding.cc \ dvipsencoding.hh glyphfilter.cc glyphfilter.hh metrics.cc \ diff --git a/Build/source/texk/lcdf-typetools/otftotfm/automatic.cc b/Build/source/texk/lcdf-typetools/otftotfm/automatic.cc index 35b3e92a081..ad303d690a2 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/automatic.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/automatic.cc @@ -1,6 +1,6 @@ /* automatic.{cc,hh} -- code for automatic mode and interfacing with kpathsea * - * Copyright (c) 2003-2009 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 @@ -339,6 +339,8 @@ set_map_file(const String &s) String installed_type1(const String &otf_filename, const String &ps_fontname, bool allow_generate, ErrorHandler *errh) { + (void) otf_filename, (void) allow_generate, (void) errh; + if (!ps_fontname) return String(); @@ -391,6 +393,8 @@ installed_type1(const String &otf_filename, const String &ps_fontname, bool allo String installed_type1_dotlessj(const String &otf_filename, const String &ps_fontname, bool allow_generate, ErrorHandler *errh) { + (void) otf_filename, (void) allow_generate, (void) errh; + if (!ps_fontname) return String(); if (verbose) @@ -451,12 +455,12 @@ installed_type1_dotlessj(const String &otf_filename, const String &ps_fontname, } String -installed_truetype(const String &otf_filename, bool allow_generate, ErrorHandler *errh) +installed_truetype(const String &ttf_filename, bool allow_generate, ErrorHandler *errh) { - String file = pathname_filename(otf_filename); + String file = pathname_filename(ttf_filename); #if HAVE_KPATHSEA - if (!(force && allow_generate && otf_filename && otf_filename != "-" && getodir(O_TRUETYPE, errh))) { + if (!(force && allow_generate && ttf_filename && ttf_filename != "-" && getodir(O_TRUETYPE, errh))) { if (String path = kpsei_string(kpsei_find_file(file.c_str(), KPSEI_FMT_TRUETYPE))) { if (path == "./" + file || path == file) { if (verbose) @@ -471,14 +475,14 @@ installed_truetype(const String &otf_filename, bool allow_generate, ErrorHandler #endif // perhaps generate type 42 in the future, for now just copy - if (allow_generate && otf_filename && otf_filename != "-" && getodir(O_TRUETYPE, errh)) { + if (allow_generate && ttf_filename && ttf_filename != "-" && getodir(O_TRUETYPE, errh)) { String ttf_filename = odir[O_TRUETYPE] + "/" + file; if (ttf_filename.find_left('\'') >= 0 || ttf_filename.find_left('\"') >= 0) return String(); int retval; - if (!same_filename(otf_filename, ttf_filename)) { - String command = "cp " + shell_quote(otf_filename) + " " + shell_quote(ttf_filename); + if (!same_filename(ttf_filename, ttf_filename)) { + String command = "cp " + shell_quote(ttf_filename) + " " + shell_quote(ttf_filename); retval = mysystem(command.c_str(), errh); if (retval == 127) errh->error("could not run %<%s%>", command.c_str()); @@ -488,7 +492,7 @@ installed_truetype(const String &otf_filename, bool allow_generate, ErrorHandler errh->error("%<%s%> failed", command.c_str()); } else { if (verbose) - errh->message("TrueType file %s already located in output directory", otf_filename.c_str()); + errh->message("TrueType file %s already located in output directory", ttf_filename.c_str()); retval = 0; } @@ -501,6 +505,59 @@ installed_truetype(const String &otf_filename, bool allow_generate, ErrorHandler return String(); } +String +installed_type42(const String &ttf_filename, const String &ps_fontname, bool allow_generate, ErrorHandler *errh) +{ + (void) allow_generate, (void) ttf_filename, (void) errh; + + if (!ps_fontname) + return String(); + +#if HAVE_KPATHSEA +# if HAVE_AUTO_TTFTOTYPE42 + if (!(force && allow_generate && ttf_filename && ttf_filename != "-" && getodir(O_TYPE42, errh))) { +# endif + // look for .pfb and .pfa + String file, path; + if ((file = ps_fontname + ".t42", path = kpsei_string(kpsei_find_file(file.c_str(), KPSEI_FMT_TYPE42)))) { + if (path == "./" + file || path == file) { + if (verbose) + errh->message("ignoring Type 42 file %s found with kpathsea in %<.%>", path.c_str()); + } else { + if (verbose) + errh->message("Type 42 file %s found with kpathsea at %s", file.c_str(), path.c_str()); + return path; + } + } +# if HAVE_AUTO_TTFTOTYPE42 + } +# endif +#endif + +#if HAVE_AUTO_TTFTOTYPE42 + // if not found, and can generate on the fly, run cfftot1 + if (allow_generate && ttf_filename && ttf_filename != "-" && getodir(O_TYPE42, errh)) { + String t42_filename = odir[O_TYPE42] + "/" + ps_fontname + ".t42"; + if (t42_filename.find_left('\'') >= 0 || ttf_filename.find_left('\'') >= 0) + return String(); + String command = "ttftotype42 " + shell_quote(ttf_filename) + " " + shell_quote(t42_filename); + int retval = mysystem(command.c_str(), errh); + if (retval == 127) + errh->error("could not run %<%s%>", command.c_str()); + else if (retval < 0) + errh->error("could not run %<%s%>: %s", command.c_str(), strerror(errno)); + else if (retval != 0) + errh->error("%<%s%> failed", command.c_str()); + if (retval == 0) { + update_odir(O_TYPE42, t42_filename, errh); + return t42_filename; + } + } +#endif + + return String(); +} + int update_autofont_map(const String &fontname, String mapline, ErrorHandler *errh) { diff --git a/Build/source/texk/lcdf-typetools/otftotfm/automatic.hh b/Build/source/texk/lcdf-typetools/otftotfm/automatic.hh index 5bd8d04a974..4c973347715 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/automatic.hh +++ b/Build/source/texk/lcdf-typetools/otftotfm/automatic.hh @@ -17,7 +17,8 @@ const char *odirname(int o); void update_odir(int o, String file, ErrorHandler *); String installed_type1(const String &otf_filename, const String &ps_fontname, bool allow_generate, ErrorHandler *); String installed_type1_dotlessj(const String &otf_filename, const String &ps_fontname, bool allow_generate, ErrorHandler *); -String installed_truetype(const String &otf_filename, bool allow_generate, ErrorHandler *errh); +String installed_truetype(const String &ttf_filename, bool allow_generate, ErrorHandler *errh); +String installed_type42(const String &ttf_filename, const String &ps_fontname, bool allow_generate, ErrorHandler *errh); int update_autofont_map(const String &fontname, String mapline, ErrorHandler *); String locate_encoding(String encfile, ErrorHandler *, bool literal = false); diff --git a/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.cc b/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.cc index 7dc8f561d31..0575c665225 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.cc @@ -1,6 +1,6 @@ /* dvipsencoding.{cc,hh} -- store a DVIPS encoding * - * Copyright (c) 2003-2008 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/otftotfm/glyphfilter.cc b/Build/source/texk/lcdf-typetools/otftotfm/glyphfilter.cc index f7d2ec5d0ea..1e9ba03d27e 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/glyphfilter.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/glyphfilter.cc @@ -1,6 +1,6 @@ /* glyphfilter.{cc,hh} -- define subsets of characters * - * Copyright (c) 2004-2006 Eddie Kohler + * Copyright (c) 2004-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/otftotfm/kpseinterface.c b/Build/source/texk/lcdf-typetools/otftotfm/kpseinterface.c index 586c23e5f07..0df5c25ed00 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/kpseinterface.c +++ b/Build/source/texk/lcdf-typetools/otftotfm/kpseinterface.c @@ -1,6 +1,6 @@ /* kpseinterface.{c,h} -- interface with the kpathsea library * - * Copyright (c) 2003-2006 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/otftotfm/metrics.cc b/Build/source/texk/lcdf-typetools/otftotfm/metrics.cc index 5d76691d3d3..5d2ac48fc84 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/metrics.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/metrics.cc @@ -1,6 +1,6 @@ /* metrics.{cc,hh} -- an encoding during and after OpenType features * - * Copyright (c) 2003-2008 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 @@ -121,15 +121,15 @@ Metrics::unicode_encoding(uint32_t uni) const } Metrics::Code -Metrics::hard_encoding(Glyph g) const +Metrics::hard_encoding(Glyph g, Code after) const { if (g < 0) return -1; int answer = -1, n = 0; - for (int i = _encoding.size() - 1; i >= 0; i--) + for (int i = _encoding.size() - 1; i >= after; i--) if (_encoding[i].glyph == g) answer = i, n++; - if (n < 2) { + if (n < 2 && after == 0) { if (g >= _emap.size()) _emap.resize(g + 1, -2); _emap[g] = answer; @@ -141,7 +141,7 @@ Metrics::Code Metrics::force_encoding(Glyph g, int lookup_source) { assert(g >= 0); - int e = encoding(g); + int e = encoding(g, 0); if (e >= 0) return e; else { @@ -469,8 +469,7 @@ Metrics::add_single_positioning(Code c, int pdx, int pdy, int adx) /*****************************************************************************/ /* changed_context structure */ -namespace { -class ChangedContext { public: +class Metrics::ChangedContext { public: ChangedContext(int ncodes); ~ChangedContext(); typedef Metrics::Code Code; @@ -491,12 +490,12 @@ class ChangedContext { public: inline void ensure_all(Code) const; }; -ChangedContext::ChangedContext(int ncodes) +Metrics::ChangedContext::ChangedContext(int ncodes) : _v(ncodes, 0), _initial_ncodes(ncodes), _all_sentinel(((ncodes - 1) >> 5) + 1, 0xFFFFFFFFU) { } -ChangedContext::~ChangedContext() +Metrics::ChangedContext::~ChangedContext() { for (Vector<uint32_t> **v = _v.begin(); v != _v.end(); v++) if (*v != &_all_sentinel) @@ -504,14 +503,14 @@ ChangedContext::~ChangedContext() } inline void -ChangedContext::ensure_all(Code c) const +Metrics::ChangedContext::ensure_all(Code c) const { if (c >= 0 && (c >> 5) >= _all_sentinel.size()) _all_sentinel.resize((c >> 5) + 1, 0xFFFFFFFFU); } inline bool -ChangedContext::bit(const Vector<uint32_t> &v, Code c) +Metrics::ChangedContext::bit(const Vector<uint32_t> &v, Code c) { if (c < 0 || (c >> 5) >= v.size()) return false; @@ -520,7 +519,7 @@ ChangedContext::bit(const Vector<uint32_t> &v, Code c) } bool -ChangedContext::allowed(Code c, bool left_context) const +Metrics::ChangedContext::allowed(Code c, bool left_context) const { if (c < 0) return false; @@ -531,7 +530,7 @@ ChangedContext::allowed(Code c, bool left_context) const } bool -ChangedContext::pair_allowed(Code c1, Code c2) const +Metrics::ChangedContext::pair_allowed(Code c1, Code c2) const { ensure_all(c2); if (c1 < 0 || c2 < 0) @@ -543,13 +542,13 @@ ChangedContext::pair_allowed(Code c1, Code c2) const } bool -ChangedContext::virgin(Code c) const +Metrics::ChangedContext::virgin(Code c) const { return (c >= 0 && (c >= _v.size() || _v[c] == 0)); } void -ChangedContext::disallow(Code c) +Metrics::ChangedContext::disallow(Code c) { assert(c >= 0); if (c >= _v.size()) @@ -561,7 +560,7 @@ ChangedContext::disallow(Code c) } void -ChangedContext::disallow_pair(Code c1, Code c2) +Metrics::ChangedContext::disallow_pair(Code c1, Code c2) { assert(c1 >= 0 && c2 >= 0); if (c1 >= _v.size()) @@ -575,13 +574,57 @@ ChangedContext::disallow_pair(Code c1, Code c2) } } -} - /*****************************************************************************/ /* applying GSUB substitutions */ void +Metrics::apply_single(Code cin, const Substitution *s, int lookup, + ChangedContext &ctx, const GlyphFilter &glyph_filter, + const Vector<PermString> &glyph_names) +{ + // check if encoded + if (!ctx.allowed(cin, false)) + /* not encoded before this substitution began, or completely changed; + ingore */ + return; + + // check if substitution of this code allowed + if (!glyph_filter.allow_substitution(s->in_glyph(), glyph_names, unicode(cin))) + return; + + // look for an allowed alternate + Glyph out = -1; + for (int i = 0; out < 0 && i < s->out_nglyphs(); i++) + if (glyph_filter.allow_alternate(s->out_glyph(i), glyph_names, unicode(cin))) + out = s->out_glyph(i); + if (out < 0) // no allowed alternate + return; + + // apply substitution + if (ctx.virgin(cin)) { + // no one has changed this glyph yet, change it unilaterally + assign_emap(s->in_glyph(), -2); + assign_emap(out, cin); + assert(!_encoding[cin].virtual_char); + _encoding[cin].glyph = out; + } else { + // some contextual substitutions have changed this glyph, add + // contextual substitutions for the remaining possibilities + Code cout = force_encoding(out, lookup); + for (Code right = 0; right < _encoding.size(); right++) + if (_encoding[right].visible() && !_encoding[right].flag(Char::BUILT) && ctx.pair_allowed(cin, right)) { + Code pair = pair_code(cout, right, lookup); + _encoding[cout].flags &= ~Char::INTERMEDIATE; + add_ligature(cin, right, pair); + } + } + + // no more substitutions for cin + ctx.disallow(cin); +} + +void Metrics::apply_ligature(const Vector<Code> &in, const Substitution *s, int lookup) { // build up the character pair @@ -622,91 +665,77 @@ Metrics::apply_ligature(const Vector<Code> &in, const Substitution *s, int looku repoint_ligature(ch - _encoding.begin(), l, cout); } +void +Metrics::apply_simple_context_ligature(const Vector<Code> &codes, + const Substitution *s, int lookup, ChangedContext &ctx) +{ + int nleft = s->left_nglyphs(), nin = s->in_nglyphs(); + assert(codes.size() >= 2); + + // check if context allows substitutions + for (const Code *inp = codes.begin(); inp < codes.end(); ++inp) + if (!ctx.allowed(*inp, inp - codes.begin() < nleft)) + return; + + // check if any part of the combination has already changed + int ncheck = nleft + (nin > 2 ? 2 : nin); + if (ncheck == codes.size()) + --ncheck; + for (const Code *inp = codes.begin(); inp < codes.begin() + ncheck; ++inp) + if (!ctx.pair_allowed(inp[0], inp[1])) + return; + + // mark this combination as changed if appropriate + if (codes.size() == 2 && nin == 1) + ctx.disallow_pair(codes[0], codes[1]); + + // actually apply ligature + apply_ligature(codes, s, lookup); +} + +bool +Metrics::next_encoding(Vector<Code> &codes, const Vector<Glyph> &glyphs) const +{ + if (!codes.size()) { + codes.assign(glyphs.size(), 0); + for (int i = 0; i < glyphs.size(); ++i) + if ((codes[i] = encoding(glyphs[i], 0)) < 0) + return false; + return true; + } else { + for (int i = 0; i < glyphs.size(); ++i) + if ((codes[i] = encoding(glyphs[i], codes[i] + 1)) >= 0) + return true; + else + codes[i] = encoding(glyphs[i], 0); + return false; + } +} + int Metrics::apply(const Vector<Substitution>& sv, bool allow_single, int lookup, const GlyphFilter& glyph_filter, const Vector<PermString>& glyph_names) { + Vector<Glyph> glyphs; + Vector<Code> codes; + // keep track of what substitutions we have performed ChangedContext ctx(_encoding.size()); - // XXX does not handle multiply-encoded glyphs - // loop over substitutions int failures = 0; for (const Substitution *s = sv.begin(); s != sv.end(); s++) { bool is_single = s->is_single() || s->is_alternate(); - if (is_single && allow_single) { - // check if encoded - Code cin = encoding(s->in_glyph()); - if (!ctx.allowed(cin, false)) - /* not encoded before this substitution began, or completely - changed; ingore */ - continue; - - // check if substitution of this code allowed - if (!glyph_filter.allow_substitution(s->in_glyph(), glyph_names, unicode(cin))) - continue; - - // look for an allowed alternate - Glyph out = -1; - for (int i = 0; out < 0 && i < s->out_nglyphs(); i++) - if (glyph_filter.allow_alternate(s->out_glyph(i), glyph_names, unicode(cin))) - out = s->out_glyph(i); - if (out < 0) // no allowed alternate - continue; - - // apply substitution - if (ctx.virgin(cin)) { - // no one has changed this glyph yet, change it unilaterally - assign_emap(s->in_glyph(), -2); - assign_emap(out, cin); - assert(!_encoding[cin].virtual_char); - _encoding[cin].glyph = out; - ctx.disallow(cin); - } else { - // some contextual substitutions have changed this glyph, add - // contextual substitutions for the remaining possibilities - Code cout = force_encoding(out, lookup); - for (Code right = 0; right < _encoding.size(); right++) - if (_encoding[right].visible() && !_encoding[right].flag(Char::BUILT) && ctx.pair_allowed(cin, right)) { - Code pair = pair_code(cout, right, lookup); - _encoding[cout].flags &= ~Char::INTERMEDIATE; - add_ligature(cin, right, pair); - } - ctx.disallow(cin); - } - - } else if (!is_single && !s->is_multiple() && s->is_simple_context()) { - // find a list of 'in' codes - Vector<Code> in; - s->all_in_glyphs(in); - int nleft = s->left_nglyphs(), nin = s->in_nglyphs(); - assert(in.size() >= 2); - bool ok = true; - for (Glyph *inp = in.begin(); inp < in.end(); inp++) { - *inp = encoding(*inp); - if (!ctx.allowed(*inp, inp - in.begin() < nleft)) - ok = false; + bool is_apply_single = is_single && allow_single; + bool is_apply_simple_context_ligature = !is_single && !s->is_multiple() && s->is_simple_context(); + + if (is_apply_single || is_apply_simple_context_ligature) { + s->all_in_glyphs(glyphs); + for (codes.clear(); next_encoding(codes, glyphs); ) { + if (is_apply_single) + apply_single(codes[0], s, lookup, ctx, glyph_filter, glyph_names); + else + apply_simple_context_ligature(codes, s, lookup, ctx); } - - // check if any part of the combination has already changed - int ncheck = nleft + (nin > 2 ? 2 : nin); - if (ncheck == in.size()) - ncheck--; - for (Code *inp = in.begin(); inp < in.begin() + ncheck; inp++) - if (!ctx.pair_allowed(inp[0], inp[1])) - ok = false; - - // if not ok, continue - if (!ok) - continue; - - // mark this combination as changed if appropriate - if (in.size() == 2 && nin == 1) - ctx.disallow_pair(in[0], in[1]); - - // actually apply ligature - apply_ligature(in, s, lookup); - } else failures++; } @@ -715,52 +744,65 @@ Metrics::apply(const Vector<Substitution>& sv, bool allow_single, int lookup, co } void -Metrics::apply_alternates(const Vector<Substitution>& sv, int lookup, const GlyphFilter& glyph_filter, const Vector<PermString>& glyph_names) +Metrics::apply_alternates_single(Code cin, const Substitution *s, int lookup, + const GlyphFilter &glyph_filter, + const Vector<PermString> &glyph_names) { - for (const Substitution *s = sv.begin(); s != sv.end(); s++) - if (s->is_single() || s->is_alternate()) { - Code e = encoding(s->in_glyph()); - if (e < 0) - continue; - for (const Kern *as = _altselectors.begin(); as != _altselectors.end(); as++) - if (as->kern == 0) { - Code last = e; - for (int i = 0; i < s->out_nglyphs(); i++) - if (glyph_filter.allow_alternate(s->out_glyph(i), glyph_names, unicode(e))) { - Code out = force_encoding(s->out_glyph(i), lookup); - add_ligature(last, as->in2, out); - last = out; - } - } else if (as->kern <= s->out_nglyphs()) { - Code out = force_encoding(s->out_glyph(as->kern - 1), lookup); - add_ligature(e, as->in2, out); - } - } else if (s->is_ligature()) { - // check whether the output character is allowed - bool ok = true; - if (!glyph_filter.allow_alternate(s->out_glyph(), glyph_names, 0)) - ok = false; - - // check whether the input characters are encoded - Vector<Code> in(s->in_nglyphs() + 1, 0); - if (ok && (in[0] = encoding(s->in_glyph(0))) < 0) - ok = false; - for (int i = 1; ok && i < s->in_nglyphs(); i++) - if ((in[i+1] = encoding(s->in_glyph(i))) < 0) - ok = false; - - if (!ok) - continue; - - // find alternate selector and apply ligature if appropriate - for (const Kern *as = _altselectors.begin(); as != _altselectors.end(); as++) - if (as->kern == 0) { - in[1] = as->in2; - apply_ligature(in, s, lookup); + for (const Kern *as = _altselectors.begin(); as != _altselectors.end(); as++) + if (as->kern == 0) { + Code last = cin; + uint32_t u = unicode(cin); + for (int i = 0; i < s->out_nglyphs(); i++) + if (glyph_filter.allow_alternate(s->out_glyph(i), glyph_names, u)) { + Code out = force_encoding(s->out_glyph(i), lookup); + add_ligature(last, as->in2, out); + last = out; } + } else if (as->kern <= s->out_nglyphs()) { + Code out = force_encoding(s->out_glyph(as->kern - 1), lookup); + add_ligature(cin, as->in2, out); } } +void +Metrics::apply_alternates_ligature(const Vector<Code> &codes, + const Substitution *s, int lookup, + const GlyphFilter &glyph_filter, + const Vector<PermString> &glyph_names) +{ + // check whether the output character is allowed + if (!glyph_filter.allow_alternate(s->out_glyph(), glyph_names, 0)) + return; + + // find alternate selector and apply ligature if appropriate + for (const Kern *as = _altselectors.begin(); as != _altselectors.end(); as++) + if (as->kern == 0) { + Vector<Code> lig(codes); + lig.insert(lig.begin() + 1, as->in2); + apply_ligature(lig, s, lookup); + } +} + +void +Metrics::apply_alternates(const Vector<Substitution>& sv, int lookup, const GlyphFilter& glyph_filter, const Vector<PermString>& glyph_names) +{ + Vector<Glyph> glyphs; + Vector<Code> codes; + + for (const Substitution *s = sv.begin(); s != sv.end(); s++) { + bool is_single = s->is_single() || s->is_alternate(); + if (is_single || s->is_ligature()) { + s->all_in_glyphs(glyphs); + for (codes.clear(); next_encoding(codes, glyphs); ) { + if (is_single) + apply_alternates_single(codes[0], s, lookup, glyph_filter, glyph_names); + else + apply_alternates_ligature(codes, s, lookup, glyph_filter, glyph_names); + } + } + } +} + /*****************************************************************************/ /* applying GPOS positionings */ @@ -786,28 +828,29 @@ Metrics::apply(const Vector<Positioning>& pv) // keep track of what substitutions we have performed int *single_changed = 0; Vector<int *> pair_changed(_encoding.size(), 0); - - // XXX does not handle multiply-encoded glyphs + Vector<Glyph> glyphs; + Vector<Code> codes; // loop over substitutions int success = 0; - for (const Positioning *p = pv.begin(); p != pv.end(); p++) - if (p->is_pairkern()) { - int code1 = encoding(p->left_glyph()); - int code2 = encoding(p->right_glyph()); - if (code1 >= 0 && code2 >= 0 - && !assign_bitvec(pair_changed[code1], code2, _encoding.size())) - add_kern(code1, code2, p->left().adx); - success++; - } else if (p->is_single()) { - int code = encoding(p->left_glyph()); - if (code >= 0 && !assign_bitvec(single_changed, code, _encoding.size())) { - _encoding[code].pdx += p->left().pdx; - _encoding[code].pdy += p->left().pdy; - _encoding[code].adx += p->left().adx; - } + for (const Positioning *p = pv.begin(); p != pv.end(); p++) { + bool is_single = p->is_single(); + if (is_single || p->is_pairkern()) { + p->all_in_glyphs(glyphs); + for (codes.clear(); next_encoding(codes, glyphs); ) + if (is_single) { + if (!assign_bitvec(single_changed, codes[0], _encoding.size())) { + _encoding[codes[0]].pdx += p->left().pdx; + _encoding[codes[0]].pdy += p->left().pdy; + _encoding[codes[0]].adx += p->left().adx; + } + } else { + if (!assign_bitvec(pair_changed[codes[0]], codes[1], _encoding.size())) + add_kern(codes[0], codes[1], p->left().adx); + } success++; } + } delete[] single_changed; for (int i = 0; i < pair_changed.size(); i++) diff --git a/Build/source/texk/lcdf-typetools/otftotfm/metrics.hh b/Build/source/texk/lcdf-typetools/otftotfm/metrics.hh index 06f6a25f291..b032e6b348f 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/metrics.hh +++ b/Build/source/texk/lcdf-typetools/otftotfm/metrics.hh @@ -54,12 +54,12 @@ class Metrics { public: PermString code_name(Code) const; inline const char *code_str(Code) const; - inline Glyph glyph(Code) const; - inline uint32_t unicode(Code) const; - inline Code encoding(Glyph) const; - Code unicode_encoding(uint32_t) const; - Code force_encoding(Glyph, int lookup_source = -1); - void encode(Code, uint32_t uni, Glyph); + inline Glyph glyph(Code code) const; + inline uint32_t unicode(Code code) const; + inline Code encoding(Glyph g, Code after) const; + Code unicode_encoding(uint32_t uni) const; + Code force_encoding(Glyph g, int lookup_source = -1); + void encode(Code code, uint32_t uni, Glyph g); void encode_virtual(Code, PermString, uint32_t uni, const Vector<Setting> &, bool base_char); void add_altselector_code(Code, int altselector_type); @@ -174,7 +174,8 @@ class Metrics { public: Metrics &operator=(const Metrics &); // does not exist inline void assign_emap(Glyph, Code); - Code hard_encoding(Glyph) const; + Code hard_encoding(Glyph, Code) const; + bool next_encoding(Vector<Code> &codes, const Vector<Glyph> &glyphs) const; Ligature *ligature_obj(Code, Code); Kern *kern_obj(Code, Code); @@ -186,7 +187,20 @@ class Metrics { public: void mark_liveness(int size, const Vector<Ligature3> * = 0); void reencode(const Vector<Code> &); + class ChangedContext; void apply_ligature(const Vector<Code> &, const Substitution *, int lookup); + void apply_single(Code cin, const Substitution *s, int lookup, + ChangedContext &ctx, const GlyphFilter &glyph_filter, + const Vector<PermString> &glyph_names); + void apply_simple_context_ligature(const Vector<Code> &codes, + const Substitution *s, int lookup, ChangedContext &ctx); + void apply_alternates_single(Code cin, const Substitution *s, int lookup, + const GlyphFilter &glyph_filter, + const Vector<PermString> &glyph_names); + void apply_alternates_ligature(const Vector<Code> &codes, + const Substitution *s, int lookup, + const GlyphFilter &glyph_filter, + const Vector<PermString> &glyph_names); void unparse(const Char *) const; @@ -242,12 +256,13 @@ Metrics::base_code(Code code) const } inline Metrics::Code -Metrics::encoding(Glyph g) const +Metrics::encoding(Glyph g, Code after) const { - if (g >= 0 && g < _emap.size() && _emap.at_u(g) >= -1) - return _emap.at_u(g); + Code c; + if (g >= 0 && g < _emap.size() && (c = _emap.at_u(g)) >= -1) + return c < 0 || c >= after ? c : -1; else - return hard_encoding(g); + return hard_encoding(g, after); } inline void diff --git a/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.1 b/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.1 index 1d46a440063..212f4508ba7 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.1 +++ b/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.1 @@ -1,5 +1,5 @@ '\"t -.ds V 2.79 +.ds V 2.83 .de M .BR "\\$1" "(\\$2)\\$3" .. @@ -153,17 +153,24 @@ and options. \fISignature\fR is an opaque 6-character encoding signature. .PP .B Otftotfm -also installs a font file suitable for printing. -PostScript-flavored OpenType fonts are translated to Type 1 format and -installed as PFB fonts; TrueType-flavored fonts are installed as is (pdftex -and pdflatex can read TrueType directly). However, +also installs a font file suitable for printing. PostScript-flavored +OpenType fonts are translated to Type 1 format and installed as PFB fonts. +TrueType-flavored fonts are normally installed as is, since pdftex and +pdflatex can read TrueType directly; but if you provide the +.B \-\-type42 +option, .B otftotfm -will not install a font file if one already exists. The installation paths -are as follows, where \fIPSname\fR is the font's PostScript name. +will translate TrueType fonts to Type 42 format, which dvips understands. +.B Otftotfm +does not overwrite existing font files. +.PP +The installation paths are as follows, where \fIPSname\fR is the font's +PostScript name. .TS l l l . PFB TEXMF/fonts/type1/\fIvendor\fR/\fItypeface\fR/ \fIPSname\fR.pfb TrueType TEXMF/fonts/truetype/\fIvendor\fR/\fItypeface\fR/ \fIfontfile\fR +Type 42 TEXMF/fonts/type42/\fIvendor\fR/\fItypeface\fR/ \fIPSname\fR.t42 .TE .PP You can override these directories with environment variables and options @@ -179,6 +186,7 @@ VPL VPLDESTDIR \-\-vpl\-directory encoding ENCODINGDESTDIR \-\-encoding\-directory PFB T1DESTDIR \-\-type1\-directory TrueType TRUETYPEDESTDIR \-\-truetype\-directory +Type 42 T42DESTDIR \-\-type42\-directory font map \- \-\-map\-file .TE .PP @@ -467,6 +475,27 @@ TeX "at" a particular size effectively ignores the design size; loading a font plain or "scaled" by a given factor uses the design size.) The default is taken from the input font's optical size feature, or 10pt if it has no such feature. +' +.Sp +.TP 5 +.BI \-\-fixed\-width +Set the font to fixed-width (its space character will have no stretch or +shrink). Normally you won't need this option; the font will tell +.B otftotfm +whether it is fixed width. The opposite of +.B \-\-fixed\-width +is +.BR \-\-proportional\-width . +' +.Sp +.TP 5 +.BI \-\-italic\-angle= angle +Set the output font's default italic angle to +.IR angle , +a number of degrees. This value is used by TeX to position +accents. Normally you won't need this option; the font will tell +.B otftotfm +its italic angle. .PD ' ' @@ -725,6 +754,16 @@ dotless-j. ' .Sp .TP 5 +.BI \-\-no\-truetype +Do not install TrueType-flavored fonts. +' +.Sp +.TP 5 +.BI \-\-type42 +Install TrueType-flavored fonts in translated Type 42 format. +' +.Sp +.TP 5 .BI \-\-no\-updmap Do not run an .M updmap 1 @@ -732,11 +771,6 @@ program. This can be useful if you're installing a bunch of fonts; it is much faster to run .B updmap once, at the end, than to run it once per font. -' -.Sp -.TP 5 -.BI \-\-no\-truetype -Do not install TrueType-flavored OpenType fonts. .PD ' ' @@ -821,6 +855,8 @@ Do not generate a font map line for the font. .BI \-\-type1\-directory= dir .TP 5 .BI \-\-truetype\-directory= dir +.TP 5 +.BI \-\-type42\-directory= dir Set the directory used for various output types. Each directory may be set by an environment variable, and defaults to a TDS directory in automatic mode, or to "." otherwise. Environment variable names and default TDS @@ -1575,6 +1611,7 @@ output through .M otfinfo 1 , .M t1dotlessj 1 , .M t1testpage 1 , +.M ttftotype42 1 , .M kpsewhich 1 , .M updmap 1 .LP diff --git a/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.cc b/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.cc index 7c89622e9f2..49d97241fc0 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.cc @@ -1,6 +1,6 @@ /* otftotfm.cc -- driver for translating OpenType fonts to TeX metrics * - * Copyright (c) 2003-2009 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 @@ -99,38 +99,45 @@ using namespace Efont; #define POSITION_OPT 339 #define WARN_MISSING_OPT 340 #define BASE_ENCODINGS_OPT 341 - -#define AUTOMATIC_OPT 342 -#define FONT_NAME_OPT 343 -#define QUIET_OPT 344 -#define GLYPHLIST_OPT 345 -#define VENDOR_OPT 346 -#define TYPEFACE_OPT 347 -#define NOCREATE_OPT 348 -#define VERBOSE_OPT 349 -#define FORCE_OPT 350 - -#define VIRTUAL_OPT 351 -#define PL_OPT 352 -#define TFM_OPT 353 -#define MAP_FILE_OPT 354 -#define OUTPUT_ENCODING_OPT 355 - -#define DIR_OPTS 360 +#define FIXED_PITCH_OPT 342 +#define ITALIC_ANGLE_OPT 343 +#define PROPORTIONAL_WIDTH_OPT 344 + +#define AUTOMATIC_OPT 350 +#define FONT_NAME_OPT 351 +#define QUIET_OPT 352 +#define GLYPHLIST_OPT 353 +#define VENDOR_OPT 354 +#define TYPEFACE_OPT 355 +#define NOCREATE_OPT 356 +#define VERBOSE_OPT 357 +#define FORCE_OPT 358 + +#define VIRTUAL_OPT 360 +#define PL_OPT 361 +#define TFM_OPT 362 +#define MAP_FILE_OPT 363 +#define OUTPUT_ENCODING_OPT 364 + +#define DIR_OPTS 380 #define ENCODING_DIR_OPT (DIR_OPTS + O_ENCODING) #define TFM_DIR_OPT (DIR_OPTS + O_TFM) #define PL_DIR_OPT (DIR_OPTS + O_PL) #define VF_DIR_OPT (DIR_OPTS + O_VF) #define VPL_DIR_OPT (DIR_OPTS + O_VPL) #define TYPE1_DIR_OPT (DIR_OPTS + O_TYPE1) +#define TYPE42_DIR_OPT (DIR_OPTS + O_TYPE42) #define TRUETYPE_DIR_OPT (DIR_OPTS + O_TRUETYPE) -#define NO_OUTPUT_OPTS 380 +#define NO_OUTPUT_OPTS 400 #define NO_ENCODING_OPT (NO_OUTPUT_OPTS + G_ENCODING) #define NO_TYPE1_OPT (NO_OUTPUT_OPTS + G_TYPE1) #define NO_DOTLESSJ_OPT (NO_OUTPUT_OPTS + G_DOTLESSJ) #define NO_UPDMAP_OPT (NO_OUTPUT_OPTS + G_UPDMAP) -#define NO_TRUETYPE_OPT (NO_OUTPUT_OPTS + G_TRUETYPE) + +#define YES_OUTPUT_OPTS 2000 +#define TRUETYPE_OPT (YES_OUTPUT_OPTS + G_TRUETYPE) +#define TYPE42_OPT (YES_OUTPUT_OPTS + G_TYPE42) #define CHAR_OPTTYPE (Clp_ValFirstUser) @@ -173,14 +180,19 @@ static Clp_Option options[] = { { "alternates-filter", 0, ALTERNATES_FILTER_OPT, Clp_ValString, 0 }, { "space-factor", 0, SPACE_FACTOR_OPT, Clp_ValDouble, 0 }, { "math-spacing", 0, MATH_SPACING_OPT, CHAR_OPTTYPE, Clp_Negate | Clp_Optional }, + { "fixed-pitch", 0, FIXED_PITCH_OPT, 0, Clp_Negate }, + { "fixed-width", 0, FIXED_PITCH_OPT, 0, Clp_Negate }, + { "proportional-width", 0, PROPORTIONAL_WIDTH_OPT, 0, Clp_Negate }, + { "italic-angle", 0, ITALIC_ANGLE_OPT, Clp_ValDouble, 0 }, { "pl", 'p', PL_OPT, 0, 0 }, { "virtual", 0, VIRTUAL_OPT, 0, Clp_Negate }, { "no-encoding", 0, NO_ENCODING_OPT, 0, 0 }, { "no-type1", 0, NO_TYPE1_OPT, 0, 0 }, - { "no-truetype", 0, NO_TRUETYPE_OPT, 0, 0 }, { "no-dotlessj", 0, NO_DOTLESSJ_OPT, 0, 0 }, { "no-updmap", 0, NO_UPDMAP_OPT, 0, 0 }, + { "truetype", 0, TRUETYPE_OPT, 0, Clp_Negate }, + { "type42", 0, TYPE42_OPT, 0, Clp_Negate }, { "map-file", 0, MAP_FILE_OPT, Clp_ValString, Clp_Negate }, { "output-encoding", 0, OUTPUT_ENCODING_OPT, Clp_ValString, Clp_Optional }, @@ -195,6 +207,7 @@ static Clp_Option options[] = { { "vpl-directory", 0, VPL_DIR_OPT, Clp_ValString, 0 }, { "vf-directory", 0, VF_DIR_OPT, Clp_ValString, 0 }, { "type1-directory", 0, TYPE1_DIR_OPT, Clp_ValString, 0 }, + { "type42-directory", 0, TYPE42_DIR_OPT, Clp_ValString, 0 }, { "truetype-directory", 0, TRUETYPE_DIR_OPT, Clp_ValString, 0 }, { "quiet", 'q', QUIET_OPT, 0, Clp_Negate }, @@ -254,6 +267,10 @@ static double minimum_kern = 2.0; static double space_factor = 1.0; static bool math_spacing = false; static int skew_char = -1; +static bool override_is_fixed_pitch = false; +static bool is_fixed_pitch; +static bool override_italic_angle = false; +static double italic_angle; static String out_encoding_file; static String out_encoding_name; @@ -312,6 +329,8 @@ Font feature and transformation options:\n\ -k, --min-kern=N Omit kerns with absolute value < N [2.0].\n\ --space-factor=F Scale wordspace by a factor of F.\n\ --design-size=SIZE Set font design size to SIZE.\n\ + --fixed-width Set fixed width (no space stretch).\n\ + --italic-angle=ANGLE Set font italic angle (for positioning accents).\n\ \n"); uerrh.message("\ Encoding options:\n\ @@ -592,10 +611,10 @@ output_pl(Metrics &metrics, const String &ps_name, int boundary_char, } int xheight = font_x_height(finfo, font_xform); - if (xheight < 1000) + if (xheight * du < 1000) fprint_real(f, " (XHEIGHT", xheight, du); - fprint_real(f, " (QUAD", 1000, du); + fprint_real(f, " (QUAD", finfo.units_per_em(), du); fprintf(f, " )\n"); if (boundary_char >= 0) @@ -1271,9 +1290,15 @@ main_dvips_map(const String &ps_name, const FontInfo &finfo, ErrorHandler *errh) { if (String fn = installed_type1(otf_filename, ps_name, (output_flags & G_TYPE1) != 0, errh)) return "<" + pathname_filename(fn); - if (!finfo.cff) - if (String fn = installed_truetype(otf_filename, (output_flags & G_TRUETYPE) != 0, errh)) - return "<" + pathname_filename(fn); + if (!finfo.cff) { + String ttf_fn, t42_fn; + ttf_fn = installed_truetype(otf_filename, (output_flags & G_TRUETYPE) != 0, errh); + t42_fn = installed_type42(otf_filename, ps_name, (output_flags & G_TYPE42) != 0, errh); + if (t42_fn && (!ttf_fn || (output_flags & G_TYPE42) != 0)) + return "<" + pathname_filename(t42_fn); + else if (ttf_fn) + return "<" + pathname_filename(ttf_fn); + } return "<" + pathname_filename(otf_filename); } @@ -1339,12 +1364,53 @@ do_gsub(Metrics& metrics, const OpenType::Font& otf, DvipsEncoding& dvipsenc, bo } } +static bool +kern_feature_requested() +{ + return std::find(interesting_features.begin(), interesting_features.end(), + OpenType::Tag("kern")) != interesting_features.end(); +} + +static void +do_try_ttf_kern(Metrics& metrics, const OpenType::Font& otf, HashMap<uint32_t, int>& feature_usage, ErrorHandler* errh) +{ + // if no GPOS "kern" lookups and "kern" requested, try "kern" table + if (!kern_feature_requested()) + return; + try { + OpenType::KernTable kern(otf.table("kern"), errh); + Vector<OpenType::Positioning> poss; + bool understood = kern.unparse_automatics(poss, errh); + int nunderstood = metrics.apply(poss); + + // mark as used + int d = (understood && nunderstood == poss.size() ? F_GPOS_ALL : (nunderstood ? F_GPOS_PART : 0)) + F_GPOS_TRY; + feature_usage.find_force(OpenType::Tag("kern").value()) |= d; + } catch (OpenType::BlankTable) { + // nada + } catch (OpenType::Error e) { + errh->warning("kern %<%s%> error, continuing", e.description.c_str()); + } +} + static void do_gpos(Metrics& metrics, const OpenType::Font& otf, HashMap<uint32_t, int>& feature_usage, ErrorHandler* errh) { OpenType::Gpos gpos(otf.table("GPOS"), errh); Vector<Lookup> lookups(gpos.nlookups(), Lookup()); find_lookups(gpos.script_list(), gpos.feature_list(), lookups, errh); + + // OpenType recommends that if GPOS exists, but the "kern" feature loads + // no lookups, we use the TrueType "kern" table, if any. + if (kern_feature_requested()) { + OpenType::Tag kern_tag("kern"); + for (Lookup *l = lookups.begin(); l != lookups.end(); ++l) + if (std::find(l->features.begin(), l->features.end(), kern_tag) != l->features.end()) + goto skip_ttf_kern; + do_try_ttf_kern(metrics, otf, feature_usage, errh); + skip_ttf_kern: ; + } + Vector<OpenType::Positioning> poss; for (int i = 0; i < lookups.size(); i++) if (lookups[i].used) { @@ -1361,19 +1427,6 @@ do_gpos(Metrics& metrics, const OpenType::Font& otf, HashMap<uint32_t, int>& fea } static void -do_kern(Metrics& metrics, const OpenType::Font& otf, HashMap<uint32_t, int>& feature_usage, ErrorHandler* errh) -{ - OpenType::KernTable kern(otf.table("kern"), errh); - Vector<OpenType::Positioning> poss; - bool understood = kern.unparse_automatics(poss, errh); - int nunderstood = metrics.apply(poss); - - // mark as used - int d = (understood && nunderstood == poss.size() ? F_GPOS_ALL : (nunderstood ? F_GPOS_PART : 0)) + F_GPOS_TRY; - feature_usage.find_force(OpenType::Tag("kern").value()) |= d; -} - -static void do_math_spacing(Metrics &metrics, const FontInfo &finfo, const DvipsEncoding &dvipsenc) { @@ -1415,6 +1468,10 @@ do_file(const String &otf_filename, const OpenType::Font &otf, return; if (!finfo.cff) errh->warning("TrueType-flavored font support is experimental"); + if (override_is_fixed_pitch) + finfo.set_is_fixed_pitch(is_fixed_pitch); + if (override_italic_angle) + finfo.set_italic_angle(italic_angle); // save glyph names Vector<PermString> glyph_names; @@ -1472,17 +1529,7 @@ do_file(const String &otf_filename, const OpenType::Font &otf, try { do_gpos(metrics, otf, feature_usage, errh); } catch (OpenType::BlankTable) { - // special case: if no GPOS and "kern" requested, look in "kern" table - if (std::find(interesting_features.begin(), interesting_features.end(), - OpenType::Tag("kern")) != interesting_features.end()) { - try { - do_kern(metrics, otf, feature_usage, errh); - } catch (OpenType::BlankTable) { - // nada - } catch (OpenType::Error e) { - errh->warning("kern %<%s%> error, continuing", e.description.c_str()); - } - } + do_try_ttf_kern(metrics, otf, feature_usage, errh); } catch (OpenType::Error e) { errh->warning("GPOS %<%s%> error, continuing", e.description.c_str()); } @@ -1926,10 +1973,17 @@ main(int argc, char *argv[]) case NO_TYPE1_OPT: case NO_DOTLESSJ_OPT: case NO_UPDMAP_OPT: - case NO_TRUETYPE_OPT: output_flags &= ~(opt - NO_OUTPUT_OPTS); break; + case TRUETYPE_OPT: + case TYPE42_OPT: + if (!clp->negated) + output_flags |= (opt - YES_OUTPUT_OPTS); + else + output_flags &= ~(opt - YES_OUTPUT_OPTS); + break; + case OUTPUT_ENCODING_OPT: if (out_encoding_file) usage_error(errh, "encoding output file specified twice"); @@ -1959,13 +2013,14 @@ main(int argc, char *argv[]) output_flags = (output_flags & ~G_ASCII) | G_BINARY; break; - case ENCODING_DIR_OPT: - case TFM_DIR_OPT: - case PL_DIR_OPT: - case VF_DIR_OPT: - case VPL_DIR_OPT: - case TYPE1_DIR_OPT: - case TRUETYPE_DIR_OPT: + case ENCODING_DIR_OPT: + case TFM_DIR_OPT: + case PL_DIR_OPT: + case VF_DIR_OPT: + case VPL_DIR_OPT: + case TYPE1_DIR_OPT: + case TRUETYPE_DIR_OPT: + case TYPE42_DIR_OPT: if (!setodir(opt - DIR_OPTS, clp->vstr)) usage_error(errh, "%s directory specified twice", odirname(opt - DIR_OPTS)); break; @@ -1977,6 +2032,21 @@ main(int argc, char *argv[]) font_name = clp->vstr; break; + case FIXED_PITCH_OPT: + override_is_fixed_pitch = true; + is_fixed_pitch = !clp->negated; + break; + + case PROPORTIONAL_WIDTH_OPT: + override_is_fixed_pitch = true; + is_fixed_pitch = !!clp->negated; + break; + + case ITALIC_ANGLE_OPT: + override_italic_angle = true; + italic_angle = clp->val.d; + break; + case GLYPHLIST_OPT: glyphlist_files.push_back(clp->vstr); break; @@ -2020,7 +2090,7 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("otftotfm (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 2002-2009 Eddie Kohler\n\ + printf("Copyright (C) 2002-2010 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); @@ -2056,7 +2126,7 @@ particular purpose.\n"); done: // check for odd option combinations - if (warn_missing && !(output_flags & G_VMETRICS)) + if (warn_missing > 0 && !(output_flags & G_VMETRICS)) errh->warning("%<--warn-missing%> has no effect with %<--no-virtual%>"); // set up file names diff --git a/Build/source/texk/lcdf-typetools/otftotfm/secondary.cc b/Build/source/texk/lcdf-typetools/otftotfm/secondary.cc index 1d1c8094901..4a48f52fadb 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/secondary.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/secondary.cc @@ -1,6 +1,6 @@ /* secondary.{cc,hh} -- code for generating fake glyphs * - * Copyright (c) 2003-2006 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 @@ -82,7 +82,8 @@ enum { U_EXCLAMDOWN = 0x00A1, // U+00A1 INVERTED EXCLAMATION MARK FontInfo::FontInfo(const Efont::OpenType::Font *otf_, ErrorHandler *errh) : otf(otf_), cmap(0), cff_file(0), cff(0), post(0), name(0), _nglyphs(-1), - _got_glyph_names(false), _ttb_program(0) + _got_glyph_names(false), _ttb_program(0), _override_is_fixed_pitch(false), + _override_italic_angle(false) { cmap = new Efont::OpenType::Cmap(otf->table("cmap"), errh); assert(cmap->ok()); @@ -190,7 +191,9 @@ FontInfo::program() const bool FontInfo::is_fixed_pitch() const { - if (cff) { + if (_override_is_fixed_pitch) + return _is_fixed_pitch; + else if (cff) { double d; return (cff->dict_value(Efont::Cff::oIsFixedPitch, &d) && d); } else @@ -200,7 +203,9 @@ FontInfo::is_fixed_pitch() const double FontInfo::italic_angle() const { - if (cff) { + if (_override_italic_angle) + return _italic_angle; + else if (cff) { double d; (void) cff->dict_value(Efont::Cff::oItalicAngle, &d); return d; @@ -231,7 +236,9 @@ Secondary::encode_uni(int code, PermString name, uint32_t uni, Metrics &metrics, T1Secondary::T1Secondary(const FontInfo &finfo, const String &font_name, const String &otf_file_name) : _finfo(finfo), _font_name(font_name), _otf_file_name(otf_file_name), - _xheight(font_x_height(finfo, Transform())), _spacewidth(1000) + _units_per_em(finfo.units_per_em()), + _xheight(font_x_height(finfo, Transform())), + _spacewidth(_units_per_em) { int bounds[4], width; if (char_bounds(bounds, width, finfo, Transform(), ' ')) @@ -595,14 +602,14 @@ T1Secondary::setting(uint32_t uni, Vector<Setting> &v, Metrics &metrics, ErrorHa break; case U_RINGFITTED: { - int A_width = char_one_bound(_finfo, xform, 4, true, -1000, 'A', 0); + int A_width = char_one_bound(_finfo, xform, 4, true, -_units_per_em, 'A', 0); uint32_t ring_char = U_RINGABOVE; - int ring_width = char_one_bound(_finfo, xform, 4, true, -1000, ring_char, 0); - if (ring_width <= -1000) { + int ring_width = char_one_bound(_finfo, xform, 4, true, -_units_per_em, ring_char, 0); + if (ring_width <= -_units_per_em) { ring_char = U_COMBININGRINGABOVE; - ring_width = char_one_bound(_finfo, xform, 4, true, -1000, ring_char, 0); + ring_width = char_one_bound(_finfo, xform, 4, true, -_units_per_em, ring_char, 0); } - if (A_width > -1000 && ring_width > -1000) { + if (A_width > -_units_per_em && ring_width > -_units_per_em) { int offset = (A_width - ring_width) / 2; v.push_back(Setting(Setting::MOVE, offset, 0)); if (char_setting(v, metrics, ring_char, 0)) { @@ -663,7 +670,7 @@ font_x_height(const FontInfo &finfo, const Transform &font_xform) return os2.x_height(); } catch (Efont::OpenType::Bounds) { // XXX what if 'x', 'm', 'z' were subject to substitution? - return char_one_bound(finfo, font_xform, 3, false, 1000, + return char_one_bound(finfo, font_xform, 3, false, finfo.units_per_em(), 'x', 'm', 'z', 0); } } @@ -676,7 +683,7 @@ font_cap_height(const FontInfo &finfo, const Transform &font_xform) return os2.cap_height(); } catch (Efont::OpenType::Bounds) { // XXX what if 'H', 'O', 'B' were subject to substitution? - return char_one_bound(finfo, font_xform, 3, false, 1000, + return char_one_bound(finfo, font_xform, 3, false, finfo.units_per_em(), 'H', 'O', 'B', 0); } } diff --git a/Build/source/texk/lcdf-typetools/otftotfm/secondary.hh b/Build/source/texk/lcdf-typetools/otftotfm/secondary.hh index bfe31bf04d7..875068078ed 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/secondary.hh +++ b/Build/source/texk/lcdf-typetools/otftotfm/secondary.hh @@ -27,10 +27,22 @@ struct FontInfo { bool glyph_names(Vector<PermString> &) const; int glyphid(PermString) const; const Efont::CharstringProgram *program() const; + int units_per_em() const { + return program()->units_per_em(); + } bool is_fixed_pitch() const; double italic_angle() const; + void set_is_fixed_pitch(bool is_fixed_pitch) { + _override_is_fixed_pitch = true; + _is_fixed_pitch = is_fixed_pitch; + } + void set_italic_angle(double italic_angle) { + _override_italic_angle = true; + _italic_angle = italic_angle; + } + String family_name() const; String postscript_name() const; @@ -41,6 +53,10 @@ struct FontInfo { mutable bool _got_glyph_names; mutable Vector<uint32_t> _unicodes; mutable Efont::TrueTypeBoundsCharstringProgram *_ttb_program; + bool _override_is_fixed_pitch; + bool _override_italic_angle; + bool _is_fixed_pitch; + double _italic_angle; }; @@ -63,6 +79,7 @@ class T1Secondary : public Secondary { public: const FontInfo &_finfo; String _font_name; String _otf_file_name; + int _units_per_em; int _xheight; int _spacewidth; bool char_setting(Vector<Setting> &, Metrics &, int uni, ...); diff --git a/Build/source/texk/lcdf-typetools/otftotfm/uniprop.cc b/Build/source/texk/lcdf-typetools/otftotfm/uniprop.cc index b38b022aa3b..e37d66e6599 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/uniprop.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/uniprop.cc @@ -1,6 +1,6 @@ /* uniprop.{cc,hh} -- code for Unicode character properties * - * Copyright (c) 2004-2007 Eddie Kohler + * Copyright (c) 2004-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/otftotfm/util.cc b/Build/source/texk/lcdf-typetools/otftotfm/util.cc index 2aecdaa5f6a..241d2eb733c 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/util.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/util.cc @@ -1,6 +1,6 @@ /* util.{cc,hh} -- various bits * - * Copyright (c) 2003-2006 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/otftotfm/util.hh b/Build/source/texk/lcdf-typetools/otftotfm/util.hh index df59f63af14..a3e42b63d9f 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/util.hh +++ b/Build/source/texk/lcdf-typetools/otftotfm/util.hh @@ -10,7 +10,7 @@ extern bool force; enum { G_ENCODING = 1, G_METRICS = 2, G_VMETRICS = 4, G_TYPE1 = 8, G_PSFONTSMAP = 16, G_BINARY = 32, G_ASCII = 64, G_DOTLESSJ = 128, - G_UPDMAP = 256, G_TRUETYPE = 512 }; + G_UPDMAP = 256, G_TRUETYPE = 512, G_TYPE42 = 1024 }; extern int output_flags; diff --git a/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.am b/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.am index 88ab31767f4..802f841f664 100644 --- a/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.am +++ b/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = t1dotlessj man_MANS = t1dotlessj.1 diff --git a/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.in b/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.in index 3c6099f57f0..d153f58a89f 100644 --- a/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.in +++ b/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.in @@ -141,6 +141,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -229,6 +230,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign man_MANS = t1dotlessj.1 t1dotlessj_SOURCES = t1dotlessj.cc t1dotlessj_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a diff --git a/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.1 b/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.1 index 09070402604..238b52c9122 100644 --- a/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.1 +++ b/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.1 @@ -1,4 +1,4 @@ -.ds V 2.79 +.ds V 2.83 .de M .BR "\\$1" "(\\$2)\\$3" .. diff --git a/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.cc b/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.cc index e4d8c3feb75..d267ae0980e 100644 --- a/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.cc +++ b/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.cc @@ -1,6 +1,6 @@ /* t1dotlessj.cc -- driver for creating dotlessj characters from Type 1 fonts * - * Copyright (c) 2003-2009 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 @@ -310,7 +310,7 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("t1dotlessj (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 2003-2009 Eddie Kohler\n\ + printf("Copyright (C) 2003-2010 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); diff --git a/Build/source/texk/lcdf-typetools/t1lint/Makefile.am b/Build/source/texk/lcdf-typetools/t1lint/Makefile.am index 257d2aa1557..641702c1ed2 100644 --- a/Build/source/texk/lcdf-typetools/t1lint/Makefile.am +++ b/Build/source/texk/lcdf-typetools/t1lint/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = t1lint man_MANS = t1lint.1 diff --git a/Build/source/texk/lcdf-typetools/t1lint/Makefile.in b/Build/source/texk/lcdf-typetools/t1lint/Makefile.in index e9fdd41590b..4c465ef3b24 100644 --- a/Build/source/texk/lcdf-typetools/t1lint/Makefile.in +++ b/Build/source/texk/lcdf-typetools/t1lint/Makefile.in @@ -150,6 +150,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -238,6 +239,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign man_MANS = t1lint.1 t1lint_SOURCES = cscheck.hh cscheck.cc \ t1lint.cc diff --git a/Build/source/texk/lcdf-typetools/t1lint/cscheck.cc b/Build/source/texk/lcdf-typetools/t1lint/cscheck.cc index 6413df5abfa..5afa31c194b 100644 --- a/Build/source/texk/lcdf-typetools/t1lint/cscheck.cc +++ b/Build/source/texk/lcdf-typetools/t1lint/cscheck.cc @@ -1,6 +1,6 @@ /* cscheck.{cc,hh} -- checking Type 1 charstrings for validity * - * Copyright (c) 1999-2009 Eddie Kohler + * Copyright (c) 1999-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/t1lint/t1lint.1 b/Build/source/texk/lcdf-typetools/t1lint/t1lint.1 index f9cf60d9ebe..3adc19e7ca8 100644 --- a/Build/source/texk/lcdf-typetools/t1lint/t1lint.1 +++ b/Build/source/texk/lcdf-typetools/t1lint/t1lint.1 @@ -1,4 +1,4 @@ -.ds V 2.79 +.ds V 2.83 .de M .BR "\\$1" "(\\$2)\\$3" .. diff --git a/Build/source/texk/lcdf-typetools/t1lint/t1lint.cc b/Build/source/texk/lcdf-typetools/t1lint/t1lint.cc index a6448608135..0ca81e928a4 100644 --- a/Build/source/texk/lcdf-typetools/t1lint/t1lint.cc +++ b/Build/source/texk/lcdf-typetools/t1lint/t1lint.cc @@ -1,6 +1,6 @@ /* t1lint.cc -- driver for checking Type 1 fonts for validity * - * Copyright (c) 1999-2009 Eddie Kohler + * Copyright (c) 1999-2010 Eddie Kohler * * 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 @@ -412,7 +412,7 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("t1lint (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 1999-2009 Eddie Kohler\n\ + printf("Copyright (C) 1999-2010 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); diff --git a/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.am b/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.am index dd658213c1b..0cd52d6e36a 100644 --- a/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.am +++ b/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = t1rawafm man_MANS = t1rawafm.1 diff --git a/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.in b/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.in index d5d5a301ded..94af63869b5 100644 --- a/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.in +++ b/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.in @@ -141,6 +141,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -229,6 +230,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign man_MANS = t1rawafm.1 t1rawafm_SOURCES = t1rawafm.cc t1rawafm_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a diff --git a/Build/source/texk/lcdf-typetools/t1rawafm/t1rawafm.cc b/Build/source/texk/lcdf-typetools/t1rawafm/t1rawafm.cc index 68f0e8bc363..7cd4249ee2d 100644 --- a/Build/source/texk/lcdf-typetools/t1rawafm/t1rawafm.cc +++ b/Build/source/texk/lcdf-typetools/t1rawafm/t1rawafm.cc @@ -1,6 +1,6 @@ /* t1rawafm.cc -- driver for generating a raw AFM file from a font * - * Copyright (c) 2008-2009 Eddie Kohler + * Copyright (c) 2008-2010 Eddie Kohler * * 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 @@ -307,7 +307,7 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("t1rawafm (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 2008-2009 Eddie Kohler\n\ + printf("Copyright (C) 2008-2010 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); diff --git a/Build/source/texk/lcdf-typetools/t1reencode/Makefile.am b/Build/source/texk/lcdf-typetools/t1reencode/Makefile.am index 754e44b6d5a..8dcf9da887d 100644 --- a/Build/source/texk/lcdf-typetools/t1reencode/Makefile.am +++ b/Build/source/texk/lcdf-typetools/t1reencode/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = t1reencode man_MANS = t1reencode.1 diff --git a/Build/source/texk/lcdf-typetools/t1reencode/Makefile.in b/Build/source/texk/lcdf-typetools/t1reencode/Makefile.in index df5d6d7ac4e..48a6fc08402 100644 --- a/Build/source/texk/lcdf-typetools/t1reencode/Makefile.in +++ b/Build/source/texk/lcdf-typetools/t1reencode/Makefile.in @@ -151,6 +151,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -239,6 +240,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign man_MANS = t1reencode.1 t1reencode_SOURCES = md5.c md5.h \ t1reencode.cc \ diff --git a/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.1 b/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.1 index 42b8f005cd9..942e78a461e 100644 --- a/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.1 +++ b/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.1 @@ -1,4 +1,4 @@ -.ds V 2.79 +.ds V 2.83 .de M .BR "\\$1" "(\\$2)\\$3" .. diff --git a/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.cc b/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.cc index d81d26221c4..caba5dc0e33 100644 --- a/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.cc +++ b/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.cc @@ -1,6 +1,6 @@ /* t1reencode.cc -- driver for reencoding Type 1 fonts * - * Copyright (c) 2005-2009 Eddie Kohler + * Copyright (c) 2005-2010 Eddie Kohler * * 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 @@ -31,10 +31,6 @@ # include <fcntl.h> # include <io.h> #endif -#ifdef WIN32 -/* According to Fabrice Popineau MSVCC doesn't handle std::min correctly. */ -# define std /* */ -#endif using namespace Efont; @@ -982,7 +978,7 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("t1reencode (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 1999-2009 Eddie Kohler\n\ + printf("Copyright (C) 1999-2010 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); diff --git a/Build/source/texk/lcdf-typetools/t1reencode/util.cc b/Build/source/texk/lcdf-typetools/t1reencode/util.cc index a8dc4c48ea7..e31a58a558f 100644 --- a/Build/source/texk/lcdf-typetools/t1reencode/util.cc +++ b/Build/source/texk/lcdf-typetools/t1reencode/util.cc @@ -1,6 +1,6 @@ /* util.{cc,hh} -- various bits * - * Copyright (c) 2003-2006 Eddie Kohler + * Copyright (c) 2003-2010 Eddie Kohler * * 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 diff --git a/Build/source/texk/lcdf-typetools/t1testpage/Makefile.am b/Build/source/texk/lcdf-typetools/t1testpage/Makefile.am index 567173ddba7..251c3ff697e 100644 --- a/Build/source/texk/lcdf-typetools/t1testpage/Makefile.am +++ b/Build/source/texk/lcdf-typetools/t1testpage/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = t1testpage man_MANS = t1testpage.1 diff --git a/Build/source/texk/lcdf-typetools/t1testpage/Makefile.in b/Build/source/texk/lcdf-typetools/t1testpage/Makefile.in index 1f56e91474f..2d09def8ae9 100644 --- a/Build/source/texk/lcdf-typetools/t1testpage/Makefile.in +++ b/Build/source/texk/lcdf-typetools/t1testpage/Makefile.in @@ -141,6 +141,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -229,6 +230,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign man_MANS = t1testpage.1 t1testpage_SOURCES = t1testpage.cc t1testpage_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a diff --git a/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.1 b/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.1 index c4bff5b8c52..bae4ccd115b 100644 --- a/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.1 +++ b/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.1 @@ -1,4 +1,4 @@ -.ds V 2.79 +.ds V 2.83 .de M .BR "\\$1" "(\\$2)\\$3" .. diff --git a/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.cc b/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.cc index bbd11c0fb76..cc19692b6bd 100644 --- a/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.cc +++ b/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.cc @@ -1,6 +1,6 @@ /* t1testpage.cc -- driver for generating Type 1 fonts' test pages * - * Copyright (c) 1999-2009 Eddie Kohler + * Copyright (c) 1999-2010 Eddie Kohler * * 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 @@ -625,7 +625,7 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("t1testpage (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 1999-2009 Eddie Kohler\n\ + printf("Copyright (C) 1999-2010 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); diff --git a/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.am b/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.am index 34b3520f7a0..24206d0d0a3 100644 --- a/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.am +++ b/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = ttftotype42 man_MANS = ttftotype42.1 diff --git a/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.in b/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.in index 11ae7caf1fe..b73cd77140c 100644 --- a/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.in +++ b/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.in @@ -141,6 +141,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LCDF_TYPETOOLS_VERSION = @LCDF_TYPETOOLS_VERSION@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -229,6 +230,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign man_MANS = ttftotype42.1 ttftotype42_SOURCES = ttftotype42.cc ttftotype42_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a diff --git a/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.1 b/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.1 index 74f6c2ebae4..7a3268e7602 100644 --- a/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.1 +++ b/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.1 @@ -1,4 +1,4 @@ -.ds V 2.79 +.ds V 2.83 .de M .BR "\\$1" "(\\$2)\\$3" .. diff --git a/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.cc b/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.cc index 88cb87a381f..87b49cb56cd 100644 --- a/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.cc +++ b/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.cc @@ -1,6 +1,6 @@ /* ttftotype42.cc -- driver for translating TrueType fonts to Type 42 fonts * - * Copyright (c) 2006-2009 Eddie Kohler + * Copyright (c) 2006-2010 Eddie Kohler * * 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 @@ -79,7 +79,7 @@ usage() uerrh.message("\ %<Ttftotype42%> translates a TrueType or TrueType-flavored OpenType font into\n\ PostScript Type 42 format, which is suitable for inclusion in PostScript\n\ -files. The result, is usually written to the standard output.\n\ +files. The result is usually written to the standard output.\n\ \n\ Usage: %s [OPTIONS] [FONTFILE [OUTPUTFILE]]\n\ \n\ @@ -213,12 +213,11 @@ do_file(const char *infn, const char *outfn, ErrorHandler *errh) if (!outfn || strcmp(outfn, "-") == 0) { f = stdout; outfn = "<stdout>"; - } else if (!(f = fopen(outfn, "wb"))) - errh->fatal("%s: %s", outfn, strerror(errno)); - #if defined(_MSDOS) || defined(_WIN32) _setmode(_fileno(f), _O_BINARY); #endif + } else if (!(f = fopen(outfn, "wb"))) + errh->fatal("%s: %s", outfn, strerror(errno)); // fprintf(f, "%%!\n"); @@ -339,7 +338,7 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("ttftotype42 (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 2006-2009 Eddie Kohler\n\ + printf("Copyright (C) 2006-2010 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); |