diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-17 21:41:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-17 21:41:51 +0000 |
commit | 487ca4806cc046076293cf6cc5fbba0db282bac7 (patch) | |
tree | 847b412ab5158dd7bdd7ed7e5a4cc3fbca94be32 /Build/source/texk/afm2pl | |
parent | a3d3111bfe26b8e5f5bc6049dfb2a4ca2edc7881 (diff) |
texk 1
git-svn-id: svn://tug.org/texlive/trunk@1485 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/afm2pl')
-rw-r--r-- | Build/source/texk/afm2pl/COPYING | 340 | ||||
-rw-r--r-- | Build/source/texk/afm2pl/ChangeLog | 54 | ||||
-rw-r--r-- | Build/source/texk/afm2pl/Makefile.in | 42 | ||||
-rw-r--r-- | Build/source/texk/afm2pl/README | 85 | ||||
-rw-r--r-- | Build/source/texk/afm2pl/afm2pl.1 | 275 | ||||
-rw-r--r-- | Build/source/texk/afm2pl/afm2pl.c | 2339 | ||||
-rw-r--r-- | Build/source/texk/afm2pl/afm2pl.html | 202 | ||||
-rw-r--r-- | Build/source/texk/afm2pl/afm2pl.txt | 295 | ||||
-rw-r--r-- | Build/source/texk/afm2pl/afm2pl.xml | 556 | ||||
-rw-r--r-- | Build/source/texk/afm2pl/c-auto.in | 4 | ||||
-rwxr-xr-x | Build/source/texk/afm2pl/configure | 1666 | ||||
-rw-r--r-- | Build/source/texk/afm2pl/configure.in | 25 | ||||
-rw-r--r-- | Build/source/texk/afm2pl/depend.mk | 21 |
13 files changed, 5904 insertions, 0 deletions
diff --git a/Build/source/texk/afm2pl/COPYING b/Build/source/texk/afm2pl/COPYING new file mode 100644 index 00000000000..eeb586b392a --- /dev/null +++ b/Build/source/texk/afm2pl/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/Build/source/texk/afm2pl/ChangeLog b/Build/source/texk/afm2pl/ChangeLog new file mode 100644 index 00000000000..eb41cafe8c3 --- /dev/null +++ b/Build/source/texk/afm2pl/ChangeLog @@ -0,0 +1,54 @@ +June 24 2005 + Release 0.7.03 + * .enc files now searched under <texmf>/fonts/enc + * The slant font dimen now makes it to the pl file(!) + * No longer dependant on header files from texk/dvipsk + * The MinGW-compiled Windows binary should now have correct + default search paths, even without explicit configuration. +July 2004 + Release 0.7.02 + * LIGFILES -> LIGFONTS + * diffs for tex-file.c, tex-file.h and texmf.in now obsolete + * two more configurable global font dimensions; + afm2tfm compatibility option for font dimensions +Mar 13 2004 + Release 0.7.01 + * Made function getline mac-compatible and fixed off-b-one error +Feb 16 2004 + Release 0.7 + * Preparation for inclusion in teTeX/TeX Live source tree. + * .lig is now separate filetype; this required patches in the + kpathsea library. They now reside under $TEXMF/fonts/lig/afm2pl. + * Some encoding vectors have been removed because they are already + available within teTeX/TeX Live. + * The non-kpathsea version is no longer maintained: I no longer test + it, and I also removed the afmtotfm script. + * Names of switches conform now as much as possible to afm2tfm + * Temporarily added fontinst support files. If and when afm2pl gets + built-in, virtual-font based smallcaps and letterspacing these files + will be removed. + +Jan 02 2003 + Release 0.6 + * Added reporting on missing characters; option Verbose + * Stripped 'TeX-' and '.pl' from familyname + * fontinst support files available as separate package + * Perl script afmtotfm: optional use of kpmod + * documentation updated to reflect fontinst + * name of encoding capitalized, for the benefit of fontinst + * yet another texnansi.enc, in which the euro is called Euro + instead of Uni20AC + * patch files added for compilation as part of a teTeX source + +Jul 10 2002 + Release 0.5 + * space-related font dimensions set relative to width space character; + now configurable from the command-line + * bug in error routine fixed: value of global variable param now preserved + * letterspacing added + * documentation in xml, html, man and txt format + * various bugs in handling boundarychar fixed + * newer texnansi.enc, with euro character + +Apr 25 2002 + First release 0.4 diff --git a/Build/source/texk/afm2pl/Makefile.in b/Build/source/texk/afm2pl/Makefile.in new file mode 100644 index 00000000000..8b6f790b56f --- /dev/null +++ b/Build/source/texk/afm2pl/Makefile.in @@ -0,0 +1,42 @@ +# Makefile for afm2pl. Thomas Esser. public domain. + +program = afm2pl +default all: $(program) $(program).1 + +kpse_include ../make/paths.mk +kpse_include ../make/common.mk +kpse_include ../make/programs.mk + +# See INSTALL for compilation options. +# DEFS = @DEFS@ $(XDEFS) -DKPATHSEA -I$(srcdir)/../dvipsk +DEFS = @DEFS@ $(XDEFS) -DKPATHSEA + +objects = $(program).o + +$(program): $(kpathsea) $(objects) + $(kpathsea_link) $(objects) $(LOADLIBES) + +kpse_include ../make/tkpathsea.mk + +install: install-exec install-data +uninstall: uninstall-exec uninstall-data + +install-exec: $(program) + $(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir) + $(INSTALL_LIBTOOL_PROG) $(program) $(bindir) +uninstall-exec: + rm -f $(bindir)/$(program) + +install-data: $(program).1 + $(SHELL) $(top_srcdir)/../mkinstalldirs $(man1dir) + $(INSTALL_DATA) $(srcdir)/$(program).1 $(man1dir)/$(program).$(manext) +uninstall-data: + rm -f $(man1dir)/$(program).$(manext) + +kpse_include ../make/clean.mk +kpse_include ../make/config.mk + +info dvi check: + +kpse_include ../make/rdepend.mk +kpse_include depend.mk diff --git a/Build/source/texk/afm2pl/README b/Build/source/texk/afm2pl/README new file mode 100644 index 00000000000..14526949fad --- /dev/null +++ b/Build/source/texk/afm2pl/README @@ -0,0 +1,85 @@ +DESCRIPTION + +afm2pl is meant to be a replacement for afm2tfm, on which it is +based. Its default action is to convert an afm file to a tfm file, +with preservation of kerns and ligatures (with afm2tfm, preserving +kerns and ligatures is possible only in a roundabout way). + +For PostScript text fonts, Y&Y's texnansi is the recommended +encoding to be used with afm2pl. This gives you a good character +set with all the more important accented characters and many +typographic symbols available as single characters, without a need +for either virtual fonts or a separate text companion font. + +Full LaTeX support for this encoding is available in the form of the +texnansi package, which is already part of TeX Live and teTeX. + +The distribution also contains uppercased and lowercased versions of +texnansi, texnanuc.enc and texnanlc.enc, to allow font-based rather +than macro-based uppercasing and lowercasing. LaTeX macro support +for this, in the context of LaTeX2e's font handling, is not hard; +the key is to treat all-uppercase and all-lowercase as new shapes. + +USAGE + +This is the help message printed by afm2pl: + + Usage: afm2pl [OPTIONS]... FILE[.afm] [FILE[.pl]] + Convert an Adobe font metric file to a TeX font property list. + + -p ENCFILE Read/download ENCFILE for the PostScript encoding + -o Use octal for all character codes in the pl file + -e REAL Widen (extend) characters by a factor of REAL + -s REAL Oblique (slant) characters by REAL, generally <<1 + -m INTEGER Letterspace by INTEGER/1000 em + --help Print this message and exit. + --version Print version number and exit. + + See the man page for full documentation. + + + Email bug reports to ntg-afm2pl@ntg.nl + + +INSTALLATION FROM SOURCE + +Afm2pl is meant to be incorporated into a current TeX Live/teTeX +installation. TeX Live already includes afm2pl, and for teTeX +(version >= 3.0) you can simply place the afm2pl source directory +under texk before compilation. A Windows binary is also provided. + +TROUBLESHOOTING + +Problem: I get warnings + + I had to round some heights by 10.0000000 units. + I had to round some depths by 2.0000000 units. + +Solution: This is not a problem. afm2pl uses units of 1/1000 times +the design size, so these rounding errors are really quite small. + +Problem: Characters are missing. I am using T1 encoding. + +T1 encoding requires virtual fonts, since it encodes many accented +characters which aren't available as single characters in commercial +Type 1 fonts. Afm2pl doesn't create virtual fonts. By using texnansi +instead, you force TeX to compose these missing characters from an +accent and the base character. + +Problem: Letterspacing doesn't work + +Explanation: In this version, letterspacing is implemented with +kerns. However, the tfm format accomodates only about half the +amount of kerning pairs needed for full letterspacing. I have tried +hard to create a set which falls within these boundaries but still +contains all kerning pairs which are likely to matter. If you use a +different encoding, you might exceed these boundaries and as a +consequence lose all glyphs and kerns. + +Feedback is welcome. + +June 23 2005 + +Siep Kroonenberg +ntg-afm2pl@ntg.nl +http://www.ntg.nl/afm2pl.html diff --git a/Build/source/texk/afm2pl/afm2pl.1 b/Build/source/texk/afm2pl/afm2pl.1 new file mode 100644 index 00000000000..91c8282166d --- /dev/null +++ b/Build/source/texk/afm2pl/afm2pl.1 @@ -0,0 +1,275 @@ +.\"Generated by db2man.xsl. Don't modify this, modify the source. +.de Sh \" Subsection +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Ip \" List item +.br +.ie \\n(.$>=3 .ne \\$3 +.el .ne 3 +.IP "\\$1" \\$2 +.. +.TH "AFM2PL" 1 "February 2004" "" "afm2pl" +.SH NAME +afm2pl \- convert AFM font metrics to TeX pl font metrics +.SH "SYNOPSIS" +.ad l +.hy 0 +.HP 7 +\fBafm2pl\fR [\fB\-p\fR\ \fIencoding_file\fR] [\fB\-o\fR] [\fB\-e\fR\ \fIextension_factor\fR] [\fB\-s\fR\ \fIslant_factor\fR] [\fB\-f\fR\ \fIfont_dimensions\fR] [\fB\-k\fR] [\fB\-m\fR\ \fIletter_spacing\fR] [\fB\-l\fR\ \fIligkern_spec\fR] [\fB\-L\fR\ \fIligkern_spec\fR] {\fIinput_file[\&.afm]\fR} [\fIoutput_file[\&.pl]\fR] +.ad +.hy +.ad l +.hy 0 +.HP 7 +\fBafm2pl\fR {\fB\-\-help\fR | \fB\-\-version\fR} +.ad +.hy + +.SH "DESCRIPTION" + +.PP +afm2pl converts an afm (Adobe Font Metric) file into a pl (Property List) file, which in its turn can be converted to a tfm (TeX Font Metric) file\&. It preserves kerns and ligatures\&. + +.PP +afm2pl is meant to be a replacement for afm2tfm, on which it is based\&. With afm2tfm, preserving kerns and ligatures is possible only in a roundabout way\&. + +.PP +For text fonts, Y&Y's texnansi is the recommended encoding to be used with afm2pl\&. This gives you a good character set with all the more important accented characters and many typographic symbols available as single characters, without a need for either virtual fonts or a separate text companion font\&. + +.PP +Full LaTeX support for this encoding is available in the form of the texnansi package, which is already part of TeX Live and teTeX\&. These distributions also contain the encoding file texnansi\&.enc\&. + +.PP +The distribution contains uppercased and lowercased versions of texnansi, viz\&. texnanuc\&.enc and texnanlc\&.enc, to allow font\-based rather than macro\-based uppercasing and lowercasing, and the familiar old ot1 encoding plus some variations in PostScript \&.enc format (I included these because they seem to be absent from teTeX/TeX Live)\&. + +.PP +Return value: 0 if no error; a negative number indicating the number of missing glyphs if conversion was successfull but glyphs are missing, and 1 in case of error\&. + +.SH "OPTIONS" + +.TP +\fB\-p\fR \fIencoding_file\fR +The default is the encoding specified in the afm file, which had better match the encoding in the fontfile (pfa or pfb)\&. The generated mapfile entry (see below) instructs pdftex or the dvi driver to reencode the font on the fly\&. On\-the\-fly reencoding does not require virtual fonts\&. + +.TP +\fB\-o\fR +Use octal for all character codes in the pl file\&. + +.TP +\fB\-e\fR \fIextend_factor\fR +Widen or narrow characters by \fIextend_factor\fR\&. Default is 1\&.0 (natural width)\&. Not recommended, except that arguably a narrowed Courier is less jarring than a full\-width Courier, when used in combination with a normal proportional font\&. For Courier, choose \&.833 to match the width of cmtt\&. + +.TP +\fB\-s\fR \fIslant_factor\fR +Oblique (slant) characters by \fIslant_factor\fR\&. Not recommended\&. + +.TP +\fB\-f\fR \fIfont_dimensions\fR +The value is either the keyword afm2tfm or a comma\-separated list of up to five integers\&. The parameters are listed below, with their defaults and their value when the afm2tfm keyword is specified\&. 'Space' means the width of a space in the target font, except of course in the last row\&. Keep in mind that the design size is 1000, and that all numbers must be nonnegative integers\&. + +.PP +.TS +lll +___ +lll. +Font dimension Default value Afm2tfm value +\fIstretch\fR space div 2 300 x \fIextend_factor\fR +\fIshrink\fR space div 3 100 x \fIextend_factor\fR +\fIextra space\fR space div 3 missing +\fIquad\fR 2 x width of '0' 1000 x \fIextend_factor\fR +\fIspace\fR (space source font) x \fIextend_factor\fR (space source font) x \fIextend_factor\fR +.TE +For fixed\-pitch fonts, different values apply: + +.PP +.TS +lll +___ +lll. +Font dimension Default value Afm2tfm value +\fIstretch\fR 0 0 +\fIshrink\fR 0 0 +\fIextra space\fR space missing +\fIquad\fR 2 x character width 1000 x \fIextend_factor\fR +\fIspace\fR character width character width +.TE +Specify just a non\-default stretch and shrink with e\&.g\&. 150,70 and just a non\-default extra space with ,,10\&. + +.TP +\fB\-k\fR +Keep original ligatures\&. This option only has effect in combination with positive letterspacing; see the section on letterspacing and extra ligkern info\&. + +.TP +\fB\-m\fR \fIletter_spacing\fR +Letterspace by \fIletter_spacing\fR/1000 em (integer)\&. This is useful for making all\-caps typesetting look better\&. Try a value of e\&.g\&. 50 or 100\&. But see the section on letterspacing and extra ligkern info for details\&. + +.TP +\fB\-l\fR \fIligkern_spec\fR, \fB\-L\fR \fIligkern_spec\fR +See the section on extra ligkern info for details\&. + +.TP +\fB\-V\fR +Verbose\&. If turned on, it reports the number of missing glyphs to stderr and their names to stdout\&. This is not particularly logical, but this way the glyph names can be captured even under Windows\&. + +.TP +\fB\-\-help\fR +Display a short usage message\&. + +.TP +\fB\-\-version\fR +Display the version number of afm2pl\&. + +.SH "MAPFILE ENTRIES" + +.PP +afm2pl writes a mapfile entry to a file with the same basename as the pl output file, but with extension \&.map\&. It can be used for the dvips mapfile and for the pdftex mapfile, although, in case of a geometrically transformed font, it may be better to remove the PostScript name for a pdftex mapfile entry\&. It is assumed that the pfb file has the same basename as the afm file and must be downloaded\&. You may have to hand\-edit this entry\&. + +.PP +You can configure dvips and pdftex to read this additional mapfile or otherwise add the entry to an existing mapfile\&. It appears that pdftex automatically will consult a mapfile xxx\&.map for a font xxx\&. + +.SH "EXTRA LIGKERN INFO" + +.PP +Most users are well\-advised to leave this mess alone and to accept the default behavior\&. + +.PP +The ligatures and kerns present in the afm file can be modified in various ways\&. Default, the encoding file is scanned for extra ligkern specifications, whose format will be described below\&. If there are no ligkern specifications in the encoding file, then extra ligkern specifications will be read from a file default\&.lig\&. A value of 0 for \fIligkern_spec\fR means that the ligatures and kerns from the afm file won't be tampered with and a value of 1 specifies default behavior\&. One can also specify a comma\-separated list of files with extra ligkerns specs\&. + +.PP +If afm2pl is compiled with the kpathsea library, then these files will be searched for under $TEXMF/fonts/lig\&. + +.PP +Note that ligatures and kerns are hints for the typesetting application; there is no need to download this information to the printer or to make it available to a dvi driver\&. + +.PP +The parser for ligkern info has been inherited from afm2tfm virtually without change\&. A ligkern specification can have one of the following forms: + +.IP + +\fIglyph_name1\fR \fIglyph_name2\fR \fIlig_op\fR \fIglyph_name3\fR ; + +.PP +This specifies a ligature\&. Possible values for \fIlig_op\fR are =:, |=:, |=:>, =:|, =:|>, |=:|, |=:|> and |=:|>>\&. These correspond to LIG, /LIG, /LIG>, LIG/, LIG/>, /LIG/, /LIG/>, /LIG/>> in \&.pl syntax; see the pltotf documentation and the \&.lig files in the distribution\&. + +.IP + +\fIglyph_name1\fR <> \fIglyph_name2\fR ; + +.PP +Kern \fIglyph_name1\fR as \fIglyph_name2\fR\&. + +.IP + +\fIglyph_name1\fR {} \fIglyph_name2\fR ; + +.PP +Remove the kern between \fIglyph_name1\fR and \fIglyph_name2\fR\&. A value of * for either glyph name is interpreted as a wildcard\&. + +.IP + +|| = \fIglyph\fR ; + +.PP +Set the (right) boundary character to \fIglyph\fR\&. \fIglyph\fR may be either a glyphname or a slot in the encoding vector\&. Choosing a glyph which doesn't occur in the output encoding is equivalent to not specifying a boundarychar at all\&. It is ok to pick an encoded glyphname which does not occur in the afm\&. In fact, this is what default\&.lig does: || = cwm ;\&. + +.PP +You can copy the kerns of an unencoded character to the boundarychar: + +.IP + +|| <> space ; + +.PP +This ligkern specification should occur before the one that deletes space kerns\&. + +.PP +A ligkern specification should be contained within one line\&. One line may contain several ligkern specifications, separated by spaces\&. Note that ; (space followed by semicolon) is considered part of the ligkern specification\&. See the lig files included in this distribution\&. Example: + +.IP + +one {} * ; * {} one ; two {} * ; * {} two ; + +.PP +Lines with ligkern specifications inside an encoding file should start with % LIGKERN\&. Ligkern specifications in a lig file may optionally start this way\&. + +.SH "LETTERSPACING AND EXTRA LIGKERN INFO" + +.PP +Letterspacing has various side\-effects for ligkern info\&. Instead of simply applying the extra ligkern info (see previous section), the following is done: + +.TP 3 +1. +In case of positive letterspacing, native ligatures are removed, unless the \-k option is specified\&. +.TP +2. +Extra ligkern info is applied as usual, except that in case of positive letterspacing different defaults apply: \-l 0 is quietly ignored, ligkern comments in the encoding file are ignored, and defpre\&.lig is read instead of default\&.lig\&. +.TP +3. +Letterspacing is applied\&. This adds a lot of kerns, and modifies existing kerns\&. +.TP +4. +The extra ligkern info specified with \-L is applied\&. The only ligkern specs which are allowed here, are removals of kerning pairs (with the {} operator)\&. Values 0 and 1 have a similar meaning as for the \-l parameter\&. The tfm format has room for only about 180x180 ligatures and kerning pairs\&. This is enough for OT1 encoding, but for texnansi encoding quite a few ligkern specifications have to be removed\&. The pltotf program will remove all ligkern info if too many ligatures and kerns remain\&. The default lig file is defpost\&.lig\&. This file throws out kerning pairs which are unlikely to be involved in letterspacing, such as kerns involving accents or kerns with a punctuation character or right bracket at the left\&. It does not add letterspacing kerns involving boundarychars\&. Instead, fontspace is increased by twice the letterspacing\&. defpost\&.lig throws out enough kerns in case of texnansi encoding\&. With other encodings, you may have to throw out additional kerning pairs\&. +.LP + +.SH "FONT-BASED UPPER- AND LOWERCASING" + +.PP +The distribution includes encoding vectors texnanuc\&.enc and texnanlc\&.enc which produce all\-uppercase and all\-lowercase fonts\&. The distribution contains an example ucshape\&.tex on how to use such fonts with LaTeX font selection\&. + +.PP +The principal uses for an all\-uppercase font are page headers and section heads\&. If these contain math, then macro\-based uppercasing would create unpleasant complications\&. + +.SS "The sz ligature" + +.PP +Note that the texnanuc encoding provides no glyph for the sz ligature; you'll either have to substitute ss or provide a macro\-based solution\&. The following code uses either the usual glyph or substitutes the letters ss, depending on whether the glyph exists in the current font: + +.nf + + +\\def\\ss{% + \\setbox0\\hbox{\\char25}% + \\ifnum\\wd0=0 ss\\else\\box0\\fi +} + + +.fi + +.PP +In LaTeX, this code appears to work well enough, although on occasion you may need to insert \\protect\&. A better solution might involve the sixth parameter of the \\DeclareFontShape macro, but I failed to get that to work\&. + +.SH "AFM2PL, FONTINST AND ARTIFICIAL SMALLCAPS" + +.PP +Afm2pl currently doesn't do virtual fonts\&. That means that for things such as artificial smallcaps you have to turn elsewhere, e\&.g\&. to the fontinst package, which is part of any mainstream TeX distribution\&. + +.PP +Look under texmf/tex/fontinst for fontinst support files, which allow you to generate a smallcaps font (tfm and vf files) from an afm2pl\-generated tfm file\&. This package only supports texnansi encoding\&. + +.PP +There should be no real problem in doing the same for OT1 encoding\&. However, there are several variations of the OT1 encoding to take care of\&. Also, there are as far as I know no officially sanctioned PostScript names for all the variations of the OT1 encoding; the fontinst names contain spaces and are therefore not useable as PostScript names\&. + +.SH "FUTURE PLANS" + +.PP +I am considering a revision which makes afm2pl a more complete replacement for afm2tfm\&. In that version, afm2pl can optionally create a second, virtual font, possibly with a different encoding and possibly letterspaced\&. The current option of non\-virtual letterspacing via kerns will be dropped\&. If the encodings differ then it is assumed that the virtual font is intended as a small\-caps version of the main font, and a scaling parameter can be specified for non\-matching glyphs\&. + +.SH "COPYRIGHT" + +.PP +The afm2pl distribution is subject to the GNU General Public Licence (GPL)\&. Please refer to the file COPYING for details\&. + +.PP +The afm2pl homepage is http://www\&.ntg\&.nl/afm2pl\&.html: \fIhttp://www.ntg.nl/afm2pl.html\fR\&. + +.SH AUTHOR +Siep Kroonenberg <ntg\-afm2pl@ntg\&.nl>. diff --git a/Build/source/texk/afm2pl/afm2pl.c b/Build/source/texk/afm2pl/afm2pl.c new file mode 100644 index 00000000000..80fa9e856e8 --- /dev/null +++ b/Build/source/texk/afm2pl/afm2pl.c @@ -0,0 +1,2339 @@ +/* afm2pl + * Copyright (C) 2002, 2005 Siep Kroonenberg + * ntg-afm2pl@ntg.nl + * based on afm2tfm. + */ + +/* Here the opening comments from afm2tfm: + ********************************************************************* + * (Modified by Don Knuth from Tom Rokicki's pre-VPL version.) + * + * VM/CMS port by J. Hafner (hafner@almaden.ibm.com), based on + * the port by Alessio Guglielmi (guglielmi@ipisnsib.bitnet) + * and Marco Prevedelli (prevedelli@ipisnsva.bitnet). + * This port is still in test state. No guarantees. + * 11/3/92: more corrections to VM/CMS port. Now it looks correct + * and will be supported by J. Hafner. + * + * More changes, primarily from Karl Berry, enough for a new version + * number to 8.0; 1 December 1996. Note that this version computes + * checksums differently (more intelligently). + * + *********************************************************************/ + +/* Changed features: + * writes pl with lig- and kern info instead of tfm + * never adds characters not explicitly specified in the encoding + * extra ligkern info, previously hardwired in the source, is now + * read from an external file. This may include accented char ligatures. + * Default behavior still matches afm2tfm, given the right ligkern + * files. + * letterspacing option, implemented as kerning pairs between any + * two characters. + * + * For VM/CMS we no longer need asciified names for the font or the + * encoding since we write an ascii pl file instead of a binary tfm. + * + * This version doesn't try as hard to always give sensible output. + * On the other hand, since it uses simpler logic, it should be + * easier for the user to figure out the cause of failures. + * + * changes in structure: + * writes character metrics directly to an array + * metric information is transformed in stages + * does not create smallcaps + */ + +/* differences between afm and tfm: + * afm usually has a space char + * afm lists chars by name and also includes unencoded chars + * afm lists ligatures together with their first `component', + * and lists kerns separately. + * afm implies 3-way ligs by recursive application of 2-way glyphs + * afm allows negative heights and depths + * + * tfm usually doesn't have a space char + * tfm may have boundarychar ligkerns instead of space ligkerns + * tfm is lists chars by code and is glyphname-agnostic + * tfm contains a ligkern table, where entries are sorted by left + * `component'. 3-way ligs are written out in one lig `program'. + * tfm may contain some special-purpose ligs such as + * question quoteleft =: questiondown + */ + +/******************************************************************* + * includes, defines, system */ + +#ifdef HAVE_CONFIG_H +#define KPATHSEA 1 +#include <kpathsea/config.h> +#include <kpathsea/debug.h> +#include <kpathsea/tex-file.h> +#include "c-auto.h" +#include <kpathsea/c-ctype.h> +#include <kpathsea/progname.h> +#else /* standalone compile */ +#include <stdio.h> +#include <stdlib.h> +#include <ctype.h> +#if defined(SYSV) || defined(VMS) || defined(__THINK__) || defined(MSDOS) || defined(OS2) || defined(ATARIST) || defined(WIN32) +#include <string.h> +#else +#include <strings.h> +#endif +#include <math.h> +#ifdef ATARIST +#include <float.h> +#endif +#endif /* KPATHSEA */ + +#ifdef VMCMS +#define interesting lookstr /* for 8 character truncation conflicts */ +#include "dvipscms.h" +extern FILE *cmsfopen (); +extern char ascii2ebcdic[]; +#ifdef fopen +#undef fopen +#endif +#define fopen cmsfopen +#endif + +/* from dvips.h: + +#ifdef VMS +#include "[.vms]vms.h" +#endif /* VMS */ + +/* + * Is your malloc big? + */ +#if defined(MSDOS) && !defined(__EMX__) && !defined(DJGPP) +#define SMALLMALLOC +#endif +#if defined(OS2) && defined(_MSC_VER) +#define SMALLMALLOC +#endif + +#if (defined(MSDOS) && !defined(DJGPP)) || (defined(OS2) && defined(_MSC_VER)) || defined(ATARIST) +typedef long integer; +#else +typedef int integer; +#endif + +#ifndef KPATHSEA +typedef char boolean; +#endif + +#ifdef WIN32 +#define Boolean boolean +#else +#ifndef __THINK__ +typedef short Boolean ; +#endif +#endif + +/************************************************************** + * data structures */ + +/* Adobe char metrics; one lig- and kern linked list for each + * adobechar + */ + +struct lig { + struct lig *next; + char *succ, *sub; + short op, boundright; /* boundright: succ is rboundarychar */ +}; + +struct kern { + struct kern *next; + char *succ; + int delta; +}; + +/* metric info for one char */ +struct adobeinfo { + int adobenum, tfmnum, width; + char *adobename; + int llx, lly, urx, ury; + int nonstd_lk; /* non-standard ligs and/or kerns */ + struct lig *ligs; + struct kern *kerns; +}; +/* The nonstd_lk field is for efficiency in case of letterspacing. + * With letterspacing, all glyphs originally without ligs or + * kerns do show up in the ligkern table, but with identical + * information. We write them in one go to the ligkern table. + */ + +/* encodings */ +struct encoding { + char *name; + char *vec[256]; +}; + +/* struct to store the names of files with extra ligkern info */ +struct nstrings { + int n; + char **names; +}; + +/************************************************************* + * global vars */ + +#define buflen 256 +char buffer[buflen]; /* input buffer (modified while parsing) */ +char obuffer[buflen]; /* unmodified copy of input buffer */ +char *param; /* current position in input buffer */ + +char *fontname = "Unknown"; +char *codingscheme = "UNSPECIFIED"; + +struct encoding *afmencoding = NULL; +struct encoding *outencoding = NULL; +char *ligoption = "1"; /* which extra ligkerns? */ +char *Ligoption = "1"; /* extra ligkern info after letterspacing */ +int based_on; /* name output file based on name afm file? */ + +FILE *infile, *outfile; +char *afmname, *outname; /* names of input and output files */ +char *encfilename; /* encoding file */ +struct nstrings *ligfilenames; /* for files with extra ligkern info */ +struct nstrings *Ligfilenames; /* same; for after letterspacing */ +char *ligfilename; + +struct adobeinfo +**adobechars, /* array of adobeinfo structs, from afm and in afm order */ + *tfmptrs[256]; /* same, but indexed by tfm order */ + +int tfmnext[256]; /* for characters encoded multiple times in output */ + +/* global font info */ +int iglyph, nglyphs, nglyphsb; /* glyph no., n. of glyphs in afm */ +float italicangle = 0.0; +float newslant = 0.0; /* computed from slant and italicangle */ +int fixedpitch; +int afm2tfm_compat = 0; /* create afm2tfm-compatible font dimensions */ +int xheight = 0; +int fontspace = -1; +int fstretch = -1; +int fshrink = -1; +int fextra = -1; +int fquad = -1; +int charwidth = 0; + +float efactor = 1.0, slant = 0.0; /* requested transformation */ +int lspace = 0; /* for letterspacing */ +char *efactorparam, *slantparam, *lspaceparam; +int forceoctal = 0; +int keepligs = 0; /* retain afm ligs in spite of lspace>0 */ + +int rboundarychar = -1; /* the (right) boundary character */ +char *boundaryname = "||"; /* name of boundarychars for liginfo specs */ +struct adobeinfo *rbound, *lbound; +char *boundglyph = NULL; + /* glyph name of rboundarychar; non-null only if encoded */ + /* track presence of r- and l boundarychar ligkerns. + * we don't check whether the real chars in those ligkerns + * are encoded, so we may get false positives + */ + +int missingchars = 0; +int verbose = 0; + +/************************************************************** + * general utility functions */ + +/* see dvips.h about PnC and PnH: a trick to turn prototypes on or + * off with one #define */ + +/* little hack: error message is warning unless it starts with '!' */ +void + error +P1C (register char *, s) +{ + char *parasave; + parasave = param; + (void) fprintf (stderr, "%s\n", s); + if (obuffer[0]) { + (void) fprintf (stderr, "%s\n", obuffer); + while (param > buffer) { + (void) fprintf (stderr, " "); + param--; + } + (void) fprintf (stderr, "^\n"); + } + if (*s == '!') + exit (1); + param = parasave; +} + +char *mymalloc +P1C (unsigned long, len) +{ + register char *p; + unsigned long i; + +#ifdef SMALLMALLOC + if (len > 65500L) + error ("! can't allocate more than 64K!"); +#endif + p = malloc ((unsigned) len); + if (p == NULL) + error ("! out of memory"); + for (i = 0; i < len; i++) + p[i] = 0; + return (p); +} + +char *newstring +P1C (char *, s) +{ + char *q = mymalloc ((unsigned long) (strlen (s) + 1)); + (void) strcpy (q, s); + return q; +} + +/* find a glyph name in an adobeinfo array */ +struct adobeinfo *findname +P3C (struct adobeinfo **, achars, int, n, char *, p) +{ + register int i; + for (i = 0; i < n; i++) + if (achars[i] && strcmp (p, achars[i]->adobename) == 0) + return achars[i]; + return NULL; +} + +/* Find glyph info by name in the original adobechars array + * We don't include the boundarychars in the search but always test + * separately for those. + */ +struct adobeinfo *findadobe +P1C (char *, p) +{ + return findname (adobechars, nglyphs, p); +} + +/* Find glyph info by name in target encoding */ +struct adobeinfo *findtfm +P1C (char *, p) +{ + return findname (tfmptrs, 256, p); +} + +/* just for adobechars, we sometimes want the index instead */ +int findindex +P1C (char *, p) +{ + int i; + for (i = 0; i < nglyphs; i++) + if (adobechars[i] && strcmp (p, adobechars[i]->adobename) == 0) + return i; + return -1; +} + +/* geometrically transformed boundingbox */ +int + transform +P2C (register int, x, register int, y) +{ + register double acc; + acc = efactor * x + slant * y; + return (int) (acc >= 0 ? floor (acc + 0.5) : ceil (acc - 0.5)); +} + +/* read a line from infile into buffer and obuffer */ +int + getline +P1H (void) +{ + register char *p; + register int c; + int maxline; + + param = buffer; + p = buffer; + maxline = buflen; + c = 0; /* to suppress phony compiler warning */ + while (((c = getc (infile)) != EOF) && (c != '\n') && (c != '\r')) + /* added: test for \r. The way we do it, the DOS cr/lf convention + * leads to alternating empty lines, but that is ok. + */ + if (--maxline > 0) *p++ = c; + *p = 0; + (void) strcpy (obuffer, buffer); + if (p == buffer && c == EOF) + return (0); + else + return (1); +} + +/******************************************************* + * file handling + */ + +#ifndef KPATHSEA +/* simple versions of concat (concatenate with allocation), + * kpse_find_suffix, xbasename and an enum for kpse_file_format_type. + * This is to reduce the number of #ifdef KPATHSEA sections. + */ +typedef enum { + kpse_afm_format, kpse_lig_format, kpse_enc_format +} kpse_file_format_type; + +/* string concatenation with allocation */ +char *concat +P2C (char *, s1, char *, s2) +{ + char *answer = (char *) malloc (strlen (s1) + strlen (s2) + 1); + strcpy (answer, s1); + strcat (answer, s2); + + return answer; +} + +/* Return pointer to first character after `.' in last directory element + * of NAME. If the name is `foo' or `/foo.bar/baz', we have no extension. + */ +char *find_suffix +P1C (char *, name) +{ + char *slash_pos; + char *dot_pos = (char *) strrchr (name, '.'); + + if (dot_pos == NULL) + return NULL; + + /* find last directory separator */ + for (slash_pos = name + strlen (name); + slash_pos > dot_pos && + (*slash_pos != ':' && *slash_pos != '\\' && *slash_pos != '/'); + slash_pos--); + + /* accept suffix only if after last path separator */ + return slash_pos > dot_pos ? NULL : dot_pos + 1; +} + +/* Return pointer to filename with leading path stripped */ +char *xbasename +P1C (char *, name) +{ + char *base = NULL; + unsigned len = strlen (name); + + for (len = strlen (name); len > 0; len--) { + if (name[len - 1] == ':' || name[len - 1] == '\\' + || name[len - 1] == '/') { + base = name + len; + break; + } + } + if (!base) + base = name; + return base; +} + +#endif +/* end of KPATHSEA replacements */ + +/* file open functions; abort in case of failure; return filename */ + +/* open file for reading + * parameters: (pointer to) requested filename + * return (pointer to) actual filename without dir + * Since we only have one input file open at any time + * we use a global file variable infile. + * Note. The kpse lib fu concat itself takes care of + * allocating the result string + * kpse handling isn't so helpful in the enc- and lig cases, + * so we add a suffix explicitly. + */ +char *openin +P3C (char *, fname, kpse_file_format_type, format, char *, ext) +{ + char *realfname; + +#ifdef KPATHSEA + realfname = kpse_find_file (fname, format, false); + if (!realfname) { + realfname = concat (fname, ext); + realfname = kpse_find_file (realfname, format, false); + } + if (!realfname) + FATAL1 ("%s not found", fname); + infile = kpse_open_file (realfname, format); + if (infile) + return (char *)xbasename (realfname); + else + FATAL1 ("couldn't open %s", realfname); +#else + realfname = fname; + infile = fopen (realfname, "r"); + if (!infile && !find_suffix (realfname)) { + realfname = concat (fname, ext); + infile = fopen (realfname, "r"); + } + if (infile) + return realfname; + else + error (concat ("!couldn't open ", realfname)); +#endif + return NULL; +} + +/* open file for writing + * Parameter based_on: if non-zero, then fname was the name + * of the afm file, and we have to construct a new name + * based on fname: + * - replace an extension ".afm" with ".pl" + * - strip leading path+ + * In this function, kpathsea functions don't provide better + * functionality, but they do improve portability. + */ +char *openout +P3C (char *, fname, int, based_on, char *, outext) +{ + char *inext = ".afm"; + /* use inext+1 and outext+1 when the leading dot is not desired */ + char *realfname, *suf; + + if (based_on) { /* compute output filename */ + suf = find_suffix (fname); + if (suf && !strcmp ((inext + 1), suf)) { /* replace afm suffix */ + realfname = newstring (fname); + suf = find_suffix (realfname); + suf[0] = 0; + strcat (realfname, (outext + 1)); + /* no allocation required: new suffix not longer than old one */ + } else /* append new suffix */ + realfname = concat (fname, outext); + realfname = (char *)xbasename (realfname); + } else { + suf = find_suffix (fname); + if (suf) + realfname = fname; + else + realfname = concat (fname, outext); + } + outfile = fopen (realfname, "w"); + /* afm2tfm uses WRITEBIN instead of "w" for some OS-es */ + if (outfile) + return realfname; + else + error (concat ("!", concat (realfname, " not found"))); + return NULL; +} + +/******************************************************** + * reading the afm + */ + +char *interesting[] = { "FontName", "ItalicAngle", "IsFixedPitch", + "XHeight", "C", "KPX", "EncodingScheme", + "StartCharMetrics", "CharWidth", NULL +}; +#define FontName (0) +#define ItalicAngle (1) +#define IsFixedPitch (2) +#define XHeight (3) +#define C (4) +#define KPX (5) +#define EncodingScheme (6) +#define StartCharMetrics (7) +#define CharWidth (8) +#define NONE (-1) +int + interest +P1C (char *, s) +{ + register char **p; + register int n; + + for (p = interesting, n = 0; *p; p++, n++) + if (strcmp (s, *p) == 0) + return (n); + return (NONE); +} + +/* At function call, param points to the first char of the next + * string, or to eol. + * In the input buffer, a terminating space is replaced with a null char. + * Before termination, param is moved to the start of the next + * string, or to eol. + */ + +/* next (parameter) string (param is input pointer), + * with allocation */ + +char *paramnewstring +P1H (void) +{ + register char *p, *q; + + p = param; + while (*p > ' ') + p++; + if (*p != 0) + *p++ = 0; + q = newstring (param); + while (*p && *p <= ' ') + p++; + param = p; + return (q); +} + +/* next (parameter) string from afm file (param is input pointer), + * pre-allocated */ + +char *paramstring +P1H (void) +{ + register char *p, *q; + + p = param; + while (*p > ' ') + p++; + q = param; + if (*p != 0) + *p++ = 0; + while (*p && *p <= ' ') + p++; + param = p; + return (q); +} + +int + paramnum +P1H (void) +{ + register char *p; + int i; + + p = paramstring (); + if (sscanf (p, "%d", &i) != 1) + error ("! integer expected"); + return (i); +} + +float + paramfloat +P1H (void) +{ + register char *p; + float i; + + p = paramstring (); + if (sscanf (p, "%f", &i) != 1) + error ("! number expected"); + return (i); +} + +void + expect +P1C (char *, s) +{ + if (strcmp (paramstring (), s) != 0) { + (void) fprintf (stderr, "%s expected: ", s); + error ("! syntax error"); + } +} + +/* allocating and initializing structs */ + +/* initialize afm info for one char */ +struct adobeinfo *newchar +P1H (void) +{ + register struct adobeinfo *ai; + + ai = (struct adobeinfo *) mymalloc ((unsigned long) + sizeof (struct adobeinfo)); + ai->adobenum = -1; + ai->tfmnum = -1; + /* ai->kern_as = NULL; */ + ai->width = -1; + ai->adobename = NULL; + ai->llx = -1; + ai->lly = -1; + ai->urx = -1; + ai->ury = -1; + ai->ligs = NULL; + ai->kerns = NULL; + /* ai->kern_equivs = NULL ; */ + return (ai); +} + +struct kern *newkern +P1H (void) +{ + register struct kern *nk; + + nk = (struct kern *) mymalloc ((unsigned long) sizeof (struct kern)); + nk->next = NULL; + nk->succ = NULL; + nk->delta = 0; + return (nk); +} + +struct lig *newlig +P1H (void) +{ + register struct lig *nl; + + nl = (struct lig *) mymalloc ((unsigned long) sizeof (struct lig)); + nl->next = NULL; + nl->succ = NULL; + nl->sub = NULL; + nl->op = 0; /* the default =: op */ + nl->boundright = 0; + return (nl); +} + +/* read and interpret afm info for 1 char + * adobeptrs is an array of pointers to adobeinfo structs + * indexed by adobenum. + * */ +void + handlechar +P1H (void) +{ /* an input line beginning with C */ + register struct adobeinfo *ai; + register struct lig *nl; + + if ((++iglyph) >= nglyphs) + error ("!Too many glyphs in afm"); + adobechars[iglyph] = newchar (); + ai = adobechars[iglyph]; + ai->adobenum = paramnum (); + expect (";"); + expect ("WX"); + ai->width = paramnum (); + if (fixedpitch) + charwidth = ai->width; + expect (";"); + expect ("N"); + ai->adobename = paramnewstring (); + if ((ai->adobenum) >= 0) + afmencoding->vec[ai->adobenum] = newstring (ai->adobename); + expect (";"); + expect ("B"); + ai->llx = paramnum (); + ai->lly = paramnum (); + ai->urx = paramnum (); + ai->ury = paramnum (); + expect (";"); +/* Now look for ligatures (which aren't present in fixedpitch fonts) */ + while (*param == 'L' && !fixedpitch) { + expect ("L"); + nl = newlig (); + nl->succ = paramnewstring (); + nl->sub = paramnewstring (); + nl->next = ai->ligs; + ai->ligs = nl; + expect (";"); + } +} + +void + handlekern +P1H (void) +{ /* an input line beginning with KPX */ + register struct adobeinfo *ai; + register char *p, *sc; + register struct kern *nk; + int dlt; + + p = paramstring (); + ai = findadobe (p); + if (!ai) + error ("kern char not found"); + else { + sc = paramstring (); + dlt = paramnum (); + if (dlt) { + nk = newkern (); + nk->succ = newstring (sc); + nk->delta = dlt; + nk->next = ai->kerns; + ai->kerns = nk; + } + } +} + +/* read afm file */ +void + readadobe +P1H (void) +{ + struct adobeinfo *ai; + char *inname; + int i; + + /* open afm file */ + inname = newstring (afmname); + inname = openin (inname, kpse_afm_format, ".afm"); + + nglyphs = -1; /* allocate adobechars at StartCharMetrics */ + afmencoding = (struct encoding *) mymalloc ((unsigned long) + sizeof (struct encoding)); + for (i = 0; i < 256; i++) + afmencoding->vec[i] = ".notdef"; + afmencoding->name = "Unspecified"; + + while (getline ()) { + switch (interest (paramstring ())) { + case FontName: + fontname = paramnewstring (); + break; + case EncodingScheme: + afmencoding->name = paramnewstring (); + break; + case ItalicAngle: + italicangle = paramfloat (); + break; + case IsFixedPitch: + if (*param == 't' || *param == 'T') + fixedpitch = 1; + else + fixedpitch = 0; + break; + case XHeight: + xheight = paramnum (); + break; + case StartCharMetrics: + nglyphs = paramnum (); + nglyphsb = nglyphs + 1; + iglyph = -1; + /* Allocate adobechars array (just the array of pointers). + * Reserve extra slot for rboundarychar + */ + adobechars = + (struct adobeinfo **) mymalloc ((unsigned long) (nglyphs+1) * + (unsigned long) sizeof (struct + adobeinfo + *)); + break; + case C: + handlechar (); + break; + case KPX: + handlekern (); + break; + case CharWidth: + charwidth = paramnum (); + fixedpitch = 1; + break; + default: + break; + } + } + fclose (infile); + infile = NULL; +} + +/* now some changes to the afm info */ +void + changeadobe +P1H (void) +{ + struct adobeinfo *ai; + int i; + /* float newslant; local declaration masks global one */ + + /* A fix: avoiding negative heights or depths. + * They break accents in math mode, among other things. + */ + for (i = 0; i < nglyphs; i++) { + ai = adobechars[i]; + if (ai->lly > 0) + ai->lly = 0; + if (ai->ury < 0) + ai->ury = 0; + } + + /* apply any requested geometric transforms */ + if (efactor != 1.0 || slant != 0.0) { + for (i = 0; i < nglyphs; i++) { + ai = adobechars[i]; + ai->width = transform (ai->width, 0); + ai->llx = transform (ai->llx, ai->lly); + ai->urx = transform (ai->urx, ai->ury); + } + } + newslant = (double) slant - + efactor * tan (italicangle * (3.1415926535 / 180.0)); + + /* if !keepligs, remove native ligatures */ + if (!keepligs && lspace>0) { + for (i = 0; i < nglyphs; i++) + adobechars[i]->ligs = NULL; + } + + /* create a left and right boundarychar entries - just in case, + * but don't add them (yet) to adobechars */ + for (i = 0; i < 2; i++) { + ai = newchar (); + ai->adobenum = -1; + ai->width = 0; + ai->llx = 0; + ai->lly = 0; + ai->urx = 0; + ai->ury = 0; + ai->adobename = boundaryname; + if (i == 0) + lbound = ai; + else + rbound = ai; + } + + /* global font dimensions */ + + /* The following may depend on the -f parameter */ + + if (xheight == 0) { + ai = findadobe ("x"); + if (ai) + xheight = ai->ury; + else + xheight = 400; + } + + if (afm2tfm_compat) { /* -f 'afm2tfm'*/ + + ai = findadobe ("space"); + if (ai) + fontspace = ai->width; /* transform already applied */ + else { + if (fixedpitch) + fontspace = charwidth; + else + transform(500, 0); + } + fstretch = (fixedpitch) ? 0 : transform (300, 0); + fshrink = (fixedpitch) ? 0 : transform (100, 0); + /* fextra = transform (111, 0); */ + fquad = transform (1000, 0); + + } else if (!fixedpitch) { + + /* some may be set by a numerical -f parameter) */ + + if (fontspace<0) { + ai = findadobe ("space"); + if (ai) + fontspace = ai->width; /* transform already applied */ + else { + fontspace = transform(500, 0); + } + } + if (fquad<0) { + ai = findadobe ("zero"); + if (ai) fquad = 2 * ai->width; + else if (fixedpitch) fquad = 2 * charwidth; + else fquad = transform (1000, 0); + } + if (fstretch<0) fstretch = fontspace / 2; + if (fshrink<0) fshrink = fontspace / 3; + if (fextra<0) fextra = fontspace / 3; + } else { /* fixedpitch && !afm2tfm_compat */ + if (fontspace<0) fontspace = charwidth; + if (fstretch<0) fstretch = 0; + if (fshrink<0) fshrink = 0; + if (fquad<0) fquad = 2 * charwidth; + if (fextra<0) fextra = charwidth; + } +} + +/************************************************** + * reading encodings + */ + +char smbuffer[100]; /* for tokens */ + +/* Here we get a token from the encoding file. We parse just as + * much PostScript as we expect to find in an encoding file. We + * allow commented lines and names like 0, .notdef, _foo_. We do + * not allow //abc. + */ +char * +gettoken () +{ + char *p, *q; + + while (1) { + while (param == 0 || *param == 0) { + if (getline () == 0) + error ("! premature end in encoding file"); + } + if (param[0] == '%') { + param[0] = 0; /* be done with this line */ + continue; + } + while (*param && *param <= ' ') + param++; + if (*param) { + if (*param == '[' || *param == ']' || + *param == '{' || *param == '}') { + smbuffer[0] = *param++; + smbuffer[1] = 0; + return smbuffer; + } else if (*param == '/' || *param == '-' || *param == '_' || + *param == '.' || + ('0' <= *param && *param <= '9') || + ('a' <= *param && *param <= 'z') || + ('A' <= *param && *param <= 'Z')) { + smbuffer[0] = *param; + for (p = param + 1, q = smbuffer + 1; + *p == '-' || *p == '_' || *p == '.' || + ('0' <= *p && *p <= '9') || + ('a' <= *p && *p <= 'z') || + ('A' <= *p && *p <= 'Z'); p++, q++) + *q = *p; + *q = 0; + param = p; + return smbuffer; + } + } + } +} + +/* This routine reads the encoding file. + * Return value: pointer to encoding. + * + * There is just one reason why we read the encoding vector + * before the extra ligkern information: if a (r)boundarychar is + * specified by number then we want to translate it into + * a glyph name. + * + * We also create tfmptrs as a reencoded version of adobechars, and + * tfmnext, which tracks multiple encodings of a single glyph and is + * best explained by the code creating it. + */ +void + readencoding +P1H (void) +{ + char *p; + int i, inx; + struct adobeinfo *ai; + + if (infile) + error ("! oops; internal infile error"); + if (encfilename) { + encfilename = + openin (encfilename, kpse_enc_format, ".enc"); + param = 0; + if (infile == 0) + error ("! couldn't open that encoding file"); + outencoding = (struct encoding *) mymalloc + ((unsigned long) sizeof (struct encoding)); + for (i = 0; i < 256; i++) + outencoding->vec[i] = ".notdef"; + outencoding->name = "Unspecified"; + p = gettoken (); + if (*p != '/' || p[1] == 0) + error ("! first token in encoding must be literal encoding name"); + outencoding->name = newstring (p + 1); + p = gettoken (); + if (strcmp (p, "[")) + error ("! second token in encoding must be mark ([) token"); + for (i = 0; i < 256; i++) { + p = gettoken (); + if (*p != '/' || p[1] == 0) + error ("! tokens 3 to 257 in encoding must be literal names"); + outencoding->vec[i] = newstring (p + 1); + } + p = gettoken (); + if (strcmp (p, "]")) + error ("! token 258 in encoding must be make-array (])"); + fclose (infile); + infile = 0; + } else + outencoding = afmencoding; + + /* find adobeinfo for each encoded glyph name + * track multiple encodings (tfmnext). + * For missing glyphs, this is not necessary. + */ + for (i = 0; i < 256; i++) + tfmnext[i] = -1; + for (i = 0; i < 256; i++) { + if (strcmp (outencoding->vec[i], ".notdef")) { + ai = findadobe (outencoding->vec[i]); + tfmptrs[i] = ai; + if (ai) { + inx = ai->tfmnum; + if (inx == -1) + ai->tfmnum = i; + else { + while (tfmnext[inx] != -1) + inx = tfmnext[inx]; + tfmnext[inx] = i; + } + } else { /* missing glyph */ + if (!missingchars && verbose) + fputs ("Missing glyphs\n", stderr); + missingchars += 1; + if (verbose) printf ("%s\n", outencoding->vec[i]); + } + } else /* empty slot */ + tfmptrs[i] = NULL; + } +} + +/**************************************************************** + * Processing extra ligkern info + * + * When these functions are called, we have available the afm data + * and the raw encoding vector. + * changeadobe has created adobeinfos for left and right boundarychar. + * We use the encoding vector ONLY to translate an rboundarychar spec + * into an rboundarychar name. However, normally an rboundarychar will + * occupy an otherwise unused slot in the encoding, in which case + * the name is irrelevant. + * I don't see the point of a numeric rboundarychar specification: + * either one wants to use a specific character or the numeric value + * doesn't matter. But I allow it for backward compatibility. + * + * extra ligkern info can come from: + * - comments in the encoding file + * - lig files. These replace the hard-coded set in afm2tfm. + * afm2tfm applies its own set only if the enc file contains no + * ligkern instructions. This is also the default behavior of + * afm2pl. + * + * Typically, extra ligkern info may contain: + * - tex-specific hacks such as `less less =: guillemotleft' + * - deletion of space- and number kerns + * - kern accented chars as their unaccented versions + * - the f/l/i ligatures, in case they were absent from the afm. + * + * note. afm2pl allows first copying space kerns + * to boundarychar kerns and then deleting the space kerns, leaving + * the boundarychar kerns intact. + * + * There was a function for creating accented char ligatures. + * This doesn't prevent TeX from compositing accented chars + * so it is not very useful. + * In afm2tfm this function was never called and I removed it. + * I created a file accents.lig which may be loaded for these + * accent ligs but default isn't. + */ + +/* Notation of ligkern specs: + * char1 char2 =: char3 => replace char1 char2 with char3 + * and more generally: + * char1 char2 ligop char3 => char1 char2 ligop char3 + * char1 {} char2 => delete char1 char2 kern + * char1 <> char2 => kern char1 the same as char2 + * || = char => char is right boundary char + * + * Notes. + * - cork.enc contains specs `char @{@} char' instead of `char {} char' + * - The ligkern specs use `||' for both lboundarychar and + * rboundarychar. The context must make clear which one is intended. + * I store them in separate adobechar structs. + */ + +/* These are the eight ligature ops, in pl terms and in METAFONT terms. + */ +char *plligops[] = { + "LIG", "/LIG", "/LIG>", "LIG/", "LIG/>", "/LIG/", "/LIG/>", + "/LIG/>>", 0 +}; +char *encligops[] = { + "=:", "|=:", "|=:>", "=:|", "=:|>", "|=:|", "|=:|>", "|=:|>>", 0 +}; + +/* Make the kerning for character s1 equivalent to that for s2 + * but don't replace existing kerns. + * It doesn't matter whether or not s2 is encoded. + * In the pl file, the kerning info of both s1 and s2 will be written + * out in full. + */ +void + copykerns +P2C (char *, s1, char *, s2) +{ + int i, found, delta2, found1, found2; + struct adobeinfo *ai, *ai1, *ai2; + struct kern *nk, *nk1, *nk2; + + if (!strcmp (s1, s2)) + return; + + /* kerns with s1 and s2 on the left */ + if (!strcmp (boundaryname, s1)) + ai1 = lbound; + else + ai1 = findadobe (s1); + if (!strcmp (boundaryname, s2)) + ai2 = lbound; + else + ai2 = findadobe (s2); + if (ai1 && ai2 && ai2->kerns) { + nk2 = ai2->kerns; + while (nk2) { + found = 0; + nk1 = ai1->kerns; + while (nk1) { + if (!strcmp (nk1->succ, nk2->succ)) { + found = 1; + break; + } + nk1 = nk1->next; + } + if (!found) { + nk1 = newkern (); + nk1->succ = nk2->succ; + nk1->delta = nk2->delta; + nk1->next = ai1->kerns; + ai1->kerns = nk1; + } + nk2 = nk2->next; + } + } + + /* kerns with s1 and s2 on the right. */ + if (!strcmp (boundaryname, s1) && boundglyph) + s1 = boundglyph; + if (!strcmp (boundaryname, s2) && boundglyph) + s2 = boundglyph; + /* a name '||' for s1/s2 is untouched */ + if (!strcmp (s1, s2)) + return; + for (i = 0; i < nglyphs; i++) { + ai = adobechars[i]; + found1 = 0; + found2 = 0; + nk = ai->kerns; + while (nk) { + if (!strcmp (nk->succ, s2)) { + found2 = 1; + delta2 = nk->delta; + } + if (!strcmp (nk->succ, s1)) + found1 = 1; + nk = nk->next; + } + if (found2 && !found1) { + nk1 = newkern (); + nk1->next = ai->kerns; + ai->kerns = nk1; + nk1->succ = newstring (s1); + /* can't copy s1, which is just a stack variable */ + nk1->delta = delta2; + } + } +} + +/* remove kern between ai->adobechar and s2, where s2 != "*" + */ +void adobermkern +P2C (struct adobeinfo *, ai, char *, s2) +{ + struct kern *k, *kprev; + char *s2a; + int first; + if (!ai->kerns) + return; + k = ai->kerns; + if (!strcmp (s2, boundaryname) && boundglyph) + s2a = boundglyph; + else + s2a = s2; + first = 1; + while (k) { + if (!strcmp (s2a, k->succ) || !strcmp (s2, k->succ)) { + if (first) + ai->kerns = k->next; + else + kprev->next = k->next; + return; + } + first = 0; + kprev = k; + k = k->next; + } +} + +/* remove kerns between s1 and s2 (wildcards allowed) */ +void rmkern +P2C (char *, s1, char *, s2) +{ + int i; + struct adobeinfo *ai; + + if (!strcmp (s1, "*")) { + for (i = 0; i < nglyphs; i++) { + ai = adobechars[i]; + adobermkern (ai, s2); + } + adobermkern (lbound, s2); + } else if (!strcmp (s2, "*")) { + if (!strcmp (s1, boundaryname)) + ai = lbound; + else + ai = findadobe (s1); + if (ai) + ai->kerns = NULL; + } else { /* remove single pair */ + if (!strcmp (s1, boundaryname)) + ai = lbound; + else + ai = findadobe (s1); + if (!ai) + return; + adobermkern (ai, s2); + } +} + +/* With default ligkern option, need to know whether + * the enc file contains ligkern specs + */ +int sawligkern; + +/* zero-th iteration: look out for rboundarychar spec. + * first iteration: look out for everything else. + */ +int lig_it; + +/* set_rboundarychar is to be called after the ligkern specs have been + * scanned for a rboundarychar spec but before we know whether it + * will actually be used. + */ +void set_rboundarychar +P1C (int, bch) +{ + int i; + if (bch == -1) { + /* find empty slot; skip 0, just to be safe */ + for (i = 1; i < 256; i++) + if (!strcmp (outencoding->vec[i], ".notdef")) { + rboundarychar = i; + tfmptrs[i] = rbound; + rbound->tfmnum = i; + adobechars[nglyphs] = rbound; + return; + } + error ("No tfm slot available for boundarychar"); + } else { + rboundarychar = bch; + if (tfmptrs[rboundarychar]) { + rbound = tfmptrs[rboundarychar]; + boundglyph = newstring (rbound->adobename); + nglyphsb = nglyphs; /* no extra slot in adobechars needed */ + } else { + tfmptrs[bch] = rbound; + rbound->tfmnum = bch; + adobechars[nglyphs] = rbound; + } + return; + } +} + +/* Reads a ligkern line, which may contain several ligkern specs. + * lig_it = 0: only process rboundarychar spec + * lig_it != 0: process all other ligkern specs + * lig_it = 2: post-letterspacing; only `{}' specs are allowed. + */ +void checkligkern +P2C (char *, s, int, isencfile) +{ + char *mlist[5]; /* tokens constituting a ligkern spec */ + int n, i, bch; + struct adobeinfo *ai; + char *ll; + + ll = s; + + if (s[0] == '%') + s++; /* skip optional leading `%' */ + /* Note. '%' is necessary for ligkern comments in an encoding file + * and optional otherwise. + */ + while (*s && *s <= ' ') + s++; /* skip to first token */ + if (!s[0]) + return; /* empty line; done */ + if (isencfile && strncmp (s, "LIGKERN", 7)) /* not a ligkern line */ + return; + if (!strncmp (s, "LIGKERN", 7)) + s += 7; /* skip beyond `LIGKERN' */ + sawligkern = 1; + while (*s && *s <= ' ') + s++; + param = s; + while (*param) { + /* collect next ligkern spec */ + for (n = 0; n < 5;) { + /* collect next token for ligkern spec */ + if (*param == 0) + break; /* ligkern spec complete */ + mlist[n] = paramstring (); + if (strcmp (mlist[n], ";") == 0) + break; /* ligkern spec complete */ + n++; + } + + /* handle ligkern spec */ + if (n > 4) + error ("! too many parameters in lig kern data"); + if (n < 3) + error ("! not enough parameters in lig kern data"); + if (n == 3 && strcmp (mlist[1], "{}") == 0) { + if (!lig_it) + continue; + if (lig_it == 2 && strcmp (mlist[0], "*") != 0) { + ai = findadobe (mlist[0]); + if (ai) ai->nonstd_lk = 1; + } + rmkern (mlist[0], mlist[2]); + } else if (n == 3 && strcmp (mlist[1], "<>") == 0) { + if (!lig_it) + continue; + if (lig_it == 2) + error ("!Post-letterspacing <> kern spec not allowed"); + copykerns (mlist[0], mlist[2]); + } else if (n == 3 && strcmp (mlist[0], boundaryname) == 0 && + strcmp (mlist[1], "=") == 0) { + /* setting of rboundarychar; only during 0-th iteration */ + if (lig_it) + continue; + if (lig_it == 2) + error ("!Post-letterspacing boundarychar spec not allowed"); + if (rboundarychar != -1) + error ("! multiple boundary character commands?"); + if (sscanf (mlist[2], "%d", &bch) == 1) { + /* number for rboundarychar */ + if (bch < 0 || bch > 255) + error ("! boundary character number must be 0..255"); + else + set_rboundarychar (bch); + } else { /* named rboundarychar */ + for (bch = 0; bch < 256; bch++) + if (!strcmp (outencoding->vec[bch], mlist[2])) + break; + if (bch<256) boundglyph = newstring(mlist[2]); + else { + if (strcmp ("cwm", mlist[2])) error + ("unencoded boundarychar; will use empty slot instead"); + bch = -1; + boundglyph = newstring(boundaryname); + } + set_rboundarychar (bch); + } + } else if (n == 4) { /* ligature: char succ lig_op result */ + int op = -1; + struct adobeinfo *ai; + + if (!lig_it) + continue; + if (lig_it == 2) + error ("!Post-letterspacing lig spec not allowed"); + for (i = 0; encligops[i]; i++) + if (strcmp (mlist[2], encligops[i]) == 0) { + op = i; + break; + } + if (op < 0) + error ("! bad ligature op specified"); + if (!strcmp (mlist[0], boundaryname)) + ai = lbound; + else + ai = findadobe (mlist[0]); + if (ai) { + struct lig *lig; + + if (findadobe (mlist[1])) /* remove coincident kerns */ + rmkern (mlist[0], mlist[1]); + if (strcmp (mlist[3], boundaryname) == 0) + error ("! you can't lig to the boundary character!"); + for (lig = ai->ligs; lig; lig = lig->next) + if (strcmp (lig->succ, mlist[1]) == 0) + break; /* we'll re-use this structure */ + if (lig == 0) { + lig = newlig (); + lig->succ = newstring (mlist[1]); + lig->next = ai->ligs; + ai->ligs = lig; + } + lig->sub = newstring (mlist[3]); + lig->op = op; + if (strcmp (mlist[1], boundaryname) == 0) { + lig->boundright = 1; + if (strcmp (mlist[0], boundaryname) == 0) + error ("! you can't lig boundarychar boundarychar!"); + } else + lig->boundright = 0; + } + } else + error ("! bad form in LIGKERN command"); + } +} + +void +letterspace () +{ + int i,j; + struct kern *k; + struct adobeinfo *ai; + int *haskern; /* which glyphs are rhs of a kerning pair? */ + + haskern = (int *) malloc (nglyphs * sizeof (int)); + for (i=0;i<nglyphs;i++) { + for (j=0;j<nglyphs;j++) haskern[j] = 0; + ai = adobechars[i]; + for (k=ai->kerns;k;k=k->next) { + j = findindex (k->succ); + if (j>0 && j<nglyphs) { + /* kern with rbound is NOT modified */ + k->delta += lspace; + haskern[j] = 1; + } + } + for (j=0;j<nglyphs;j++) if (!haskern[j]) { + k = newkern(); + k->succ = adobechars[j]->adobename; + k->delta = lspace; + k->next = ai->kerns; + ai->kerns = k; + } + } + free (haskern); + fontspace += 2 * lspace; +} + +void +extraligkerninfo () +{ + int i; + char *p; + struct adobeinfo *ai; + + /* with positive letterspacing, remove native ligs unless keepligs + */ + if (lspace>0 && !keepligs) + for (i=0;i<nglyphs;i++) adobechars[i]->ligs = NULL; + + /* Boundarychars make things a lot messier than they would be + * otherwise. A rather long summary: + * When typesetting, TeX sandwiches words between a left + * boundarychar and a right boundarychar. + * It seems sensible to translate space kerns into boundarychar + * kerns although afm2tfm doesn't do this. + * Below, we read ligkern info twice: the first time to read + * a right boundarychar spec, if any, the second time to read everything + * else. The global loop variable lig_it is consulted by checkligkern. + * more about boundarychar/boundaryname: + * rboundarychar is the index of right boundarychar in the tfm; + * initialized as -1 + * The left boundarychar doesn't need a proper tfm index + */ + if (lspace>0 && !strcmp (ligoption, "0")) ligoption = "1"; + if (!strcmp (ligoption, "0")) + return; + if (!strcmp (ligoption, "1") && encfilename && lspace<=0) { + sawligkern = 0; + /* ligkern specs in comments in encoding file? */ + encfilename = + openin (encfilename, kpse_enc_format, ".enc"); + for (lig_it = 0; lig_it < 2; lig_it++) { + while (getline ()) { + /* search for (ligkern) comment in line */ + for (p = buffer; *p; p++) + if (*p == '%') { + checkligkern (p, 1); /* 2nd param 1: reading .enc file */ + break; + } + } + if (!sawligkern) + break; /* read default lig file instead */ + if (!lig_it) { + if (rboundarychar == -1) + set_rboundarychar (-1); + rewind (infile); + } + } + fclose (infile); + if (sawligkern) + return; + else { + ligfilenames->n = 1; + ligfilenames->names = malloc (sizeof (char *)); + ligfilenames->names[0] = "default.lig"; + } + } else if (!strcmp (ligoption, "1")) { /* lspace>0 or no encfile */ + ligfilenames->n = 1; + ligfilenames->names = malloc (sizeof (char *)); + if (lspace<=0) ligfilenames->names[0] = "default.lig"; + else ligfilenames->names[0] = "defpre.lig"; + } + + /* process ligfilenames struct */ + for (lig_it = 0; lig_it < 2; lig_it++) { + for (i = 0; i < ligfilenames->n; i++) { + ligfilename = openin (ligfilenames->names[i], + kpse_lig_format, ".lig"); + while (getline ()) + checkligkern (buffer, 0); /* 2nd param 0: lig file */ + fclose (infile); + } + if (!lig_it && (rboundarychar == -1)) + set_rboundarychar (-1); + } + + /* optimization: identify glyphs which now have ligs or kerns. + * Boundarychars: rboundarychar won't get a label in the ligtable, + * and lboundarychar will be done separately anyhow. + */ + for (i=0;i<nglyphs;i++) { + ai = adobechars[i]; + ai->nonstd_lk = (ai->ligs!=NULL || ai->kerns!=NULL); + } + + if (!lspace) return; + + letterspace(); + + /* process post-letterspace ligfiles */ + if (!strcmp (Ligoption, "1")) { + Ligfilenames->n = 1; + Ligfilenames->names = malloc (sizeof (char *)); + Ligfilenames->names[0] = "defpost.lig"; + } + lig_it = 2; + for (i = 0; i < Ligfilenames->n; i++) { + ligfilename = openin (Ligfilenames->names[i], + kpse_lig_format, ".lig"); + while (getline ()) + checkligkern (buffer, 0); /* 2nd param 0: lig file */ + fclose (infile); + } +} + +void + spaceparms +P1H (void) +{ + /* afm2tfm values for fstretch, fshrink, fextra: 200, 100, 111 + * fontinst values: 0.6 * space, 0.24 * space, ? + * cmr10 values: 0.5 * space, .33 * space, .33 * space + */ + if (!fixedpitch) { + if (fstretch==0) fstretch = fontspace / 2; + if (fshrink==0) fshrink = fontspace / 3; + if (fextra==0) fextra = fontspace / 3; + } +} + +/********************************************************* + * debug output of adobeinfo structs */ + +#ifdef AFMDEBUG +FILE *dmp; +char *dmpname = "afm2pl.dmp"; + +void dumpai +P1C (struct adobeinfo *, ai) +{ + struct lig *lg; + struct kern *kr; + putc ('\n', dmp); + fprintf (dmp, "adobename %s\n", + ai->adobename ? ai->adobename : "undefined"); + fprintf (dmp, "adobenum %d\n", ai->adobenum); + fprintf (dmp, "tfmnum %d\n", ai->tfmnum); + fprintf (dmp, "width %d\n", ai->width); + fprintf (dmp, "bbox %d %d %d %d\n", ai->llx, ai->lly, ai->urx, + ai->ury); + fprintf (dmp, "nonstd_lk %d\n", ai->nonstd_lk); + if (!ai->ligs) + fputs ("no ligs\n", dmp); + else + for (lg = ai->ligs; lg; lg = lg->next) + fprintf (dmp, "lig %s %d %s%s\n", + lg->succ, lg->op, lg->sub, + lg->boundright ? " boundarychar" : ""); + if (!ai->kerns) + fputs ("no kerns\n", dmp); + else + for (kr = ai->kerns; kr; kr = kr->next) + fprintf (dmp, "kern %s %d\n", kr->succ, kr->delta); +} + +void writedump +P1H (void) +{ + int i; + dmp = fopen (dmpname, "w"); + if (!dmp) + error ("Cant open dump file"); + if (lbound) { + fputs ("\nleft boundarychar\n", dmp); + dumpai (lbound); + } + if (rbound) { + fputs ("\nright boundarychar\n", dmp); + dumpai (rbound); + } + for (i = 0; i < nglyphs; i++) + if (adobechars[i]) dumpai (adobechars[i]); + else fprintf (dmp, "\nNo char at slot %d\n", i); + + fputs ("\nBy tfmptrs:\n", dmp); + for (i = 0; i < 256; i++) + if (tfmptrs[i]) dumpai (tfmptrs[i]); + else fprintf (dmp, "\nNo char at slot %d\n", i); + fclose (dmp); +} +#endif + +/******************************************************************* + * the PL file. */ + +#define plout(s) fprintf(outfile, s) +int level; /* depth of parenthesis nesting in PL output file */ + +/* indent */ +void +pllevout () +{ + register int l = level; + while (l--) + plout (" "); +} + +/* newline plus indent */ +void +pllevnlout () +{ + plout ("\n"); + pllevout (); +} + +#define ploutln(str) {fprintf(outfile,"%s\n",str);pllevout();} +#define ploutln2(f,s) {fprintf(outfile,f,s);pllevnlout();} +#define ploutln3(f,a,b) {fprintf(outfile,f,a,b);pllevnlout();} +#define ploutln4(f,a,b,c) {fprintf(outfile,f,a,b,c);pllevnlout();} + +/* left bracket */ +void + plleft +P1H (void) +{ + level++; + plout ("("); +} + +/* right bracket */ +void + plright +P1H (void) +{ + level--; + ploutln (")"); +} + +/* return string representation for .pl file of tfmptrs[c] + * don't forget that TeX doesn't use glyph names. + * only, if c happens to be a printable ascii char + * then we gratefully use that fact if we are allowed to. + * If the encoding moves the printable ascii range around then + * forceoctal would be a good idea. + */ +char plcharbuf[6]; +char *plchar +P1C (int, c) +{ + if (forceoctal == 0 && ISALNUM (c)) + (void) sprintf (plcharbuf, "C %c", +#ifndef VMCMS + c); +#else + ascii2ebcdic[c]); +#endif + else + (void) sprintf (plcharbuf, "O %o", (unsigned) c); + return (char *) plcharbuf; +} + +/* comment string with official glyph name if useful, + * null string otherwise + */ +char plnamebuf[100]; +char *plname +P1C (int, c) +{ + if (!forceoctal && ISALNUM (c)) { + plnamebuf[0] = 0; + } else if (c >= 0 && c < 256) { + sprintf (plnamebuf, " (comment %s)", tfmptrs[c]->adobename); + } + return (char *) plnamebuf; +} + + +/* obuffer: originally unmodified copy of input buffer, + * now recycled as output buffer + */ +void + writepl +P1H (void) +{ + register int i, j, k; + int bc, ec; + register struct adobeinfo *ai; + register struct lig *nlig; + register struct kern *nkern; + struct adobeinfo *asucc, *asub; + int ht, dt; + char labeled, *pp; + + outname = openout (outname, based_on, ".pl"); + + /* header */ + pp = find_suffix (outname); + if (pp) { pp--; *pp = 0; } + (void) sprintf (obuffer, "%s%s%s", outname, + (efactor == 1.0 ? "" : "-E"), + (slant == 0.0 ? "" : "-S")); + if (strlen (obuffer) > 19) { /* too long, will retain first 9 and last 10 */ + register char *p, *q; + for (p = &obuffer[9], q = &obuffer[strlen (obuffer) - 10]; + p < &obuffer[19]; p++, q++) + *p = *q; + obuffer[19] = 0; + } + + /* global parameters */ + ploutln2 ("(FAMILY %s)", obuffer); + { + char tbuf[41]; + char *tbp; + + strncpy (tbuf, outencoding->name, 40); + tbuf[40] = 0; + + if (strlen (tbuf) > 39) { + error ("Coding scheme too long; shortening to 39 characters."); + tbuf[39] = 0; + } + tbp = tbuf; + while (*tbp) { *tbp = toupper (*tbp); tbp++; } + ploutln2 ("(CODINGSCHEME %s)", tbuf); + } + ploutln ("(DESIGNSIZE R 10.0)"); + ploutln ("(DESIGNUNITS R 1000)"); + ploutln ("(COMMENT DESIGNSIZE (1 em) IS IN POINTS)"); + ploutln + ("(COMMENT OTHER DIMENSIONS ARE MULTIPLES OF DESIGNSIZE/1000)"); + /* Let pltotf compute the checksum. */ + /* ploutln2("(CHECKSUM O %lo)",cksum ^ 0xffffffff) ; */ + if (rboundarychar >= 0) + ploutln2 ("(BOUNDARYCHAR O %lo)", (unsigned long) rboundarychar); + plleft (); + ploutln ("FONTDIMEN"); + ploutln2 ("(SLANT R %f)", newslant); + ploutln2 ("(SPACE D %d)", fontspace); + ploutln2 ("(STRETCH D %d)", fstretch); + ploutln2 ("(SHRINK D %d)", fshrink); + ploutln2 ("(XHEIGHT D %d)", xheight); + ploutln2 ("(QUAD D %d)", fquad); + if (!afm2tfm_compat) ploutln2 ("(EXTRASPACE D %d)", fextra); + plright (); + + /* beginning and end of char array */ + for (i = 0; i < 256 && tfmptrs[i] == NULL; i++); + bc = i; + for (i = 255; i >= 0 && tfmptrs[i] == NULL; i--); + ec = i; + + /* ligkern table */ + plleft (); + ploutln ("LIGTABLE"); + + /* (left) boundarychar ligskerns */ + ai = lbound; + labeled = 0; + for (nlig = ai->ligs; nlig; nlig = nlig->next) + if (0 != (asucc = findtfm (nlig->succ))) + if (0 != (asub = findtfm (nlig->sub))) { + if (!labeled) { + ploutln ("(LABEL BOUNDARYCHAR)"); + labeled = 1; + } + /* handle all encodings of asucc */ + for (k = asucc->tfmnum; k >= 0; k = tfmnext[k]) + ploutln4 ("(%s %s O %o)", plligops[nlig->op], + plchar (k), (unsigned) asub->tfmnum); + } + for (nkern = ai->kerns; nkern; nkern = nkern->next) + if (0 != (asucc = findtfm (nkern->succ))) { + if (!labeled) { + ploutln ("(LABEL BOUNDARYCHAR)"); + labeled = 1; + } + /* handle all encodings of asucc */ + for (k = asucc->tfmnum; k >= 0; k = tfmnext[k]) { + ploutln4 ("(KRN %s R %d)%s", plchar (k), + nkern->delta, plname (k)); + } + } + if (labeled) + ploutln ("(STOP)"); + + /* other ligs and kerns */ + + + for (i = bc; i <= ec; i++) + if ((ai = tfmptrs[i]) && ai->tfmnum == i && ai->nonstd_lk) { + /* slot i is filled, points to a not-previously-encoded + * character, and has ligs and kerns other than + * standard letterspacing kerns. Do right boundarychar + * only if it is a real glyph. + */ + if (!strcmp (ai->adobename, "||")) + continue; + labeled = 0; + /* do ligatures for ai = tfmptrs[i] */ + for (nlig = ai->ligs; nlig; nlig = nlig->next) + if (0 != (asucc = findtfm (nlig->succ))) + if (0 != (asub = findtfm (nlig->sub))) { + /* we found a lig which really belongs in the tfm */ + if (!labeled) { + /* also take care of all other slots for this char */ + for (j = i; j >= 0; j = tfmnext[j]) { + ploutln3 ("(LABEL %s)%s", plchar (j), plname (j)); + } + labeled = 1; + } + for (k = asucc->tfmnum; k >= 0; k = tfmnext[k]) { + ploutln4 ("(%s %s O %o)", plligops[nlig->op], + plchar (k), (unsigned) asub->tfmnum); + } + } + /* do kerns for ai = tfmptrs[i] */ + for (nkern = ai->kerns; nkern; nkern = nkern->next) + if (0 != (asucc = findtfm (nkern->succ))) { + if (!labeled) { + for (j = i; j >= 0; j = tfmnext[j]) { + ploutln3 ("(LABEL %s)%s", plchar (j), plname (j)); + } + labeled = 1; + } + dt = nkern->delta; + for (k = asucc->tfmnum; k >= 0; k = tfmnext[k]) { + ploutln4 ("(KRN %s R %d)%s", plchar (k), dt, plname (k)); + } + } + if (labeled) + ploutln ("(STOP)"); + } + + if (lspace) { + for (i = bc; i <= ec; i++) + if ((ai = tfmptrs[i]) && !ai->nonstd_lk) { + /* do all 'standard' glyphs together. + * no need to check for ligatures. + * we do check for kerns, though: + * if there are none, then apparently all space kerns + * have been tossed out, and there is nothing to do. + * Either way, we break out of the loop after doing the + * first glyph with `standard' ligkerns. + */ + if (!strcmp(ai->adobename,"||")) continue; + if (!ai->kerns) break; + for (j = i; j <= ec; j++) if (tfmptrs[j] && !tfmptrs[j]->nonstd_lk) + ploutln3 ("(LABEL %s)%s", plchar (j), plname (j)); + for (nkern = ai->kerns; nkern; nkern = nkern->next) + if (0 != (asucc = findtfm (nkern->succ))) { + dt = nkern->delta; + for (k = asucc->tfmnum; k >= 0; k = tfmnext[k]) + ploutln4 ("(KRN %s R %d)%s", plchar (k), dt, plname (k)); + } + ploutln ("(STOP)"); + break; + } + } + + plright (); + + /* done with ligkerns; now char metrics */ + for (i = bc; i <= ec; i++) + if (0 != (ai = tfmptrs[i])) { + if (!strcmp (ai->adobename, "||")) + continue; + plleft (); + fprintf (outfile, "CHARACTER %s", plchar (i)); + if (*plcharbuf == 'C') { + ploutln (""); + } else + ploutln2 (" (comment %s)", ai->adobename); + ploutln2 ("(CHARWD R %d)", ai->width); + if (0 != (ht = ai->ury)) + ploutln2 ("(CHARHT R %d)", ht); + if (ai->lly) + ploutln2 ("(CHARDP R %d)", -ai->lly); + if (ai->urx > ai->width) + ploutln2 ("(CHARIC R %d)", ai->urx - ai->width); + plright (); + } + if (level) + error ("! I forgot to match the parentheses"); + fclose (outfile); +} + +/******************************************************************* + * (version and) usage + */ +void version +P1C (FILE *, f) +{ +#ifdef KPATHSEA + extern KPSEDLL char *kpathsea_version_string; +#endif + fputs ("afm2pl(k) 0.7.03\n", f); +#ifdef KPATHSEA + fprintf (f, "%s\n", kpathsea_version_string); +#endif + fputs ("Copyright (C) 2002, 2005 Siep Kroonenberg.\n\ +This program is derived from afm2tfm, (C) 2002 Radical Eye Software.\n\ +There is NO warranty. You may redistribute this software\n\ +under the terms of the GNU General Public License.\n\ +For more information about these matters, see the files\n\ +named COPYING and afm2pl.c.\n", f); +} + +#define USAGE "\ +Convert an Adobe font metric file to a TeX font property list.\n\ +\n\ +-p ENCFILE Read/download ENCFILE for the PostScript encoding\n\ +-o Use octal for all character codes in the pl file\n\ +-e REAL Widen (extend) characters by a factor of REAL\n\ +-s REAL Oblique (slant) characters by REAL, generally <<1\n\ +-m INTEGER Letterspace by INTEGER/1000 em\n\ +-V Verbose output; i.e. report on missing glyphs\n\ +--help Print this message and exit.\n\ +--version Print version number and exit.\n\n\ +See the man page for full documentation.\n\n\ +" + +void afm2pl_usage +P1C (FILE *, f) +{ + fputs ("Usage: afm2pl [OPTIONS]... FILE[.afm] [FILE[.pl]]\n", f); + fputs (USAGE, f); + fputc ('\n', f); + fputs ("Email bug reports to ntg-afm2pl@ntg.nl\n", f); +} + +/************************************************************** + * parse commandline + */ + +/* decode comma-separated list of non-negative integers. + * initialize everything to -1 i.e. undefined +*/ +int getnums +P3C (char *, st, int *, nums, int, num) +{ + char *p; /* pointer into st */ + int curnum, curindex, ndigits; + /* curnum: number to be parsed + curindex: index for nums array + ndigits: n. of digits found for curnum + */ + for (curindex=0;curindex<num;curindex++) { + nums[curindex] = -1; + } + for (curnum=0,curindex=0,ndigits=0,p=st;;p++) { + if (*p==',' || *p==0) { + /* done with this number */ + if (ndigits>0) /* we found some digits */ + nums[curindex] = curnum; + curnum = 0; + curindex++; + ndigits = 0; + if (curindex>=num || !*p) break; + } else if (*p>='0' && *p<='9') { + curnum = 10*curnum + (*p-'0'); + ndigits++; + } else { + error ("! Illegal -f parameter"); + } + } + if (!*p) return 1; /* end of string reached: no problems */ + else return 0; +} + +/* split string on commas into strings; disregard empty strings */ +struct nstrings *getoutnames +P2C (char *, st, struct nstrings *, onames) +{ + char *argcopy; + unsigned i; + int j, inpart; + argcopy = (char *) malloc (strlen (st) + 1); + strcpy (argcopy, st); + inpart = 0; /* cursor not inside a constituing substring */ + for (i = 0, onames->n = 0; i < strlen (st); i++) { + if (argcopy[i] == ',') { + argcopy[i] = 0; + inpart = 0; + } else if (!inpart) { + inpart = 1; + onames->n++; + } + /* !=',', inpart: do nothing */ + } + onames->names = (char **) malloc (onames->n * sizeof (char *)); + inpart = 0; + for (i = 0, j = 0; i < strlen (st); i++) { + if (argcopy[i] == 0) + inpart = 0; + else if (!inpart) { + onames->names[j++] = argcopy + i; + inpart = 1; + } + } + return onames; +} + +/* call this when an option requires an argument */ +#define CHECKARG3 if (argc < 3) { afm2pl_usage(stderr); exit(1); } + +void + readargs +P2C (int, argc, char **, argv) +{ + register int i; + int fdims[3]; + + /* skip argv[0] and look at the rest. */ + argv++; + argc--; + + if (argc == 0 || (argc > 0 && (!strcmp (argv[0], "--help") || + !strcmp (argv[0], "-help")) || !strcmp (argv[0], "-h"))) { + afm2pl_usage (stdout); + exit (0); + } + + if (!strcmp (argv[0], "--version") || + !strcmp (argv[0], "-version") || !strcmp (argv[0], "-v")) { + version (stdout); + exit (0); + } + + /* allocate structs for ligkern filenames */ + ligfilenames = (struct nstrings *) mymalloc + ((unsigned long) sizeof (struct nstrings)); + Ligfilenames = (struct nstrings *) mymalloc + ((unsigned long) sizeof (struct nstrings)); + + /* looping: advance argv and decrement argc to match unprocessed + * command-line arguments. + * After the options, we need at least an afm filename, + * which will be handled AFTER this loop. + */ + + while (argc > 0 && *argv[0] == '-') { + i = argv[0][1]; + /* I don't understand what this is about. + * The comment below suggests that it is VM/CMS-specific + * so I comment it out for other OS-es. [SK] + */ +#ifdef VMCMS + if (i == '/') + i = argv[0][2] - 32; /* /a ==> A for VMS */ +#endif + switch (i) { + case 'e': + efactor = 1.0; + CHECKARG3 + if (sscanf (argv[1], "%f", &efactor) == 0 || efactor < 0.01) + error ("! Bad extension factor"); + efactorparam = argv[1]; + argv += 2; + argc -= 2; + break; + case 's': + CHECKARG3 if (sscanf (argv[1], "%f", &slant) == 0) + error ("! Bad slant parameter"); + slantparam = argv[1]; + argv += 2; + argc -= 2; + break; + case 'm': + CHECKARG3 if (sscanf (argv[1], "%d", &lspace) == 0) + error ("! Bad letterspacing parameter"); + lspaceparam = argv[1]; + if (lspace > 0) + keepligs = 0; + argv += 2; + argc -= 2; + break; + case 'p': + CHECKARG3 encfilename = argv[1]; + argv += 2; + argc -= 2; + break; + case 'f': + CHECKARG3 + if (!strcmp (argv[1], "afm2tfm")) { + afm2tfm_compat = 1; + } else if (!strcmp (argv[1], "afm2tfm")) { + afm2tfm_compat = 1; + } else { + if (!getnums (argv[1], fdims, 5)) + error ("!Parsing error in argument of -f"); + fstretch = fdims[0]; fshrink = fdims[1]; fextra = fdims[2]; + fquad = fdims[3]; fontspace = fdims[4]; + } + argv += 2; + argc -= 2; + break; + case 'l': + CHECKARG3 ligoption = argv[1]; + if (strcmp (ligoption, "0") && strcmp (ligoption, "1")) { + getoutnames (ligoption, ligfilenames); + } + argv += 2; + argc -= 2; + break; + case 'L': + CHECKARG3 Ligoption = argv[1]; + if (strcmp (Ligoption, "0") && strcmp (Ligoption, "1")) { + getoutnames (Ligoption, Ligfilenames); + } + argv += 2; + argc -= 2; + break; + case 'o': + forceoctal = 1; + argv += 1; + argc -= 1; + break; + case 'k': + keepligs = 1; + argv += 1; + argc -= 1; + break; + case 'V': + verbose = 1; + argv += 1; + argc -= 1; + break; + default: + (void) fprintf (stderr, + "Unknown option %s %s will be ignored.\n", + argv[0], argv[1]); + argv += 2; + argc -= 2; + } + } + + /* end of loop. Remainder: name of afm file and possibly pl file */ + afmname = argv[0]; + + if ((argc < 1) || (argc > 2)) { + error ("! need one or two non-option arguments"); + afm2pl_usage (stderr); + } + + if (argc == 1) { + outname = afmname; + based_on = 1; + } else { + outname = argv[1]; + based_on = 0; + } +} + +/* This routine prints out the line that needs to be added to psfonts.map. + */ +void +conspsfonts () +{ + char *base, *p, *q; + + /* TeX fontname is file basename without path or extension */ + p = newstring (outname); + base = (char *)xbasename (p); + q = find_suffix (base); + if (q > base) { + q--; + *q = 0; + } + openout (base, 0, ".map"); + (void) fprintf (outfile, "%s %s", base, fontname); + if (slantparam || efactorparam || encfilename) { + (void) fprintf (outfile, " \""); + if (slantparam) + (void) fprintf (outfile, " %s SlantFont", slantparam); + if (efactorparam) + (void) fprintf (outfile, " %s ExtendFont", efactorparam); + if (encfilename) + (void) fprintf (outfile, " %s ReEncodeFont", outencoding->name); + (void) fprintf (outfile, " \""); + if (encfilename) { + base = (char *)xbasename (encfilename); + (void) fprintf (outfile, " <%s", base); + } + } + p = newstring (afmname); + base = (char *)xbasename (p); + q = find_suffix (base); + if (q > base) { + q--; + *q = 0; + } + (void) fprintf (outfile, " <%s.pfb", base); + (void) fprintf (outfile, "\n"); + fclose (outfile); +} + +/******************************************************** + * main program + */ + +#ifndef VMS +int +#endif + main +P2C (int, argc, char **, argv) +{ + +#ifdef KPATHSEA + kpse_set_program_name (argv[0], "afm2pl"); + + if (argc == 1) { + fputs ("afm2pl: Need at least one file argument.\n", stderr); + fputs ("Try `afm2pl --help' for more information.\n", stderr); + exit (1); + } + if (argc == 2) { + if (strcmp (argv[1], "--help") == 0) { + afm2pl_usage (stdout); + exit (0); + } else if (strcmp (argv[1], "--version") == 0) { + version (stdout); + exit (0); + } + } +#endif /* KPATHSEA */ + readargs (argc, argv); + readadobe (); + changeadobe (); + readencoding (); + extraligkerninfo (); /* loop over lig files and lines in lig files */ + spaceparms (); +#ifdef AFMDEBUG + writedump (); +#endif + writepl (); + conspsfonts (); + return -missingchars; +} diff --git a/Build/source/texk/afm2pl/afm2pl.html b/Build/source/texk/afm2pl/afm2pl.html new file mode 100644 index 00000000000..b5d87ff1aa9 --- /dev/null +++ b/Build/source/texk/afm2pl/afm2pl.html @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>afm2pl</title><meta name="generator" content="DocBook XSL Stylesheets V1.64.1" /></head><body><div class="article" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="id4663055"></a>afm2pl</h1></div><div><div class="author"><h3 class="author"><span class="firstname">Siep</span> <span class="surname">Kroonenberg</span></h3><div class="affiliation"><div class="address"><p><tt class="email"><<a href="mailto:ntg-afm2pl@ntg.nl">ntg-afm2pl@ntg.nl</a>></tt></p></div></div></div></div><div><p class="copyright">Copyright © 2004 Siep Kroonenberg</p></div></div><div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id4671274">afm2pl</a> - convert AFM font metrics to TeX pl font metrics + </dt></dl></div><div class="refentry" lang="en" xml:lang="en"><a id="id4671274"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>afm2pl — convert AFM font metrics to TeX pl font metrics + </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">afm2pl</tt> [<tt class="option">-p</tt> + <i class="replaceable"><tt>encoding_file</tt></i> + ] [<tt class="option">-o</tt>] [<tt class="option">-e</tt> + <i class="replaceable"><tt>extension_factor</tt></i> + ] [<tt class="option">-s</tt> + <i class="replaceable"><tt>slant_factor</tt></i> + ] [<tt class="option">-f</tt> + <i class="replaceable"><tt>font_dimensions</tt></i> + ] [<tt class="option">-k</tt>] [<tt class="option">-m</tt> + <i class="replaceable"><tt>letter_spacing</tt></i> + ] [<tt class="option">-l</tt> + <i class="replaceable"><tt>ligkern_spec</tt></i> + ] [<tt class="option">-L</tt> + <i class="replaceable"><tt>ligkern_spec</tt></i> + ] {<i class="replaceable"><tt>input_file[.afm]</tt></i>} [<i class="replaceable"><tt>output_file[.pl]</tt></i>]</p></div><div class="cmdsynopsis"><p><tt class="command">afm2pl</tt> {[--help] | [--version]}</p></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4664175"></a><h2>Description</h2><p>afm2pl converts an afm (Adobe Font Metric) file into a pl +(Property List) file, which in its turn can be converted to a tfm +(TeX Font Metric) file. It preserves kerns and ligatures.</p><p>afm2pl is meant to be a replacement for afm2tfm, on which it +is based. With afm2tfm, preserving kerns and ligatures is possible +only in a roundabout way.</p><p>For text fonts, Y&Y's texnansi is the recommended encoding +to be used with afm2pl. This gives you a good character set with +all the more important accented characters and many typographic +symbols available as single characters, without a need for either +virtual fonts or a separate text companion font.</p><p>Full LaTeX support for this encoding is available in the form +of the texnansi package, which is already part of TeX Live and +teTeX. These distributions also contain the encoding file +texnansi.enc.</p><p>The distribution contains uppercased and lowercased versions +of texnansi, viz. texnanuc.enc and texnanlc.enc, to allow font-based +rather than macro-based uppercasing and lowercasing, and the +familiar old ot1 encoding plus some variations in PostScript .enc +format (I included these because they seem to be absent from +teTeX/TeX Live). </p><p>Return value: 0 if no error; a negative number indicating the +number of missing glyphs if +conversion was successfull but glyphs are missing, and 1 in case of +error.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4664229"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">-p</tt> <i class="replaceable"><tt>encoding_file</tt></i></span></dt><dd><p>The default is the encoding specified + in the afm file, which had better match the encoding in the + fontfile (pfa or pfb). The generated mapfile entry (see below) + instructs pdftex or the dvi driver to reencode the font on the fly. + On-the-fly reencoding does not require virtual fonts.</p></dd><dt><span class="term"><tt class="option">-o</tt></span></dt><dd><p>Use octal for all character codes in the pl file.</p></dd><dt><span class="term"><tt class="option">-e</tt> <i class="replaceable"><tt>extend_factor</tt></i></span></dt><dd><p>Widen or narrow characters by + <i class="replaceable"><tt>extend_factor</tt></i>. Default is 1.0 + (natural width). Not recommended, except that + arguably a narrowed Courier is less jarring than a full-width + Courier, when used in + combination with a normal proportional font. + For Courier, choose .833 to match the width of cmtt.</p></dd><dt><span class="term"><tt class="option">-s</tt> <i class="replaceable"><tt>slant_factor</tt></i></span></dt><dd><p>Oblique (slant) characters by + <i class="replaceable"><tt>slant_factor</tt></i>. + Not recommended.</p></dd><dt><span class="term"><tt class="option">-f</tt> + <i class="replaceable"><tt>font_dimensions</tt></i></span></dt><dd><p>The value is either the + keyword <tt class="literal">afm2tfm</tt> or a comma-separated list of up + to five integers. The parameters are listed below, with their + defaults and their value when the afm2tfm keyword is + specified. ‘Space’ means the width of a space in the + target font, except of course in the last row. + Keep in mind that the design size is 1000, and that all numbers + must be nonnegative integers.</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Font dimension</th><th>Default value</th><th>Afm2tfm value</th></tr></thead><tbody><tr><td><i class="replaceable"><tt>stretch</tt></i></td><td>space div 2</td><td>300 × <i class="replaceable"><tt>extend_factor</tt></i></td></tr><tr><td><i class="replaceable"><tt>shrink</tt></i></td><td>space div 3</td><td>100 × <i class="replaceable"><tt>extend_factor</tt></i></td></tr><tr><td><i class="replaceable"><tt>extra space</tt></i></td><td>space div 3</td><td>missing</td></tr><tr><td><i class="replaceable"><tt>quad</tt></i></td><td>2 × width of ‘0’</td><td>1000 × <i class="replaceable"><tt>extend_factor</tt></i></td></tr><tr><td><i class="replaceable"><tt>space</tt></i></td><td>(space source font) × <i class="replaceable"><tt>extend_factor</tt></i></td><td>(space source font) × <i class="replaceable"><tt>extend_factor</tt></i></td></tr></tbody></table></div><p>For fixed-pitch fonts, different values apply:</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Font dimension</th><th>Default value</th><th>Afm2tfm value</th></tr></thead><tbody><tr><td><i class="replaceable"><tt>stretch</tt></i></td><td>0</td><td>0</td></tr><tr><td><i class="replaceable"><tt>shrink</tt></i></td><td>0</td><td>0</td></tr><tr><td><i class="replaceable"><tt>extra space</tt></i></td><td>space</td><td>missing</td></tr><tr><td><i class="replaceable"><tt>quad</tt></i></td><td>2 × character width</td><td>1000 × <i class="replaceable"><tt>extend_factor</tt></i></td></tr><tr><td><i class="replaceable"><tt>space</tt></i></td><td>character width</td><td>character width</td></tr></tbody></table></div><p>Specify just a non-default stretch and shrink with + e.g. <tt class="literal">150,70</tt> and just a non-default extra + space with <tt class="literal">,,10</tt>.</p></dd><dt><span class="term"><tt class="option">-k</tt></span></dt><dd><p>Keep original ligatures. This option only has effect in + combination with positive letterspacing; see the section on + <a href="#lspace" title="Letterspacing and extra ligkern info">letterspacing and extra ligkern info.</a> + </p></dd><dt><span class="term"><tt class="option">-m</tt> <i class="replaceable"><tt>letter_spacing</tt></i></span></dt><dd><p>Letterspace by + <i class="replaceable"><tt>letter_spacing</tt></i>/1000 em (integer). This is + useful for making all-caps typesetting look better. Try a value + of e.g. 50 or 100. But see the section + on <a href="#lspace" title="Letterspacing and extra ligkern info">letterspacing and extra ligkern info</a> + for details.</p></dd><dt><span class="term"><tt class="option">-l</tt> <i class="replaceable"><tt>ligkern_spec</tt></i>, </span><span class="term"><tt class="option">-L</tt> <i class="replaceable"><tt>ligkern_spec</tt></i></span></dt><dd><p> See the section + on <a href="#lspecs" title="Extra ligkern info">extra ligkern info</a> + for details.</p></dd><dt><span class="term"><tt class="option">-V</tt></span></dt><dd><p>Verbose. If turned on, it reports the number of missing + glyphs to stderr and their names to stdout. This is not particularly + logical, but this way the glyph names can be captured even under Windows. + </p></dd><dt><span class="term"><tt class="option">--help</tt></span></dt><dd><p>Display a short usage message.</p></dd><dt><span class="term"><tt class="option">--version</tt></span></dt><dd><p>Display the version number of afm2pl.</p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4662921"></a><h2>Mapfile entries</h2><p>afm2pl writes a mapfile entry to a file with the same basename +as the pl output file, but with extension .map. It can be used for +the dvips mapfile and for the pdftex mapfile, although, in case of a +geometrically transformed font, it may be better to remove the +PostScript name for a pdftex mapfile entry. It is assumed that the +pfb file has the same basename as the afm file and must be +downloaded. <span class="emphasis"><em>You may have to hand-edit this +entry.</em></span></p><p>You can configure dvips and pdftex to read this additional +mapfile or otherwise add the entry to an existing mapfile. It +appears that pdftex automatically will consult a mapfile xxx.map for +a font xxx.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="lspecs"></a><h2>Extra ligkern info</h2><p><span class="emphasis"><em>Most users are well-advised to leave this mess alone +and to accept the default behavior.</em></span></p><p>The ligatures and kerns present in the afm file can be +modified in various ways. Default, the encoding file is scanned for +extra ligkern specifications, whose format will be described below. +If there are no ligkern specifications in the encoding file, then +extra ligkern specifications will be read from a file default.lig. A +value of 0 for <i class="replaceable"><tt>ligkern_spec</tt></i> means that +the ligatures and kerns from the afm file won't be tampered with and +a value of 1 specifies default behavior. One can also specify a +comma-separated list of files with extra ligkerns specs.</p><p>If afm2pl is compiled with the kpathsea library, then these +files will be searched for under $TEXMF/fonts/lig.</p><p><span class="emphasis"><em>Note that ligatures and kerns are hints for the +typesetting application; there is no need to download this +information to the printer or to make it available to a dvi +driver.</em></span></p><p>The parser for ligkern info has been inherited from afm2tfm +virtually without change. A ligkern specification can have one of +the following forms:</p><pre class="screen"> +<i class="replaceable"><tt>glyph_name1</tt></i> <i class="replaceable"><tt>glyph_name2</tt></i> <i class="replaceable"><tt>lig_op</tt></i> <i class="replaceable"><tt>glyph_name3</tt></i> ; +</pre><p>This specifies a ligature. Possible values for +<i class="replaceable"><tt>lig_op</tt></i> are <tt class="literal">=:</tt>, +<tt class="literal">|=:</tt>, <tt class="literal">|=:></tt>, +<tt class="literal">=:|</tt>, <tt class="literal">=:|></tt>, +<tt class="literal">|=:|</tt>, <tt class="literal">|=:|></tt> and +<tt class="literal">|=:|>></tt>. +These correspond to <tt class="literal">LIG</tt>, +<tt class="literal">/LIG</tt>, <tt class="literal">/LIG></tt>, +<tt class="literal">LIG/</tt>, <tt class="literal">LIG/></tt>, +<tt class="literal">/LIG/</tt>, <tt class="literal">/LIG/></tt>, +<tt class="literal">/LIG/>></tt> in .pl syntax; see the pltotf +documentation and the .lig files in the distribution.</p><pre class="screen"> +<i class="replaceable"><tt>glyph_name1</tt></i> <> <i class="replaceable"><tt>glyph_name2</tt></i> ; +</pre><p>Kern <i class="replaceable"><tt>glyph_name1</tt></i> as +<i class="replaceable"><tt>glyph_name2</tt></i>.</p><pre class="screen"> +<i class="replaceable"><tt>glyph_name1</tt></i> {} <i class="replaceable"><tt>glyph_name2</tt></i> ; +</pre><p>Remove the kern between <i class="replaceable"><tt>glyph_name1</tt></i> +and <i class="replaceable"><tt>glyph_name2</tt></i>. A value of +<tt class="literal">*</tt> for either glyph name is interpreted as a +wildcard.</p><pre class="screen"> +|| = <i class="replaceable"><tt>glyph</tt></i> ; +</pre><p>Set the (right) boundary character to +<i class="replaceable"><tt>glyph</tt></i>. <i class="replaceable"><tt>glyph</tt></i> +may be either a glyphname or a slot in the encoding vector. Choosing +a glyph which doesn't occur in the output encoding is equivalent to +not specifying a boundarychar at all. It is ok to pick an encoded +glyphname which does not occur in the afm. In fact, this is what +default.lig does: <tt class="literal">|| = cwm ;</tt>.</p><p>You can copy the kerns of an unencoded character to the +boundarychar:</p><pre class="screen"> +|| <> space ; +</pre><p>This ligkern specification should occur before the one that +deletes space kerns.</p><p>A ligkern specification should be contained within one line. +One line may contain several ligkern specifications, separated by +spaces. Note that <tt class="literal"> ;</tt> (space followed by +semicolon) is considered part of the ligkern specification. See the +lig files included in this distribution. Example:</p><pre class="screen"> +one {} * ; * {} one ; two {} * ; * {} two ; +</pre><p>Lines with ligkern specifications inside an encoding file +should start with <tt class="literal">% LIGKERN </tt>. Ligkern +specifications in a lig file may optionally start this way.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="lspace"></a><h2>Letterspacing and extra ligkern info</h2><p>Letterspacing has various side-effects for ligkern +info. Instead of simply applying the extra ligkern info (see +previous section), the following is done:</p><div class="orderedlist"><ol type="1"><li><p>In case of positive letterspacing, native ligatures +are removed, unless the -k option is specified.</p></li><li><p>Extra ligkern info is applied as usual, except that in +case of positive letterspacing different defaults apply: +<tt class="literal">-l 0</tt> is quietly ignored, ligkern comments in +the encoding file are ignored, and defpre.lig is read instead of +default.lig.</p></li><li><p>Letterspacing is applied. This adds a lot of kerns, +and modifies existing kerns.</p></li><li><p>The extra ligkern info specified with -L is applied. +The only ligkern specs which are allowed here, are removals of +kerning pairs (with the <tt class="literal">{}</tt> operator). Values +0 and 1 have a similar meaning as for the -l parameter. The tfm +format has room for only about 180x180 ligatures and kerning pairs. +This is enough for OT1 encoding, but for texnansi encoding quite a +few ligkern specifications have to be removed. The pltotf program +will remove <span class="emphasis"><em>all</em></span> ligkern info if too many +ligatures and kerns remain. The default lig file is defpost.lig. +This file throws out kerning pairs which are unlikely to be involved +in letterspacing, such as kerns involving accents or kerns with a +punctuation character or right bracket at the left. It does not add +letterspacing kerns involving boundarychars. Instead, fontspace is +increased by twice the letterspacing. defpost.lig throws out +enough kerns in case of texnansi encoding. With other encodings, +you may have to throw out additional kerning +pairs.</p></li></ol></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4721019"></a><h2>Font-based upper- and lowercasing</h2><p>The distribution includes encoding vectors texnanuc.enc and +texnanlc.enc which produce all-uppercase and all-lowercase fonts. +The distribution contains an example ucshape.tex on how to use such +fonts with LaTeX font selection.</p><p>The principal uses for an all-uppercase font are page headers +and section heads. If these contain math, then macro-based +uppercasing would create unpleasant complications.</p><div class="refsect2" lang="en" xml:lang="en"><a id="id4721038"></a><h3>The sz ligature ß</h3><p>Note that the texnanuc encoding provides no glyph for the sz +ligature ß; you'll either have to substitute ss or provide a +macro-based solution. The following code uses either the usual glyph +or substitutes the letters ss, depending on whether the glyph exists +in the current font:</p><pre class="programlisting"> + +\def\ss{% + \setbox0\hbox{\char25}% + \ifnum\wd0=0 ss\else\box0\fi +} + +</pre><p>In LaTeX, this code appears to work well enough, although on +occasion you may need to insert <tt class="literal">\protect</tt>. A +better solution might involve the sixth parameter of the +<tt class="literal">\DeclareFontShape</tt> macro, but I failed to get +that to work.</p></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4721081"></a><h2>Afm2pl, fontinst and artificial smallcaps</h2><p>Afm2pl currently doesn't do virtual fonts. That means that for +things such as artificial smallcaps you have to turn elsewhere, +e.g. to the fontinst package, which is part of any mainstream TeX +distribution.</p><p>Look under texmf/tex/fontinst for fontinst support files, +which allow you to generate a smallcaps font (tfm and vf files) from +an afm2pl-generated tfm file. This package only supports texnansi +encoding.</p><p>There should be no real problem in doing the same for OT1 +encoding. However, there are several variations of the OT1 encoding +to take care of. Also, there are as far as I know no officially +sanctioned PostScript names for all the variations of the OT1 +encoding; the fontinst names contain spaces and are therefore not +useable as PostScript names.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4721115"></a><h2>Future plans</h2><p>I am considering a revision which makes afm2pl a more complete +replacement for afm2tfm. In that version, afm2pl can optionally +create a second, virtual font, possibly with a different encoding +and possibly letterspaced. The current option of non-virtual +letterspacing via kerns will be dropped. If the encodings differ +then it is assumed that the virtual font is intended as a small-caps +version of the main font, and a scaling parameter can be +specified for non-matching glyphs.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4721133"></a><h2>Copyright</h2><p>The afm2pl distribution is subject to the GNU General Public Licence +(GPL). Please refer to the file COPYING for details.</p><p>The afm2pl homepage is <a href="http://www.ntg.nl/afm2pl.html" target="_top">http://www.ntg.nl/afm2pl.html</a>.</p></div></div></div></body></html> diff --git a/Build/source/texk/afm2pl/afm2pl.txt b/Build/source/texk/afm2pl/afm2pl.txt new file mode 100644 index 00000000000..936a9cc46d9 --- /dev/null +++ b/Build/source/texk/afm2pl/afm2pl.txt @@ -0,0 +1,295 @@ + +afm2pl + +Siep Kroonenberg + + <[1]ntg-afm2pl@ntg.nl> + + Copyright © 2004 Siep Kroonenberg + _________________________________________________________________ + + Table of Contents + + [2]afm2pl - convert AFM font metrics to TeX pl font metrics + +Name + + afm2pl -- convert AFM font metrics to TeX pl font metrics + +Synopsis + + afm2pl [-p encoding_file ] [-o] [-e extension_factor ] [-s + slant_factor ] [-f font_dimensions ] [-k] [-m letter_spacing ] [-l + ligkern_spec ] [-L ligkern_spec ] {input_file[.afm]} + [output_file[.pl]] + + afm2pl {[--help] | [--version]} + +Description + + afm2pl converts an afm (Adobe Font Metric) file into a pl (Property + List) file, which in its turn can be converted to a tfm (TeX Font + Metric) file. It preserves kerns and ligatures. + + afm2pl is meant to be a replacement for afm2tfm, on which it is based. + With afm2tfm, preserving kerns and ligatures is possible only in a + roundabout way. + + For text fonts, Y&Y's texnansi is the recommended encoding to be used + with afm2pl. This gives you a good character set with all the more + important accented characters and many typographic symbols available + as single characters, without a need for either virtual fonts or a + separate text companion font. + + Full LaTeX support for this encoding is available in the form of the + texnansi package, which is already part of TeX Live and teTeX. These + distributions also contain the encoding file texnansi.enc. + + The distribution contains uppercased and lowercased versions of + texnansi, viz. texnanuc.enc and texnanlc.enc, to allow font-based + rather than macro-based uppercasing and lowercasing, and the familiar + old ot1 encoding plus some variations in PostScript .enc format (I + included these because they seem to be absent from teTeX/TeX Live). + + Return value: 0 if no error; a negative number indicating the number + of missing glyphs if conversion was successfull but glyphs are + missing, and 1 in case of error. + +Options + + -p encoding_file + The default is the encoding specified in the afm file, which + had better match the encoding in the fontfile (pfa or pfb). The + generated mapfile entry (see below) instructs pdftex or the dvi + driver to reencode the font on the fly. On-the-fly reencoding + does not require virtual fonts. + + -o + Use octal for all character codes in the pl file. + + -e extend_factor + Widen or narrow characters by extend_factor. Default is 1.0 + (natural width). Not recommended, except that arguably a + narrowed Courier is less jarring than a full-width Courier, + when used in combination with a normal proportional font. For + Courier, choose .833 to match the width of cmtt. + + -s slant_factor + Oblique (slant) characters by slant_factor. Not recommended. + + -f font_dimensions + font_dimensions is a comma-separated list of up to three + integers, for successively stretch and shrink of the interword + space, and extra space for between sentences (cf. spacefactor). + Default values: one-half, one-third and one-third of the width + of a space. Specify just a non-default stretch and shrink with + e.g. 150,70 and just a non-default extra space with ,,10. For a + fixed-pitch font this parameter is ignored. + + -k + Keep original ligatures. This option only has effect in + combination with positive letterspacing; see the section on + [3]letterspacing and extra ligkern info. + + -m letter_spacing + Letterspace by letter_spacing/1000 em (integer). This is useful + for making all-caps typesetting look better. Try a value of + e.g. 50 or 100. But see the section on [4]letterspacing and + extra ligkern info for details. + + -l ligkern_spec, -L ligkern_spec + See the section on [5]extra ligkern info for details. + + -V + Verbose. If turned on, it reports the number of missing glyphs + to stderr and their names to stdout. This is not particularly + logical, but this way the glyph names can be captured even + under Windows. + + --help + Display a short usage message. + + --version + Display the version number of afm2pl. + +Mapfile entries + + afm2pl writes a mapfile entry to a file with the same basename as the + pl output file, but with extension .map. It can be used for the dvips + mapfile and for the pdftex mapfile, although, in case of a + geometrically transformed font, it may be better to remove the + PostScript name for a pdftex mapfile entry. It is assumed that the pfb + file has the same basename as the afm file and must be downloaded. You + may have to hand-edit this entry. + + You can configure dvips and pdftex to read this additional mapfile or + otherwise add the entry to an existing mapfile. It appears that pdftex + automatically will consult a mapfile xxx.map for a font xxx. + +Extra ligkern info + + Most users are well-advised to leave this mess alone and to accept the + default behavior. + + The ligatures and kerns present in the afm file can be modified in + various ways. Default, the encoding file is scanned for extra ligkern + specifications, whose format will be described below. If there are no + ligkern specifications in the encoding file, then extra ligkern + specifications will be read from a file default.lig. A value of 0 for + ligkern_spec means that the ligatures and kerns from the afm file + won't be tampered with and a value of 1 specifies default behavior. + One can also specify a comma-separated list of files with extra + ligkerns specs. + + If afm2pl is compiled with the kpathsea library, then these files will + be searched for under $TEXMF/fonts/lig. + + Note that ligatures and kerns are hints for the typesetting + application; there is no need to download this information to the + printer or to make it available to a dvi driver. + + The parser for ligkern info has been inherited from afm2tfm virtually + without change. A ligkern specification can have one of the following + forms: +glyph_name1 glyph_name2 lig_op glyph_name3 ; + + This specifies a ligature. Possible values for lig_op are =:, |=:, + |=:>, =:|, =:|>, |=:|, |=:|> and |=:|>>. These correspond to LIG, + /LIG, /LIG>, LIG/, LIG/>, /LIG/, /LIG/>, /LIG/>> in .pl syntax; see + the pltotf documentation and the .lig files in the distribution. +glyph_name1 <> glyph_name2 ; + + Kern glyph_name1 as glyph_name2. +glyph_name1 {} glyph_name2 ; + + Remove the kern between glyph_name1 and glyph_name2. A value of * for + either glyph name is interpreted as a wildcard. +|| = glyph ; + + Set the (right) boundary character to glyph. glyph may be either a + glyphname or a slot in the encoding vector. Choosing a glyph which + doesn't occur in the output encoding is equivalent to not specifying a + boundarychar at all. It is ok to pick an encoded glyphname which does + not occur in the afm. In fact, this is what default.lig does: || = cwm + ;. + + You can copy the kerns of an unencoded character to the boundarychar: +|| <> space ; + + This ligkern specification should occur before the one that deletes + space kerns. + + A ligkern specification should be contained within one line. One line + may contain several ligkern specifications, separated by spaces. Note + that ; (space followed by semicolon) is considered part of the ligkern + specification. See the lig files included in this distribution. + Example: +one {} * ; * {} one ; two {} * ; * {} two ; + + Lines with ligkern specifications inside an encoding file should start + with % LIGKERN . Ligkern specifications in a lig file may optionally + start this way. + +Letterspacing and extra ligkern info + + Letterspacing has various side-effects for ligkern info. Instead of + simply applying the extra ligkern info (see previous section), the + following is done: + 1. In case of positive letterspacing, native ligatures are removed, + unless the -k option is specified. + 2. Extra ligkern info is applied as usual, except that in case of + positive letterspacing different defaults apply: -l 0 is quietly + ignored, ligkern comments in the encoding file are ignored, and + defpre.lig is read instead of default.lig. + 3. Letterspacing is applied. This adds a lot of kerns, and modifies + existing kerns. + 4. The extra ligkern info specified with -L is applied. The only + ligkern specs which are allowed here, are removals of kerning + pairs (with the {} operator). Values 0 and 1 have a similar + meaning as for the -l parameter. The tfm format has room for only + about 180x180 ligatures and kerning pairs. This is enough for OT1 + encoding, but for texnansi encoding quite a few ligkern + specifications have to be removed. The pltotf program will remove + all ligkern info if too many ligatures and kerns remain. The + default lig file is defpost.lig. This file throws out kerning + pairs which are unlikely to be involved in letterspacing, such as + kerns involving accents or kerns with a punctuation character or + right bracket at the left. It does not add letterspacing kerns + involving boundarychars. Instead, fontspace is increased by twice + the letterspacing. defpost.lig throws out enough kerns in case of + texnansi encoding. With other encodings, you may have to throw out + additional kerning pairs. + +Font-based upper- and lowercasing + + The distribution includes encoding vectors texnanuc.enc and + texnanlc.enc which produce all-uppercase and all-lowercase fonts. The + distribution contains an example ucshape.tex on how to use such fonts + with LaTeX font selection. + + The principal uses for an all-uppercase font are page headers and + section heads. If these contain math, then macro-based uppercasing + would create unpleasant complications. + +The sz ligature ß + + Note that the texnanuc encoding provides no glyph for the sz ligature + ß; you'll either have to substitute ss or provide a macro-based + solution. The following code uses either the usual glyph or + substitutes the letters ss, depending on whether the glyph exists in + the current font: + +\def\ss{% + \setbox0\hbox{\char25}% + \ifnum\wd0=0 ss\else\box0\fi +} + + In LaTeX, this code appears to work well enough, although on occasion + you may need to insert \protect. A better solution might involve the + sixth parameter of the \DeclareFontShape macro, but I failed to get + that to work. + +Afm2pl, fontinst and artificial smallcaps + + Afm2pl currently doesn't do virtual fonts. That means that for things + such as artificial smallcaps you have to turn elsewhere, e.g. to the + fontinst package, which is part of any mainstream TeX distribution. + + Look under texmf/tex/fontinst for fontinst support files, which allow + you to generate a smallcaps font (tfm and vf files) from an + afm2pl-generated tfm file. This package only supports texnansi + encoding. + + There should be no real problem in doing the same for OT1 encoding. + However, there are several variations of the OT1 encoding to take care + of. Also, there are as far as I know no officially sanctioned + PostScript names for all the variations of the OT1 encoding; the + fontinst names contain spaces and are therefore not useable as + PostScript names. + +Future plans + + I am considering a revision which makes afm2pl a more complete + replacement for afm2tfm. In that version, afm2pl can optionally create + a second, virtual font, possibly with a different encoding and + possibly letterspaced. The current option of non-virtual letterspacing + via kerns will be dropped. If the encodings differ then it is assumed + that the virtual font is intended as a small-caps version of the main + font, and a scaling parameter can be specified for non-matching + glyphs. + +Copyright + + The afm2pl distribution is subject to the GNU General Public Licence + (GPL). Please refer to the file COPYING for details. + + The afm2pl homepage is [6]http://www.ntg.nl/afm2pl.html. + +References + + 1. mailto:ntg-afm2pl@ntg.nl + 2. file://localhost/home/siepo/afm2pl/afm2pl-0.7/afm2pl.html#id2447180 + 3. file://localhost/home/siepo/afm2pl/afm2pl-0.7/afm2pl.html#lspace + 4. file://localhost/home/siepo/afm2pl/afm2pl-0.7/afm2pl.html#lspace + 5. file://localhost/home/siepo/afm2pl/afm2pl-0.7/afm2pl.html#lspecs + 6. http://www.ntg.nl/afm2pl.html diff --git a/Build/source/texk/afm2pl/afm2pl.xml b/Build/source/texk/afm2pl/afm2pl.xml new file mode 100644 index 00000000000..7e7717d2135 --- /dev/null +++ b/Build/source/texk/afm2pl/afm2pl.xml @@ -0,0 +1,556 @@ +<?xml version='1.0' standalone="no"?> +<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ + <!ENTITY szlig "ß"> +]> +<article> +<articleinfo> + <title>afm2pl</title> + <author> + <firstname>Siep</firstname> + <surname>Kroonenberg</surname> + <affiliation> + <address><email>ntg-afm2pl@ntg.nl</email></address> + </affiliation> + </author> + + <copyright> + <year>2004</year> + <holder>Siep Kroonenberg</holder> + </copyright> +</articleinfo> + +<refentry> +<refentryinfo> + <title>afm2pl</title> + <date>February 2004</date> + <!--productname Linux /productname--> +</refentryinfo> + +<refmeta> + <refentrytitle>afm2pl</refentrytitle> + <manvolnum>1</manvolnum> +</refmeta> + +<refnamediv> + <refname>afm2pl</refname> + <refpurpose>convert AFM font metrics to TeX pl font metrics + </refpurpose> +</refnamediv> + +<refsynopsisdiv> + <cmdsynopsis> + <command>afm2pl</command> + <arg choice="opt"><option>-p</option> + <replaceable>encoding_file</replaceable> + </arg> + <arg choice="opt"><option>-o</option></arg> + <arg choice="opt"><option>-e</option> + <replaceable>extension_factor</replaceable> + </arg> + <arg choice="opt"><option>-s</option> + <replaceable>slant_factor</replaceable> + </arg> + <arg choice="opt"><option>-f</option> + <replaceable>font_dimensions</replaceable> + </arg> + <arg choice="opt"><option>-k</option></arg> + <arg choice="opt"><option>-m</option> + <replaceable>letter_spacing</replaceable> + </arg> + <arg choice="opt"><option>-l</option> + <replaceable>ligkern_spec</replaceable> + </arg> + <arg choice="opt"><option>-L</option> + <replaceable>ligkern_spec</replaceable> + </arg> + <arg choice="req"><replaceable>input_file[.afm]</replaceable></arg> + <arg choice="opt"><replaceable>output_file[.pl]</replaceable></arg> + </cmdsynopsis> + + <cmdsynopsis> + <command>afm2pl</command> + <group choice="req"> + <arg>--help</arg> + <arg>--version</arg> + </group> + </cmdsynopsis> +</refsynopsisdiv> + +<refsect1> +<title>Description</title> +<para>afm2pl converts an afm (Adobe Font Metric) file into a pl +(Property List) file, which in its turn can be converted to a tfm +(TeX Font Metric) file. It preserves kerns and ligatures.</para> + +<para>afm2pl is meant to be a replacement for afm2tfm, on which it +is based. With afm2tfm, preserving kerns and ligatures is possible +only in a roundabout way.</para> + +<para>For text fonts, Y&Y's texnansi is the recommended encoding +to be used with afm2pl. This gives you a good character set with +all the more important accented characters and many typographic +symbols available as single characters, without a need for either +virtual fonts or a separate text companion font.</para> + +<para>Full LaTeX support for this encoding is available in the form +of the texnansi package, which is already part of TeX Live and +teTeX. These distributions also contain the encoding file +texnansi.enc.</para> + +<para>The distribution contains uppercased and lowercased versions +of texnansi, viz. texnanuc.enc and texnanlc.enc, to allow font-based +rather than macro-based uppercasing and lowercasing, and the +familiar old ot1 encoding plus some variations in PostScript .enc +format (I included these because they seem to be absent from +teTeX/TeX Live). </para> + +<para>Return value: 0 if no error; a negative number indicating the +number of missing glyphs if +conversion was successfull but glyphs are missing, and 1 in case of +error.</para> +</refsect1> + +<refsect1> +<title>Options</title> +<variablelist> +<varlistentry> + <term><option>-p</option> <replaceable>encoding_file</replaceable></term> + <listitem> + <para>The default is the encoding specified + in the afm file, which had better match the encoding in the + fontfile (pfa or pfb). The generated mapfile entry (see below) + instructs pdftex or the dvi driver to reencode the font on the fly. + On-the-fly reencoding does not require virtual fonts.</para> + </listitem> +</varlistentry> + +<varlistentry> + <term><option>-o</option></term> + <listitem> + <para>Use octal for all character codes in the pl file.</para> + </listitem> +</varlistentry> + +<varlistentry> + <term><option>-e</option> <replaceable>extend_factor</replaceable></term> + <listitem> + <para>Widen or narrow characters by + <replaceable>extend_factor</replaceable>. Default is 1.0 + (natural width). Not recommended, except that + arguably a narrowed Courier is less jarring than a full-width + Courier, when used in + combination with a normal proportional font. + For Courier, choose .833 to match the width of cmtt.</para> + </listitem> +</varlistentry> + +<varlistentry> + <term><option>-s</option> <replaceable>slant_factor</replaceable></term> + <listitem> + <para>Oblique (slant) characters by + <replaceable>slant_factor</replaceable>. + Not recommended.</para> + </listitem> +</varlistentry> + +<varlistentry> + <term><option>-f</option> + <replaceable>font_dimensions</replaceable></term> <listitem> + <para>The value is either the + keyword <literal>afm2tfm</literal> or a comma-separated list of up + to five integers. The parameters are listed below, with their + defaults and their value when the afm2tfm keyword is + specified. ‘Space’ means the width of a space in the + target font, except of course in the last row. + Keep in mind that the design size is 1000, and that all numbers + must be nonnegative integers.</para> + +<informaltable> +<tgroup cols='3'> +<colspec colwidth='*'/> +<colspec colwidth='2*'/> +<colspec colwidth='2*'/> +<thead> +<row> + <entry>Font dimension</entry> + <entry>Default value</entry> + <entry>Afm2tfm value</entry></row></thead> +<tbody> + +<row> + <entry><replaceable>stretch</replaceable></entry> + <entry>space div 2</entry> + <entry>300 × <replaceable>extend_factor</replaceable></entry> +</row> + +<row> +<entry><replaceable>shrink</replaceable></entry> +<entry>space div 3</entry> +<entry>100 × <replaceable>extend_factor</replaceable></entry> +</row> + +<row> + <entry><replaceable>extra space</replaceable></entry> + <entry>space div 3</entry> + <entry>missing</entry> +</row> + +<row> + <entry><replaceable>quad</replaceable></entry> +<entry>2 × width of ‘0’</entry> + <entry>1000 × <replaceable>extend_factor</replaceable></entry> +</row> + +<row> + <entry><replaceable>space</replaceable></entry> + <entry>(space source font) × <replaceable>extend_factor</replaceable></entry> + <entry>(space source font) × <replaceable>extend_factor</replaceable></entry> +</row> + + </tbody></tgroup></informaltable> + +<para>For fixed-pitch fonts, different values apply:</para> + +<informaltable> +<tgroup cols='3'> +<colspec colwidth='*'/> +<colspec colwidth='2*'/> +<colspec colwidth='2*'/> +<thead> +<row> + <entry>Font dimension</entry> + <entry>Default value</entry> + <entry>Afm2tfm value</entry></row></thead> +<tbody> + +<row> + <entry><replaceable>stretch</replaceable></entry> + <entry>0</entry> + <entry>0</entry> +</row> + +<row> +<entry><replaceable>shrink</replaceable></entry> + <entry>0</entry> + <entry>0</entry> +</row> + +<row> + <entry><replaceable>extra space</replaceable></entry> + <entry>space</entry> + <entry>missing</entry> +</row> + +<row> + <entry><replaceable>quad</replaceable></entry> +<entry>2 × character width</entry> + <entry>1000 × <replaceable>extend_factor</replaceable></entry> +</row> + +<row> + <entry><replaceable>space</replaceable></entry> + <entry>character width</entry> + <entry>character width</entry> +</row> + + </tbody></tgroup></informaltable> + +<para>Specify just a non-default stretch and shrink with + e.g. <literal>150,70</literal> and just a non-default extra + space with <literal>,,10</literal>.</para> + + </listitem> </varlistentry> + +<varlistentry> + <term><option>-k</option></term> + <listitem> + <para>Keep original ligatures. This option only has effect in + combination with positive letterspacing; see the section on + <link linkend="lspace">letterspacing and extra ligkern info.</link> + </para> + </listitem> +</varlistentry> + +<varlistentry> + <term><option>-m</option> <replaceable>letter_spacing</replaceable></term> + <listitem> + <para>Letterspace by + <replaceable>letter_spacing</replaceable>/1000 em (integer). This is + useful for making all-caps typesetting look better. Try a value + of e.g. 50 or 100. But see the section + on <link linkend="lspace">letterspacing and extra ligkern info</link> + for details.</para> + </listitem> +</varlistentry> + +<varlistentry> + <term><option>-l</option> <replaceable>ligkern_spec</replaceable></term> + <term><option>-L</option> <replaceable>ligkern_spec</replaceable></term> + <listitem> + <para> See the section + on <link linkend="lspecs">extra ligkern info</link> + for details.</para> + </listitem> +</varlistentry> + +<varlistentry> + <term><option>-V</option></term> + <listitem> + <para>Verbose. If turned on, it reports the number of missing + glyphs to stderr and their names to stdout. This is not particularly + logical, but this way the glyph names can be captured even under Windows. + </para> + </listitem> +</varlistentry> + +<varlistentry> + <term><option>--help</option></term> + <listitem> + <para>Display a short usage message.</para> + </listitem> +</varlistentry> + +<varlistentry> + <term><option>--version</option></term> + <listitem> + <para>Display the version number of afm2pl.</para> + </listitem> +</varlistentry> +</variablelist> +</refsect1> + +<refsect1> +<title>Mapfile entries</title> +<para>afm2pl writes a mapfile entry to a file with the same basename +as the pl output file, but with extension .map. It can be used for +the dvips mapfile and for the pdftex mapfile, although, in case of a +geometrically transformed font, it may be better to remove the +PostScript name for a pdftex mapfile entry. It is assumed that the +pfb file has the same basename as the afm file and must be +downloaded. <emphasis>You may have to hand-edit this +entry.</emphasis></para> + +<para>You can configure dvips and pdftex to read this additional +mapfile or otherwise add the entry to an existing mapfile. It +appears that pdftex automatically will consult a mapfile xxx.map for +a font xxx.</para> +</refsect1> + +<refsect1 id="lspecs" xreflabel="ligkern specs"> +<title>Extra ligkern info</title> + +<para><emphasis>Most users are well-advised to leave this mess alone +and to accept the default behavior.</emphasis></para> + +<para>The ligatures and kerns present in the afm file can be +modified in various ways. Default, the encoding file is scanned for +extra ligkern specifications, whose format will be described below. +If there are no ligkern specifications in the encoding file, then +extra ligkern specifications will be read from a file default.lig. A +value of 0 for <replaceable>ligkern_spec</replaceable> means that +the ligatures and kerns from the afm file won't be tampered with and +a value of 1 specifies default behavior. One can also specify a +comma-separated list of files with extra ligkerns specs.</para> + +<para>If afm2pl is compiled with the kpathsea library, then these +files will be searched for under $TEXMF/fonts/lig.</para> + +<para><emphasis>Note that ligatures and kerns are hints for the +typesetting application; there is no need to download this +information to the printer or to make it available to a dvi +driver.</emphasis></para> + +<para>The parser for ligkern info has been inherited from afm2tfm +virtually without change. A ligkern specification can have one of +the following forms:</para> + +<screen> +<replaceable>glyph_name1</replaceable> <replaceable>glyph_name2</replaceable> <replaceable>lig_op</replaceable> <replaceable>glyph_name3</replaceable> ; +</screen> + +<para>This specifies a ligature. Possible values for +<replaceable>lig_op</replaceable> are <literal>=:</literal>, +<literal>|=:</literal>, <literal>|=:></literal>, +<literal>=:|</literal>, <literal>=:|></literal>, +<literal>|=:|</literal>, <literal>|=:|></literal> and +<literal>|=:|>></literal>. +These correspond to <literal>LIG</literal>, +<literal>/LIG</literal>, <literal>/LIG></literal>, +<literal>LIG/</literal>, <literal>LIG/></literal>, +<literal>/LIG/</literal>, <literal>/LIG/></literal>, +<literal>/LIG/>></literal> in .pl syntax; see the pltotf +documentation and the .lig files in the distribution.</para> + +<screen> +<replaceable>glyph_name1</replaceable> <> <replaceable>glyph_name2</replaceable> ; +</screen> + +<para>Kern <replaceable>glyph_name1</replaceable> as +<replaceable>glyph_name2</replaceable>.</para> + +<screen> +<replaceable>glyph_name1</replaceable> {} <replaceable>glyph_name2</replaceable> ; +</screen> + +<para>Remove the kern between <replaceable>glyph_name1</replaceable> +and <replaceable>glyph_name2</replaceable>. A value of +<literal>*</literal> for either glyph name is interpreted as a +wildcard.</para> + +<screen> +|| = <replaceable>glyph</replaceable> ; +</screen> + +<para>Set the (right) boundary character to +<replaceable>glyph</replaceable>. <replaceable>glyph</replaceable> +may be either a glyphname or a slot in the encoding vector. Choosing +a glyph which doesn't occur in the output encoding is equivalent to +not specifying a boundarychar at all. It is ok to pick an encoded +glyphname which does not occur in the afm. In fact, this is what +default.lig does: <literal>|| = cwm ;</literal>.</para> + +<para>You can copy the kerns of an unencoded character to the +boundarychar:</para> + +<screen> +|| <> space ; +</screen> + +<para>This ligkern specification should occur before the one that +deletes space kerns.</para> + +<para>A ligkern specification should be contained within one line. +One line may contain several ligkern specifications, separated by +spaces. Note that <literal> ;</literal> (space followed by +semicolon) is considered part of the ligkern specification. See the +lig files included in this distribution. Example:</para> + +<screen> +one {} * ; * {} one ; two {} * ; * {} two ; +</screen> + +<para>Lines with ligkern specifications inside an encoding file +should start with <literal>% LIGKERN </literal>. Ligkern +specifications in a lig file may optionally start this way.</para> +</refsect1> + +<refsect1 id="lspace" xreflabel="letterspacing"> +<title>Letterspacing and extra ligkern info</title> + +<para>Letterspacing has various side-effects for ligkern +info. Instead of simply applying the extra ligkern info (see +previous section), the following is done:</para> + +<orderedlist> +<listitem><para>In case of positive letterspacing, native ligatures +are removed, unless the -k option is specified.</para></listitem> + +<listitem><para>Extra ligkern info is applied as usual, except that in +case of positive letterspacing different defaults apply: +<literal>-l 0</literal> is quietly ignored, ligkern comments in +the encoding file are ignored, and defpre.lig is read instead of +default.lig.</para></listitem> + +<listitem><para>Letterspacing is applied. This adds a lot of kerns, +and modifies existing kerns.</para></listitem> + +<listitem><para>The extra ligkern info specified with -L is applied. +The only ligkern specs which are allowed here, are removals of +kerning pairs (with the <literal>{}</literal> operator). Values +0 and 1 have a similar meaning as for the -l parameter. The tfm +format has room for only about 180x180 ligatures and kerning pairs. +This is enough for OT1 encoding, but for texnansi encoding quite a +few ligkern specifications have to be removed. The pltotf program +will remove <emphasis>all</emphasis> ligkern info if too many +ligatures and kerns remain. The default lig file is defpost.lig. +This file throws out kerning pairs which are unlikely to be involved +in letterspacing, such as kerns involving accents or kerns with a +punctuation character or right bracket at the left. It does not add +letterspacing kerns involving boundarychars. Instead, fontspace is +increased by twice the letterspacing. defpost.lig throws out +enough kerns in case of texnansi encoding. With other encodings, +you may have to throw out additional kerning +pairs.</para></listitem> </orderedlist> +</refsect1> + +<refsect1> +<title>Font-based upper- and lowercasing</title> + +<para>The distribution includes encoding vectors texnanuc.enc and +texnanlc.enc which produce all-uppercase and all-lowercase fonts. +The distribution contains an example ucshape.tex on how to use such +fonts with LaTeX font selection.</para> + +<para>The principal uses for an all-uppercase font are page headers +and section heads. If these contain math, then macro-based +uppercasing would create unpleasant complications.</para> + +<refsect2> +<title>The sz ligature ß</title> +<para>Note that the texnanuc encoding provides no glyph for the sz +ligature ß; you'll either have to substitute ss or provide a +macro-based solution. The following code uses either the usual glyph +or substitutes the letters ss, depending on whether the glyph exists +in the current font:</para> + +<programlisting> +<![CDATA[ +\def\ss{% + \setbox0\hbox{\char25}% + \ifnum\wd0=0 ss\else\box0\fi +} +]]> +</programlisting> +<para>In LaTeX, this code appears to work well enough, although on +occasion you may need to insert <literal>\protect</literal>. A +better solution might involve the sixth parameter of the +<literal>\DeclareFontShape</literal> macro, but I failed to get +that to work.</para> +</refsect2> +</refsect1> + +<refsect1> +<title>Afm2pl, fontinst and artificial smallcaps</title> +<para>Afm2pl currently doesn't do virtual fonts. That means that for +things such as artificial smallcaps you have to turn elsewhere, +e.g. to the fontinst package, which is part of any mainstream TeX +distribution.</para> + +<para>Look under texmf/tex/fontinst for fontinst support files, +which allow you to generate a smallcaps font (tfm and vf files) from +an afm2pl-generated tfm file. This package only supports texnansi +encoding.</para> + +<para>There should be no real problem in doing the same for OT1 +encoding. However, there are several variations of the OT1 encoding +to take care of. Also, there are as far as I know no officially +sanctioned PostScript names for all the variations of the OT1 +encoding; the fontinst names contain spaces and are therefore not +useable as PostScript names.</para> +</refsect1> + +<refsect1> +<title>Future plans</title> + +<para>I am considering a revision which makes afm2pl a more complete +replacement for afm2tfm. In that version, afm2pl can optionally +create a second, virtual font, possibly with a different encoding +and possibly letterspaced. The current option of non-virtual +letterspacing via kerns will be dropped. If the encodings differ +then it is assumed that the virtual font is intended as a small-caps +version of the main font, and a scaling parameter can be +specified for non-matching glyphs.</para> </refsect1> + +<refsect1> +<title>Copyright</title> +<para>The afm2pl distribution is subject to the GNU General Public Licence +(GPL). Please refer to the file COPYING for details.</para> + +<para>The afm2pl homepage is <ulink +url="http://www.ntg.nl/afm2pl.html">http://www.ntg.nl/afm2pl.html</ulink>.</para> +</refsect1> + +</refentry> +</article> + diff --git a/Build/source/texk/afm2pl/c-auto.in b/Build/source/texk/afm2pl/c-auto.in new file mode 100644 index 00000000000..9c30520187e --- /dev/null +++ b/Build/source/texk/afm2pl/c-auto.in @@ -0,0 +1,4 @@ +/* c-auto.in. Generated automatically from configure.in by autoheader. */ + +/* The number of bytes in a int. */ +#undef SIZEOF_INT diff --git a/Build/source/texk/afm2pl/configure b/Build/source/texk/afm2pl/configure new file mode 100755 index 00000000000..bf7168b6a4e --- /dev/null +++ b/Build/source/texk/afm2pl/configure @@ -0,0 +1,1666 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer" +ac_help="$ac_help + --without-mktexmf-default do not run mktexmf if MF source missing" +ac_help="$ac_help + --without-mktexpk-default do not run mktexpk if PK font missing" +ac_help="$ac_help + --without-mktextfm-default do not run mktextfm if TFM file missing" +ac_help="$ac_help + --without-mkocp-default do not run mkocp if OCP file missing" +ac_help="$ac_help + --without-mkofm-default do not run mkofm if OFM file missing" +ac_help="$ac_help + --with-mktexfmt-default run mktexfmt if format file missing" +ac_help="$ac_help + --with-mktextex-default run mktextex if TeX source missing" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +ac_config_files= +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # 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 << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then + { echo "configure: error: invalid variable name: $ac_envvar" 1>&2; exit 1; } + fi + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=afm2pl.c + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:560: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + if test -z "$COMSPEC"; then ac_x=-f; else ac_x=-x; fi + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test $ac_x $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:591: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + if test -z "$COMSPEC"; then ac_x=-f; else ac_x=-x; fi + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test $ac_x $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:643: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + if test -z "$COMSPEC"; then ac_x=-f; else ac_x=-x; fi + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test $ac_x $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:676: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 687 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:718: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:723: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:751: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + case $ac_dir in + /*|[A-z]:/*) ac_aux_dir=$ac_dir;; + *) ac_aux_dir=`pwd`/$ac_dir;; + esac + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + case $ac_dir in + /*|[A-z]:/*) ac_aux_dir=$ac_dir;; + *) ac_aux_dir=`pwd`/$ac_dir;; + esac + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:819: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + # Hack for MSDOS and descendants. + if test -z "$COMSPEC"; then ac_x=-f; else ac_x=-x; fi + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test $ac_x $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:874: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:901: checking whether ln -s works" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +# MS-DOS is a special case, because it sort of pretends that ln -s +# works for executables. +if test -z "$COMSPEC" && ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +# If libm is present, use it. +echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 +echo "configure:926: checking for main in -lm" >&5 +ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lm $LIBS" +cat > conftest.$ac_ext <<EOF +#line 934 "configure" +#include "confdefs.h" + +int main() { +main() +; return 0; } +EOF +if { (eval echo configure:941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lm" +else + echo "$ac_t""no" 1>&6 +fi + + + +echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +echo "configure:964: checking whether to enable maintainer-specific portions of Makefiles" >&5 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 + if test "x$USE_MAINTAINER_MODE" = xyes; then + MAINT= + else + MAINT='#M#' + fi + + + +echo $ac_n "checking for loader (symbol LD)""... $ac_c" 1>&6 +echo "configure:983: checking for loader (symbol LD)" >&5 +if eval "test \"`echo '$''{'cf_cv_subst_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +test -z "$LD" && LD=ld +cf_cv_subst_LD=$LD +fi + +LD=${cf_cv_subst_LD} +echo "$ac_t""$LD" 1>&6 + + +echo $ac_n "checking for archiver (symbol AR)""... $ac_c" 1>&6 +echo "configure:997: checking for archiver (symbol AR)" >&5 +if eval "test \"`echo '$''{'cf_cv_subst_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +test -z "$AR" && AR=ar +cf_cv_subst_AR=$AR +fi + +AR=${cf_cv_subst_AR} +echo "$ac_t""$AR" 1>&6 + + +echo $ac_n "checking for archiver options (symbol ARFLAGS)""... $ac_c" 1>&6 +echo "configure:1011: checking for archiver options (symbol ARFLAGS)" >&5 +if eval "test \"`echo '$''{'cf_cv_subst_ARFLAGS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +test -z "$ARFLAGS" && ARFLAGS=rc +cf_cv_subst_ARFLAGS=$ARFLAGS +fi + +ARFLAGS=${cf_cv_subst_ARFLAGS} +echo "$ac_t""$ARFLAGS" 1>&6 + + + +# Check whether --with-mktexmf-default or --without-mktexmf-default was given. +if test "${with_mktexmf_default+set}" = set; then + withval="$with_mktexmf_default" + : +else + with_mktexmf_default=yes +fi + +# Check whether --with-mktexpk-default or --without-mktexpk-default was given. +if test "${with_mktexpk_default+set}" = set; then + withval="$with_mktexpk_default" + : +else + with_mktexpk_default=yes +fi + +# Check whether --with-mktextfm-default or --without-mktextfm-default was given. +if test "${with_mktextfm_default+set}" = set; then + withval="$with_mktextfm_default" + : +else + with_mktextfm_default=yes +fi + +# Check whether --with-mkocp-default or --without-mkocp-default was given. +if test "${with_mkocp_default+set}" = set; then + withval="$with_mkocp_default" + : +else + with_mkocp_default=yes +fi + +# Check whether --with-mkofm-default or --without-mkofm-default was given. +if test "${with_mkofm_default+set}" = set; then + withval="$with_mkofm_default" + : +else + with_mkofm_default=yes +fi + +# Check whether --with-mktexfmt-default or --without-mktexfmt-default was given. +if test "${with_mktexfmt_default+set}" = set; then + withval="$with_mktexfmt_default" + : +fi + +# Check whether --with-mktextex-default or --without-mktextex-default was given. +if test "${with_mktextex_default+set}" = set; then + withval="$with_mktextex_default" + with_mktextex_default=yes +else + with_mktextex_default=no +fi + + +echo $ac_n "checking where the main texmf tree is located""... $ac_c" 1>&6 +echo "configure:1081: checking where the main texmf tree is located" >&5 +texmfmain= +if test "x$datadir" != 'x${prefix}/share'; then + # First case, datadir is defined... + eval p=\"$datadir\" + # Unconditionally set the directory, but... + texmfmain=`echo "$p/texmf" | sed 's,//*,/,g'` + # ... do complain if it wasn't found. + if test -d "$texmfmain"; then + echo "$ac_t"""$texmfmain"" 1>&6 + else + echo "$ac_t""not found" 1>&6 + echo "configure: warning: No texmf tree found at $texmfmain. + ***************************************************************** + * Error: The main texmf tree was not found. * + * If you do not have the files, you should be able to them from * + * the same place you got these sources from, or from one of the * + * CTAN hosts. * + ***************************************************************** + Winging it." 1>&2 + fi +else + # Second case, datadir is default... + if test "x$prefix" = "xNONE"; then + p="$ac_default_prefix" + else + eval p=\"$prefix\" + fi + for e in share/texmf lib/texmf texmf; do + if test -d "$p/$e"; then + texmfmain='${prefix}'/"$e" + break + fi + done + if test -z "$texmfmain" && test "x$prefix" = "xNONE"; then + # Still no texmfmain found, no prefix set, perhaps kpsewhich is + # installed and can help us out. + texmfmain=`kpsewhich --expand-path='$TEXMFMAIN'` 2>/dev/null + fi + texmfmain=`echo "$texmfmain" | sed 's,//*,/,g'` + if test -n "$texmfmain"; then + echo "$ac_t"""$texmfmain"" 1>&6 + else + eval texmfmain="$datadir/texmf" + echo "$ac_t""not found" 1>&6 + echo "configure: warning: The main texmf tree was not found at $texmfmain. + ***************************************************************** + * Error: The main texmf tree was not found. * + * Use the --datadir option to specify its parent directory. * + * If you do not have the files, you should be able to them from * + * the same place you got these sources from, or from one of the * + * CTAN hosts. * + ***************************************************************** + Winging it by pretending $texmfmain is correct." 1>&2 + fi +fi + + + + + +ZZ= +if test "$cross_compiling" = yes && + (test "x$CC" = "xdos-gcc" || test "x$CC" = "xi386-mingw32-gcc" || test "x$CC" = "xgnuwin32gcc") ; then +ZZ=$CC +unset CC +cross_compiling=no +fi + + +if test "x$ZZ" = "xdos-gcc" || test "x$ZZ" = "xi386-mingw32-gcc" || test "x$ZZ" = "xgnuwin32gcc" ; then +CC=$ZZ +cross_compiling=yes +fi + + +ac_config_files="$ac_config_files Makefile" + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS <<EOF +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + + +trap 'rm -fr `echo "$ac_config_files c-auto.h:c-auto.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS <<EOF + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@CC@%$CC%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@SET_MAKE@%$SET_MAKE%g +s%@LN_S@%$LN_S%g +s%@MAINT@%$MAINT%g +s%@LD@%$LD%g +s%@AR@%$AR%g +s%@ARFLAGS@%$ARFLAGS%g +s%@texmfmain@%$texmfmain%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <<EOF + +CONFIG_FILES=\${CONFIG_FILES-"$ac_config_files"} +EOF +cat >> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*|[A-z]:/*) # Absolute path. + srcdir="$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + "") ;; + [/$]*|[A-z]:/*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + rm -f conftest.in + ac_file_inputs=`echo $ac_file_in|sed -e "s%:% $ac_given_srcdir/%g" -e "s%^%$ac_given_srcdir/%"` + cat $ac_file_inputs > conftest.in + # + # Replace lines of the form ac_include foo with the contents of foo: + # first, from the ac_include lines construct a list of file names. + # From that list, we construct a second list of those files that exist. + # Then we construct lists of sed commands for including those files, + # and a sed command that removes the ac_include lines. We don't attempt + # to read non-existent files because some (buggy) versions of sed choke + # on this. Have to use sed because old (Ultrix, SunOS) awk does not support + # getline or system. (Anyway, configure scripts aren't supposed to use awk.) + # Can't use only one -e and commands {dr foo} because foo has to be last. + # Be careful, because the filename may contain /. Be careful with + # whitespace; we need to use echo. + # + file_substs=`sed -n '/^ac_include/s%ac_include[ ]*\(.*\)%\1%p' conftest.in` + # Create the sed command line ... + if test -n "$file_substs"; then + echo "configure: warning: ac_include is obsolete; instead use kpse_include" 1>&2 + file_subst_cmd="sed -e 's/^ac_include/kpse_include/'" + else + file_subst_cmd='sed' + fi + kpse_substs=`sed -n '/^kpse_include/s%kpse_include[ ]*\(.*\)%\1%p' conftest.in` + for ac_inc in $file_substs $kpse_substs; do + if test -f "$ac_given_srcdir/$ac_inc"; then + ac_mung=`echo $ac_inc | sed 's,/,%,g'` + file_subst_cmd="$file_subst_cmd -e '/^kpse_include $ac_mung$/r $ac_given_srcdir/$ac_inc'" + fi + done + file_subst_cmd="$file_subst_cmd -e '/^kpse_include/d'" + # ... and fix the whitespace and escaped slashes. + file_subst_cmd=`echo "$file_subst_cmd" | sed -e 's,%,\\\/,g' \ +-e 's/kpse_include /kpse_include[ ]*/g'` + # I can't find any way to do variable substitution in the sed commands + # (so the user could have, e.g., $top_srcdir in their ac_include line). + (eval $file_subst_cmd conftest.in) \ + | sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* conftest.in + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ].*$%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <<EOF + CONFIG_HEADERS=" c-auto.h:c-auto.in" +EOF +cat >> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%:% $ac_given_srcdir/%g" -e "s%^%$ac_given_srcdir/%"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <<EOF + + + +EOF +cat >> $CONFIG_STATUS <<\EOF + + + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + +if test "$no_recursion" != yes; then + + # Remove --cache-file and --srcdir arguments so they do not pile up. + ac_sub_configure_args= + ac_prev= + for ac_arg in $ac_configure_args; do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case "$ac_arg" in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; + esac + done + + for ac_config_dir in : $subdirs; do + + # Do not complain, so a configure script can configure whichever + # parts of a large source tree are present. + if test ! -d $srcdir/$ac_config_dir; then + continue + fi + + echo configuring in $ac_config_dir + + case "$srcdir" in + .) ;; + *) + if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; + else + { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } + fi + ;; + esac + + ac_popdir=`pwd` + cd $ac_config_dir + + # A "../" for each directory in /$ac_config_dir. + ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` + + case "$srcdir" in + .) # No --srcdir option. We are building in place. + ac_sub_srcdir=$srcdir ;; + /*|[A-z]:/*) # Absolute path. + ac_sub_srcdir=$srcdir/$ac_config_dir ;; + *) # Relative path. + ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; + esac + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f ./configure; then + ac_sub_configure=./configure + elif test -f $ac_sub_srcdir/configure; then + ac_sub_configure=$ac_sub_srcdir/configure + elif test -f $ac_sub_srcdir/configure.in; then + ac_sub_configure=$ac_configure + else + echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 + ac_sub_configure= + fi + + # The recursion is here. + if test -n "$ac_sub_configure"; then + + # Make the cache file name correct relative to the subdirectory. + case "$cache_file" in + /*|[A-z]:/*) ac_sub_cache_file=$cache_file ;; + *) # Relative path. + ac_sub_cache_file="$ac_dots$cache_file" ;; + esac + case "$ac_given_INSTALL" in + "") ;; + [/$]*|[A-z]:/*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" + # The eval makes quoting arguments work. + if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir + then : + else + { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } + fi + fi + + cd $ac_popdir + done +fi + +date >stamp-auto diff --git a/Build/source/texk/afm2pl/configure.in b/Build/source/texk/afm2pl/configure.in new file mode 100644 index 00000000000..4678c90e576 --- /dev/null +++ b/Build/source/texk/afm2pl/configure.in @@ -0,0 +1,25 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(afm2pl.c) + +AC_CONFIG_HEADERS(c-auto.h:c-auto.in) + +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_MAKE_SET +AC_PROG_LN_S + +# If libm is present, use it. +AC_CHECK_LIB(m, main,LIBS="$LIBS -lm") + +sinclude(../kpathsea/withenable.ac) + +dnl These tests prevent reliable cross-compilation. Sigh. +dnl Some special hacks are used to make cross-compilation +dnl succeed in one special case. + +AC_UNSET_CC +AC_RESET_CC + +KPSE_CONFIG_FILES([Makefile]) +AC_OUTPUT +date >stamp-auto diff --git a/Build/source/texk/afm2pl/depend.mk b/Build/source/texk/afm2pl/depend.mk new file mode 100644 index 00000000000..e3c9178e950 --- /dev/null +++ b/Build/source/texk/afm2pl/depend.mk @@ -0,0 +1,21 @@ +afm2pl.o: afm2pl.c \ + $(kpathsea_srcdir)/config.h \ + $(kpathsea_dir)/c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h \ + $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h \ + $(kpathsea_srcdir)/types.h \ + $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h \ + $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/c-pathch.h \ + $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/tex-file.h \ + $(kpathsea_srcdir)/c-vararg.h \ + c-auto.h |