summaryrefslogtreecommitdiff
path: root/Build/source/texk/lcdf-typetools/otfinfo
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-02-17 19:29:39 +0000
committerKarl Berry <karl@freefriends.org>2008-02-17 19:29:39 +0000
commitfc3b5d4d4f684baa6216685a0696efb853141529 (patch)
tree0694ed01c09b3c97fcd64453e2c1f647a3fb31ad /Build/source/texk/lcdf-typetools/otfinfo
parent5fc0a693ca037d37d815b00c49660c138b332224 (diff)
move lcdf-typetools to texk and update to 2.66
git-svn-id: svn://tug.org/texlive/trunk@6662 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/lcdf-typetools/otfinfo')
-rw-r--r--Build/source/texk/lcdf-typetools/otfinfo/Makefile.am16
-rw-r--r--Build/source/texk/lcdf-typetools/otfinfo/Makefile.in467
-rw-r--r--Build/source/texk/lcdf-typetools/otfinfo/otfinfo.1190
-rw-r--r--Build/source/texk/lcdf-typetools/otfinfo/otfinfo.cc584
4 files changed, 1257 insertions, 0 deletions
diff --git a/Build/source/texk/lcdf-typetools/otfinfo/Makefile.am b/Build/source/texk/lcdf-typetools/otfinfo/Makefile.am
new file mode 100644
index 00000000000..c1541be0c33
--- /dev/null
+++ b/Build/source/texk/lcdf-typetools/otfinfo/Makefile.am
@@ -0,0 +1,16 @@
+## Process this file with automake to produce Makefile.in
+AUTOMAKE_OPTIONS = foreign
+
+bin_PROGRAMS = otfinfo
+man_MANS = otfinfo.1
+
+otfinfo_SOURCES = \
+ otfinfo.cc
+
+otfinfo_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a
+otfinfo_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a
+
+INCLUDES = -I$(top_srcdir)/include
+CLEANFILES = @TEMPLATE_OBJS@
+
+EXTRA_DIST = otfinfo.1
diff --git a/Build/source/texk/lcdf-typetools/otfinfo/Makefile.in b/Build/source/texk/lcdf-typetools/otfinfo/Makefile.in
new file mode 100644
index 00000000000..72bab8988ed
--- /dev/null
+++ b/Build/source/texk/lcdf-typetools/otfinfo/Makefile.in
@@ -0,0 +1,467 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+bin_PROGRAMS = otfinfo$(EXEEXT)
+subdir = otfinfo
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_otfinfo_OBJECTS = otfinfo.$(OBJEXT)
+otfinfo_OBJECTS = $(am_otfinfo_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+SOURCES = $(otfinfo_SOURCES)
+DIST_SOURCES = $(otfinfo_SOURCES)
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FIXLIBC_O = @FIXLIBC_O@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KPSEINTERFACE_O = @KPSEINTERFACE_O@
+LDFLAGS = @LDFLAGS@
+LIBKPATHSEA = @LIBKPATHSEA@
+LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TEMPLATE_OBJS = @TEMPLATE_OBJS@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+man_MANS = otfinfo.1
+otfinfo_SOURCES = \
+ otfinfo.cc
+
+otfinfo_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a
+otfinfo_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a
+INCLUDES = -I$(top_srcdir)/include
+CLEANFILES = @TEMPLATE_OBJS@
+EXTRA_DIST = otfinfo.1
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign otfinfo/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign otfinfo/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+otfinfo$(EXEEXT): $(otfinfo_OBJECTS) $(otfinfo_DEPENDENCIES)
+ @rm -f otfinfo$(EXEEXT)
+ $(CXXLINK) $(otfinfo_LDFLAGS) $(otfinfo_OBJECTS) $(otfinfo_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfinfo.Po@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+uninstall-info-am:
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 1*) ;; \
+ *) ext='1' ;; \
+ esac; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
+ done
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 1*) ;; \
+ *) ext='1' ;; \
+ esac; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
+ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man: install-man1
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man
+
+uninstall-man: uninstall-man1
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic ctags distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-exec install-exec-am \
+ install-info install-info-am install-man install-man1 \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-info-am uninstall-man uninstall-man1
+
+# 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/otfinfo/otfinfo.1 b/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.1
new file mode 100644
index 00000000000..5a266eba944
--- /dev/null
+++ b/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.1
@@ -0,0 +1,190 @@
+'\"t
+.ds V 2.66
+.de M
+.BR "\\$1" "(\\$2)\\$3"
+..
+.de Sp
+.if n .sp
+.if t .sp 0.4
+..
+.TH OTFINFO 1 "LCDF Typetools" "Version \*V"
+.SH NAME
+otfinfo \- report information about OpenType fonts
+.SH SYNOPSIS
+.B otfinfo
+\%[\fB-sfzpvag\fR]
+\%[\fIFILE...\fR]
+'
+.SH DESCRIPTION
+.BR Otfinfo
+reports information about the named OpenType font
+.IR FILE s
+(or standard input, if no
+.IR FILE s
+are given). Results are printed to standard output. Each line is prefaced
+with the relevant
+.I FILE
+if more than one
+.I FILE
+was supplied.
+'
+.SH OPTIONS
+With long options, you need type only as many characters as will make the
+option unique.
+.SS Query options
+.PD 0
+.PD 0
+.TP 5
+.BR \-s ", " \-\-scripts
+Print supported scripts and language systems. The scripts are printed one
+per line, with human-readable descriptions; for example:
+.nf
+ cyrl Cyrillic
+ grek Greek
+ latn Latin
+ latn.TUR Latin/Turkish
+.fi
+'
+.Sp
+.TP 5
+.BR \-f ", " \-\-features
+Print GSUB and GPOS features supported by the selected script (see the
+.B \-\-script
+option below). The scripts are printed one per line, with human-readable
+descriptions; for example:
+.nf
+ aalt Access All Alternates
+ c2sc Small Capitals From Capitals
+ case Case-Sensitive Forms
+ cpsp Capital Spacing
+ \&...
+ zero Slashed Zero
+.fi
+'
+.Sp
+.TP 5
+.BR \-z ", " \-\-optical\-size
+Print optical size information. For example:
+.nf
+ design size 11 pt, size range (8.4 pt, 13 pt], subfamily ID 11, subfamily name Semibold Italic
+.fi
+'
+.Sp
+.TP 5
+.BR \-p ", " \-\-postscript\-name
+Print each font's PostScript name. For example:
+.nf
+ MinionPro-SemiboldItCapt
+.fi
+'
+.Sp
+.TP 5
+.BR \-a ", " \-\-family
+Print each font's family name. For example:
+.nf
+ Minion Pro
+.fi
+'
+.Sp
+.TP 5
+.BR \-v ", " \-\-font\-version
+Print font version information, if available. For example:
+.nf
+ OTF 1.013;PS 001.000;Core 1.0.27;makeotf.lib(1.11)
+.fi
+'
+.Sp
+.TP 5
+.BR \-i ", " \-\-info
+Print each font's name, version, designer, vendor, copyright, and license
+information. For example:
+.nf
+ Family: Minion Pro
+ Subfamily: Regular
+ Full name: Minion Pro
+ PostScript name: MinionPro-Regular
+ Version: OTF 1.011;PS 001.000;Core 1.0.27;makeotf.lib1.3.1
+ Unique ID: 1.011;ADBE;MinionPro-Regular
+ Designer: Robert Slimbach
+ Vendor URL: http://www.adobe.com/type/
+ Trademark: Minion is either a registered trademark or a trademark of Adobe Systems Incorporated in the United States and/or other countries.
+ Copyright: \(co 2000 Adobe Systems Incorporated. All Rights Reserved. U.S. Patent Des. 337,604. Other patents pending.
+ License URL: http://www.adobe.com/type/legal.html
+.fi
+'
+.Sp
+.TP 5
+.BR \-g ", " \-\-glyphs
+Print the name of every glyph in each font, one per line. For example:
+.nf
+ \&.notdef
+ space
+ exclam
+ \&...
+ ncommaaccent.end
+ lje.alt
+.fi
+Works for PostScript-flavored OpenType fonts only.
+'
+.Sp
+.TP 5
+.BR \-t ", " \-\-tables
+Print the size and name of every OpenType table in the font. For example:
+.nf
+ 52 BASE
+ 87723 CFF
+ 4940 DSIG
+ 21366 GPOS
+ \&...
+.fi
+'
+.PD
+'
+'
+.SS Miscellaneous options
+'
+.PD 0
+.TP 5
+.BI \-\-script= "script\fR[.\fIlang\fR]"
+Select the script system
+.I script
+and language system
+.IR lang
+used to look up features by
+.BR \-\-features .
+Examples include "latn" (Latin script), "grek" (Greek script), and "yi.YIC"
+(Yi script with classic characters). If
+.I lang
+is not specified, otfinfo will use the default language system for that
+script. Defaults to "latn".
+'
+.Sp
+.TP 5
+.BR \-V ", " \-\-verbose
+Write progress messages to standard error.
+'
+.Sp
+.TP 5
+.BR \-q ", " \-\-quiet
+Do not generate any error messages.
+'
+.Sp
+.TP 5
+.BR \-h ", " \-\-help
+Print usage information and exit.
+'
+.Sp
+.TP 5
+.BR \-\-version
+Print the version number and some short non-warranty information and exit.
+.PD
+'
+.SH "SEE ALSO"
+.LP
+.M otftotfm 1
+.LP
+.IR "OpenType Specification" ,
+Version 1.4
+'
+.SH AUTHOR
+Eddie Kohler (kohler@cs.ucla.edu)
diff --git a/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.cc b/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.cc
new file mode 100644
index 00000000000..c76321b117e
--- /dev/null
+++ b/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.cc
@@ -0,0 +1,584 @@
+/* otfinfo.cc -- driver for reporting information about OpenType fonts
+ *
+ * Copyright (c) 2003-2006 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
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version. This program is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#include <efont/psres.hh>
+#include <efont/otfgsub.hh>
+#include <efont/otfgpos.hh>
+#include <efont/otfname.hh>
+#include <efont/cff.hh>
+#include <lcdf/clp.h>
+#include <lcdf/error.hh>
+#include <lcdf/straccum.hh>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <ctype.h>
+#include <errno.h>
+#include <algorithm>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#if defined(_MSDOS) || defined(_WIN32)
+# include <fcntl.h>
+# include <io.h>
+#endif
+
+using namespace Efont;
+
+#define VERSION_OPT 301
+#define HELP_OPT 302
+#define QUIET_OPT 303
+#define VERBOSE_OPT 304
+#define SCRIPT_OPT 305
+
+#define QUERY_SCRIPTS_OPT 320
+#define QUERY_FEATURES_OPT 321
+#define QUERY_OPTICAL_SIZE_OPT 322
+#define QUERY_POSTSCRIPT_NAME_OPT 323
+#define QUERY_GLYPHS_OPT 324
+#define QUERY_FVERSION_OPT 325
+#define TABLES_OPT 326
+#define QUERY_FAMILY_OPT 327
+#define INFO_OPT 328
+
+Clp_Option options[] = {
+
+ { "script", 0, SCRIPT_OPT, Clp_ArgString, 0 },
+ { "quiet", 'q', QUIET_OPT, 0, Clp_Negate },
+ { "verbose", 'V', VERBOSE_OPT, 0, Clp_Negate },
+ { "features", 'f', QUERY_FEATURES_OPT, 0, 0 },
+ { "scripts", 's', QUERY_SCRIPTS_OPT, 0, 0 },
+ { "optical-size", 'z', QUERY_OPTICAL_SIZE_OPT, 0, 0 },
+ { "postscript-name", 'p', QUERY_POSTSCRIPT_NAME_OPT, 0, 0 },
+ { "family", 'a', QUERY_FAMILY_OPT, 0, 0 },
+ { "font-version", 'v', QUERY_FVERSION_OPT, 0, 0 },
+ { "info", 'i', INFO_OPT, 0, 0 },
+ { "glyphs", 'g', QUERY_GLYPHS_OPT, 0, 0 },
+ { "tables", 't', TABLES_OPT, 0, 0 },
+ { "help", 'h', HELP_OPT, 0, 0 },
+ { "version", 0, VERSION_OPT, 0, 0 },
+
+};
+
+
+static const char *program_name;
+static String::Initializer initializer;
+
+static Efont::OpenType::Tag script, langsys;
+
+bool verbose = false;
+bool quiet = false;
+
+
+void
+usage_error(ErrorHandler *errh, const char *error_message, ...)
+{
+ va_list val;
+ va_start(val, error_message);
+ if (!error_message)
+ errh->message("Usage: %s [OPTION]... FONT", program_name);
+ else
+ errh->verror(ErrorHandler::ERR_ERROR, String(), error_message, val);
+ errh->message("Type %s --help for more information.", program_name);
+ exit(1);
+}
+
+void
+usage()
+{
+ printf("\
+'Otfinfo' reports information about an OpenType font to standard output.\n\
+Options specify what information to print.\n\
+\n\
+Usage: %s [-sfzpg] [OTFFILES...]\n\n",
+ program_name);
+ printf("\
+Query options:\n\
+ -s, --scripts Report font's supported scripts.\n\
+ -f, --features Report font's GSUB/GPOS features.\n\
+ -z, --optical-size Report font's optical size information.\n\
+ -p, --postscript-name Report font's PostScript name.\n\
+ -a, --family Report font's family name.\n\
+ -v, --font-version Report font's version information.\n\
+ -i, --info Report font's names and designer/vendor info.\n\
+ -g, --glyphs Report font's glyph names.\n\
+ -t, --tables Report font's OpenType tables.\n\
+\n\
+Other options:\n\
+ --script=SCRIPT[.LANG] Set script used for --features [latn].\n\
+ -V, --verbose Print progress information to standard error.\n\
+ -h, --help Print this message and exit.\n\
+ -q, --quiet Do not generate any error messages.\n\
+ --version Print version number and exit.\n\
+\n\
+Report bugs to <kohler@cs.ucla.edu>.\n");
+}
+
+String
+read_file(String filename, ErrorHandler *errh, bool warning = false)
+{
+ FILE *f;
+ if (!filename || filename == "-") {
+ filename = "<stdin>";
+ f = stdin;
+#if defined(_MSDOS) || defined(_WIN32)
+ // Set the file mode to binary
+ _setmode(_fileno(f), _O_BINARY);
+#endif
+ } else if (!(f = fopen(filename.c_str(), "rb"))) {
+ errh->verror_text((warning ? errh->ERR_WARNING : errh->ERR_ERROR), filename, strerror(errno));
+ return String();
+ }
+
+ StringAccum sa;
+ while (!feof(f)) {
+ if (char *x = sa.reserve(8192)) {
+ int amt = fread(x, 1, 8192, f);
+ sa.forward(amt);
+ } else {
+ errh->verror_text((warning ? errh->ERR_WARNING : errh->ERR_ERROR), filename, "Out of memory!");
+ break;
+ }
+ }
+ if (f != stdin)
+ fclose(f);
+ return sa.take_string();
+}
+
+String
+printable_filename(const String &s)
+{
+ if (!s || s == "-")
+ return String::stable_string("<stdin>");
+ else
+ return s;
+}
+
+static void
+collect_script_descriptions(const OpenType::ScriptList &script_list, Vector<String> &output, ErrorHandler *errh)
+{
+ Vector<OpenType::Tag> script, langsys;
+ script_list.language_systems(script, langsys, errh);
+ for (int i = 0; i < script.size(); i++) {
+ String what = script[i].text();
+ const char *s = script[i].script_description();
+ String where = (s ? s : "<unknown script>");
+ if (!langsys[i].null()) {
+ what += String(".") + langsys[i].text();
+ s = langsys[i].language_description();
+ where += String("/") + (s ? s : "<unknown language>");
+ }
+ if (what.length() < 8)
+ output.push_back(what + String("\t\t") + where);
+ else
+ output.push_back(what + String("\t") + where);
+ }
+}
+
+static void
+do_query_scripts(const OpenType::Font &otf, ErrorHandler *errh, ErrorHandler *result_errh)
+{
+ Vector<String> results;
+ if (String gsub_table = otf.table("GSUB")) {
+ OpenType::Gsub gsub(gsub_table, &otf, errh);
+ collect_script_descriptions(gsub.script_list(), results, errh);
+ }
+ if (String gpos_table = otf.table("GPOS")) {
+ OpenType::Gpos gpos(gpos_table, errh);
+ collect_script_descriptions(gpos.script_list(), results, errh);
+ }
+
+ if (results.size()) {
+ std::sort(results.begin(), results.end());
+ String *unique_result = std::unique(results.begin(), results.end());
+ for (String *sp = results.begin(); sp < unique_result; sp++)
+ result_errh->message("%s", sp->c_str());
+ }
+}
+
+static void
+collect_feature_descriptions(const OpenType::ScriptList &script_list, const OpenType::FeatureList &feature_list, Vector<String> &output, ErrorHandler *errh)
+{
+ int required_fid;
+ Vector<int> fids;
+ // collect features applying to this script
+ script_list.features(script, langsys, required_fid, fids, errh);
+ for (int i = -1; i < fids.size(); i++) {
+ int fid = (i < 0 ? required_fid : fids[i]);
+ if (fid >= 0) {
+ OpenType::Tag tag = feature_list.tag(fid);
+ const char *s = tag.feature_description();
+ output.push_back(tag.text() + String("\t") + (s ? s : "<unknown feature>"));
+ }
+ }
+}
+
+static void
+do_query_features(const OpenType::Font &otf, ErrorHandler *errh, ErrorHandler *result_errh)
+{
+ Vector<String> results;
+ if (String gsub_table = otf.table("GSUB")) {
+ OpenType::Gsub gsub(gsub_table, &otf, errh);
+ collect_feature_descriptions(gsub.script_list(), gsub.feature_list(), results, errh);
+ }
+ if (String gpos_table = otf.table("GPOS")) {
+ OpenType::Gpos gpos(gpos_table, errh);
+ collect_feature_descriptions(gpos.script_list(), gpos.feature_list(), results, errh);
+ }
+
+ if (results.size()) {
+ std::sort(results.begin(), results.end());
+ String *unique_result = std::unique(results.begin(), results.end());
+ for (String *sp = results.begin(); sp < unique_result; sp++)
+ result_errh->message("%s", sp->c_str());
+ }
+}
+
+static void
+do_query_optical_size(const OpenType::Font &otf, ErrorHandler *errh, ErrorHandler *result_errh)
+{
+ int before_nerrors = errh->nerrors();
+ try {
+ String gpos_table = otf.table("GPOS");
+ if (!gpos_table)
+ throw OpenType::Error();
+
+ OpenType::Gpos gpos(gpos_table, errh);
+ OpenType::Name name(otf.table("name"), errh);
+
+ // extract 'size' feature
+ int required_fid;
+ Vector<int> fids;
+ gpos.script_list().features(script, langsys, required_fid, fids, errh);
+
+ int size_fid = gpos.feature_list().find(OpenType::Tag("size"), fids);
+ if (size_fid < 0)
+ throw OpenType::Error();
+
+ // old Adobe fonts implement an old, incorrect idea
+ // of what the FeatureParams offset means.
+ OpenType::Data size_data = gpos.feature_list().size_params(size_fid, name, errh);
+ if (!size_data.length())
+ throw OpenType::Error();
+
+ StringAccum sa;
+ sa << "design size " << (size_data.u16(0) / 10.) << " pt";
+ if (size_data.u16(2) != 0) {
+ sa << ", size range (" << (size_data.u16(6) / 10.) << " pt, "
+ << (size_data.u16(8) / 10.) << " pt], "
+ << "subfamily ID " << size_data.u16(2);
+ if (String n = name.english_name(size_data.u16(4)))
+ sa << ", subfamily name " << n;
+ }
+
+ result_errh->message("%s", sa.c_str());
+
+ } catch (OpenType::Error) {
+ if (errh->nerrors() == before_nerrors)
+ result_errh->message("no optical size information");
+ }
+}
+
+static void
+do_query_family_name(const OpenType::Font &otf, ErrorHandler *errh, ErrorHandler *result_errh)
+{
+ int before_nerrors = errh->nerrors();
+ String family_name = "no family name information";
+
+ if (String name_table = otf.table("name")) {
+ OpenType::Name name(name_table, errh);
+ if (name.ok())
+ family_name = name.english_name(OpenType::Name::N_FAMILY);
+ }
+
+ if (errh->nerrors() == before_nerrors)
+ result_errh->message("%s", family_name.c_str());
+}
+
+static void
+do_query_postscript_name(const OpenType::Font &otf, ErrorHandler *errh, ErrorHandler *result_errh)
+{
+ int before_nerrors = errh->nerrors();
+ String postscript_name = "no PostScript name information";
+
+ if (String name_table = otf.table("name")) {
+ OpenType::Name name(name_table, errh);
+ if (name.ok())
+ postscript_name = name.english_name(OpenType::Name::N_POSTSCRIPT);
+ }
+
+ if (errh->nerrors() == before_nerrors)
+ result_errh->message("%s", postscript_name.c_str());
+}
+
+static void
+do_query_font_version(const OpenType::Font &otf, ErrorHandler *errh, ErrorHandler *result_errh)
+{
+ int before_nerrors = errh->nerrors();
+ String version = "no version information";
+
+ if (String name_table = otf.table("name")) {
+ OpenType::Name name(name_table, errh);
+ if (name.ok())
+ version = name.english_name(OpenType::Name::N_VERSION);
+ }
+
+ if (errh->nerrors() == before_nerrors)
+ result_errh->message("%s", version.c_str());
+}
+
+static void
+do_info(const OpenType::Font &otf, ErrorHandler *errh, ErrorHandler *result_errh)
+{
+ int before_nerrors = errh->nerrors();
+ StringAccum sa;
+
+ if (String name_table = otf.table("name")) {
+ OpenType::Name name(name_table, errh);
+ if (name.ok()) {
+ if (String s = name.english_name(OpenType::Name::N_FAMILY))
+ sa << "Family: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_SUBFAMILY))
+ sa << "Subfamily: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_FULLNAME))
+ sa << "Full name: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_POSTSCRIPT))
+ sa << "PostScript name: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_POSTSCRIPT_CID))
+ sa << "PostScript CID name: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_PREF_FAMILY))
+ sa << "Preferred family: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_PREF_SUBFAMILY))
+ sa << "Preferred subfamily: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_MAC_COMPAT_FULLNAME))
+ sa << "Mac font menu name: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_VERSION))
+ sa << "Version: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_UNIQUEID))
+ sa << "Unique ID: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_DESCRIPTION))
+ sa << "Description: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_DESIGNER))
+ sa << "Designer: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_DESIGNER_URL))
+ sa << "Designer URL: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_MANUFACTURER))
+ sa << "Manufacturer: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_VENDOR_URL))
+ sa << "Vendor URL: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_TRADEMARK))
+ sa << "Trademark: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_COPYRIGHT))
+ sa << "Copyright: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_LICENSE_URL))
+ sa << "License URL: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_LICENSE_DESCRIPTION))
+ sa << "License Description: " << s << "\n";
+ if (String s = name.english_name(OpenType::Name::N_SAMPLE_TEXT))
+ sa << "Sample text: " << s << "\n";
+ }
+ }
+
+ if (errh->nerrors() == before_nerrors)
+ result_errh->message("%s", (sa ? sa.c_str() : "no name information"));
+}
+
+static void
+do_query_glyphs(const OpenType::Font &otf, ErrorHandler *errh, ErrorHandler *result_errh)
+{
+ int before_nerrors = errh->nerrors();
+ try {
+ // get font
+ Cff cff(otf.table("CFF"), errh);
+ if (!cff.ok())
+ throw OpenType::Error();
+
+ Cff::FontParent *fp = cff.font(PermString(), errh);
+ if (!fp || !fp->ok())
+ throw OpenType::Error();
+ Cff::Font *font = dynamic_cast<Cff::Font *>(fp);
+ if (!font) {
+ errh->error("CID-keyed fonts not supported");
+ throw OpenType::Error();
+ }
+
+ // save glyph names
+ Vector<PermString> glyph_names;
+ font->glyph_names(glyph_names);
+ for (PermString* s = glyph_names.begin(); s < glyph_names.end(); s++)
+ result_errh->message("%s", s->c_str());
+ } catch (OpenType::Error) {
+ if (errh->nerrors() == before_nerrors)
+ result_errh->message("no glyph name information");
+ }
+}
+
+static void
+do_tables(const OpenType::Font &otf, ErrorHandler *errh, ErrorHandler *result_errh)
+{
+ int before_nerrors = errh->nerrors();
+ try {
+ int n = otf.ntables();
+
+ for (int i = 0; i < n; i++)
+ if (OpenType::Tag tag = otf.table_tag(i)) {
+ String s = otf.table(tag);
+ result_errh->message("%7u %s\n", s.length(), tag.text().c_str());
+ }
+ } catch (OpenType::Error) {
+ if (errh->nerrors() == before_nerrors)
+ result_errh->message("corrupted tables");
+ }
+}
+
+int
+main(int argc, char *argv[])
+{
+ String::static_initialize();
+ Clp_Parser *clp =
+ Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options);
+ program_name = Clp_ProgramName(clp);
+
+ ErrorHandler *errh = ErrorHandler::static_initialize(new FileErrorHandler(stderr, String(program_name) + ": "));
+ Vector<const char *> input_files;
+ int query = 0;
+
+ while (1) {
+ int opt = Clp_Next(clp);
+ switch (opt) {
+
+ case SCRIPT_OPT: {
+ if (!script.null())
+ usage_error(errh, "--script already specified");
+ String arg = clp->arg;
+ int period = arg.find_left('.');
+ OpenType::Tag scr(period <= 0 ? arg : arg.substring(0, period));
+ if (scr.valid() && period > 0) {
+ OpenType::Tag lang(arg.substring(period + 1));
+ if (lang.valid()) {
+ script = scr;
+ langsys = lang;
+ } else
+ usage_error(errh, "bad language tag");
+ } else if (scr.valid())
+ script = scr;
+ else
+ usage_error(errh, "bad script tag");
+ break;
+ }
+
+ case QUERY_SCRIPTS_OPT:
+ case QUERY_FEATURES_OPT:
+ case QUERY_OPTICAL_SIZE_OPT:
+ case QUERY_POSTSCRIPT_NAME_OPT:
+ case QUERY_GLYPHS_OPT:
+ case QUERY_FAMILY_OPT:
+ case QUERY_FVERSION_OPT:
+ case TABLES_OPT:
+ case INFO_OPT:
+ if (query)
+ usage_error(errh, "supply exactly one query type option");
+ query = opt;
+ break;
+
+ case QUIET_OPT:
+ if (clp->negated)
+ errh = ErrorHandler::default_handler();
+ else
+ errh = new SilentErrorHandler;
+ break;
+
+ case VERBOSE_OPT:
+ verbose = !clp->negated;
+ break;
+
+ case VERSION_OPT:
+ printf("otfinfo (LCDF typetools) %s\n", VERSION);
+ printf("Copyright (C) 2003-2006 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");
+ exit(0);
+ break;
+
+ case HELP_OPT:
+ usage();
+ exit(0);
+ break;
+
+ case Clp_NotOption:
+ input_files.push_back(clp->arg);
+ break;
+
+ case Clp_Done:
+ goto done;
+
+ case Clp_BadOption:
+ usage_error(errh, 0);
+ break;
+
+ default:
+ break;
+
+ }
+ }
+
+ done:
+ if (!query)
+ usage_error(errh, "supply exactly one query option");
+ if (!input_files.size())
+ input_files.push_back("-");
+ if (script.null())
+ script = Efont::OpenType::Tag("latn");
+
+ FileErrorHandler stdout_errh(stdout);
+ for (const char **input_filep = input_files.begin(); input_filep != input_files.end(); input_filep++) {
+ int before_nerrors = errh->nerrors();
+ String font_data = read_file(*input_filep, errh);
+ if (errh->nerrors() != before_nerrors)
+ continue;
+
+ String input_file = printable_filename(*input_filep);
+ LandmarkErrorHandler cerrh(errh, input_file);
+ OpenType::Font otf(font_data, &cerrh);
+ if (!otf.ok())
+ continue;
+
+ PrefixErrorHandler stdout_cerrh(&stdout_errh, input_file + ":");
+ ErrorHandler *result_errh = (input_files.size() > 1 ? static_cast<ErrorHandler *>(&stdout_cerrh) : static_cast<ErrorHandler *>(&stdout_errh));
+ if (query == QUERY_SCRIPTS_OPT)
+ do_query_scripts(otf, &cerrh, result_errh);
+ else if (query == QUERY_FEATURES_OPT)
+ do_query_features(otf, &cerrh, result_errh);
+ else if (query == QUERY_OPTICAL_SIZE_OPT)
+ do_query_optical_size(otf, &cerrh, result_errh);
+ else if (query == QUERY_POSTSCRIPT_NAME_OPT)
+ do_query_postscript_name(otf, &cerrh, result_errh);
+ else if (query == QUERY_GLYPHS_OPT)
+ do_query_glyphs(otf, &cerrh, result_errh);
+ else if (query == QUERY_FAMILY_OPT)
+ do_query_family_name(otf, &cerrh, result_errh);
+ else if (query == QUERY_FVERSION_OPT)
+ do_query_font_version(otf, &cerrh, result_errh);
+ else if (query == TABLES_OPT)
+ do_tables(otf, &cerrh, result_errh);
+ else if (query == INFO_OPT)
+ do_info(otf, &cerrh, result_errh);
+ }
+
+ return (errh->nerrors() == 0 ? 0 : 1);
+}