diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-03-03 13:30:44 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-03-03 13:30:44 +0000 |
commit | d34e62f6c5fec68a9b3cb118a1d0bfcee6302726 (patch) | |
tree | 2501fe5204fadcff4955fb5c4fecdd063031e168 /Build/source/texk/dvipng | |
parent | aad1d15f2e5fbef73dec00a613f347abe86036a1 (diff) |
dvipng 1.15
git-svn-id: svn://tug.org/texlive/trunk@36426 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipng')
-rw-r--r-- | Build/source/texk/dvipng/ChangeLog | 5 | ||||
-rwxr-xr-x | Build/source/texk/dvipng/configure | 26 | ||||
-rw-r--r-- | Build/source/texk/dvipng/doc/COPYING.gd | 53 | ||||
-rw-r--r-- | Build/source/texk/dvipng/doc/Makefile.am | 3 | ||||
-rw-r--r-- | Build/source/texk/dvipng/doc/Makefile.in | 1 | ||||
-rw-r--r-- | Build/source/texk/dvipng/doc/dvipng.1 | 64 | ||||
-rw-r--r-- | Build/source/texk/dvipng/doc/dvipng.help | 4 | ||||
-rw-r--r-- | Build/source/texk/dvipng/doc/dvipng.info | 267 | ||||
-rw-r--r-- | Build/source/texk/dvipng/doc/dvipng.texi | 89 | ||||
-rw-r--r-- | Build/source/texk/dvipng/doc/install.texi | 29 | ||||
-rw-r--r-- | Build/source/texk/dvipng/doc/readme.texi | 27 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-01-gd-copyright | 19 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-05-sys_wait | 17 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-07-w64-ptr | 79 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.14/COPYING.gd | 53 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.14/INSTALL | 168 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.14/RELEASE | 15 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.14/t1.c | 192 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15-PATCHES/ChangeLog (renamed from Build/source/texk/dvipng/dvipng-1.14-PATCHES/ChangeLog) | 8 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15-PATCHES/TL-Changes (renamed from Build/source/texk/dvipng/dvipng-1.14-PATCHES/TL-Changes) | 6 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-02-const (renamed from Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-02-const) | 6 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-03-programname (renamed from Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-03-programname) | 10 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-06-WIN32 (renamed from Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-06-WIN32) | 12 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-07-w64-ptr | 79 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/COPYING (renamed from Build/source/texk/dvipng/dvipng-1.14/COPYING) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/COPYING.LESSER (renamed from Build/source/texk/dvipng/dvipng-1.14/COPYING.LESSER) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/COPYING.gd | 54 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/ChangeLog (renamed from Build/source/texk/dvipng/dvipng-1.14/ChangeLog) | 427 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/ChangeLog.0 (renamed from Build/source/texk/dvipng/dvipng-1.14/ChangeLog.0) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/INSTALL | 157 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/Makefile.in (renamed from Build/source/texk/dvipng/dvipng-1.14/Makefile.in) | 15 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/README (renamed from Build/source/texk/dvipng/dvipng-1.14/README) | 74 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/RELEASE | 14 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/aclocal.m4 (renamed from Build/source/texk/dvipng/dvipng-1.14/aclocal.m4) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/color.c (renamed from Build/source/texk/dvipng/dvipng-1.14/color.c) | 77 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/commands.h (renamed from Build/source/texk/dvipng/dvipng-1.14/commands.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/config.h.in (renamed from Build/source/texk/dvipng/dvipng-1.14/config.h.in) | 19 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/configure.ac (renamed from Build/source/texk/dvipng/dvipng-1.14/configure.ac) | 50 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/draw.c (renamed from Build/source/texk/dvipng/dvipng-1.14/draw.c) | 30 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/dvi.c (renamed from Build/source/texk/dvipng/dvipng-1.14/dvi.c) | 107 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/dvipng.1 (renamed from Build/source/texk/dvipng/dvipng-1.14/dvipng.1) | 74 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/dvipng.c (renamed from Build/source/texk/dvipng/dvipng-1.14/dvipng.c) | 34 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/dvipng.h (renamed from Build/source/texk/dvipng/dvipng-1.14/dvipng.h) | 104 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/dvipng.texi (renamed from Build/source/texk/dvipng/dvipng-1.14/dvipng.texi) | 89 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/enc.c (renamed from Build/source/texk/dvipng/dvipng-1.14/enc.c) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/font.c (renamed from Build/source/texk/dvipng/dvipng-1.14/font.c) | 107 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/fontmap.c (renamed from Build/source/texk/dvipng/dvipng-1.14/fontmap.c) | 81 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/ft.c (renamed from Build/source/texk/dvipng/dvipng-1.14/ft.c) | 18 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/install.texi (renamed from Build/source/texk/dvipng/dvipng-1.14/install.texi) | 29 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/macros.texi (renamed from Build/source/texk/dvipng/dvipng-1.14/macros.texi) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/miktex.h (renamed from Build/source/texk/dvipng/dvipng-1.14/miktex.h) | 10 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/miktex.mak (renamed from Build/source/texk/dvipng/dvipng-1.14/miktex.mak) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/misc.c (renamed from Build/source/texk/dvipng/dvipng-1.14/misc.c) | 123 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/papersiz.c (renamed from Build/source/texk/dvipng/dvipng-1.14/papersiz.c) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/pk.c (renamed from Build/source/texk/dvipng/dvipng-1.14/pk.c) | 57 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/ppagelist.c (renamed from Build/source/texk/dvipng/dvipng-1.14/ppagelist.c) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/readme.texi (renamed from Build/source/texk/dvipng/dvipng-1.14/readme.texi) | 27 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/set.c (renamed from Build/source/texk/dvipng/dvipng-1.14/set.c) | 53 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/sfd.c (renamed from Build/source/texk/dvipng/dvipng-1.14/sfd.c) | 29 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/special.c (renamed from Build/source/texk/dvipng/dvipng-1.14/special.c) | 140 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/test_dvipng.tex (renamed from Build/source/texk/dvipng/dvipng-1.14/test_dvipng.tex) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/tfm.c (renamed from Build/source/texk/dvipng/dvipng-1.14/tfm.c) | 67 | ||||
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.15/vf.c (renamed from Build/source/texk/dvipng/dvipng-1.14/vf.c) | 36 | ||||
-rw-r--r-- | Build/source/texk/dvipng/version.ac | 4 |
64 files changed, 1416 insertions, 1922 deletions
diff --git a/Build/source/texk/dvipng/ChangeLog b/Build/source/texk/dvipng/ChangeLog index e27b17eef95..3ac7a91cc4b 100644 --- a/Build/source/texk/dvipng/ChangeLog +++ b/Build/source/texk/dvipng/ChangeLog @@ -1,3 +1,8 @@ +2015-03-03 Peter Breitenlohner <peb@mppmu.mpg.de> + + * Imported release 1.15 from savannah.nongnu.org. + * doc/Makefile.am, version.ac: Adapted. + 2015-02-16 Peter Breitenlohner <peb@mppmu.mpg.de> * Makefile.am: Use the fragment ../../am/dist_hook.am. diff --git a/Build/source/texk/dvipng/configure b/Build/source/texk/dvipng/configure index 08045a2d869..6695da3b8cc 100755 --- a/Build/source/texk/dvipng/configure +++ b/Build/source/texk/dvipng/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for dvipng (TeX Live) 1.14. +# Generated by GNU Autoconf 2.69 for dvipng (TeX Live) 1.15. # # Report bugs to <tex-k@tug.org>. # @@ -590,12 +590,12 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dvipng (TeX Live)' PACKAGE_TARNAME='dvipng--tex-live-' -PACKAGE_VERSION='1.14' -PACKAGE_STRING='dvipng (TeX Live) 1.14' +PACKAGE_VERSION='1.15' +PACKAGE_STRING='dvipng (TeX Live) 1.15' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' -ac_unique_file="dvipng-1.14/dvipng.c" +ac_unique_file="dvipng-1.15/dvipng.c" # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> @@ -1373,7 +1373,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dvipng (TeX Live) 1.14 to adapt to many kinds of systems. +\`configure' configures dvipng (TeX Live) 1.15 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1444,7 +1444,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dvipng (TeX Live) 1.14:";; + short | recursive ) echo "Configuration of dvipng (TeX Live) 1.15:";; esac cat <<\_ACEOF @@ -1580,7 +1580,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dvipng (TeX Live) configure 1.14 +dvipng (TeX Live) configure 1.15 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2190,7 +2190,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dvipng (TeX Live) $as_me 1.14, which was +It was created by dvipng (TeX Live) $as_me 1.15, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -7879,7 +7879,7 @@ fi # Define the identity of the package. PACKAGE='dvipng--tex-live-' - VERSION='1.14' + VERSION='1.15' cat >>confdefs.h <<_ACEOF @@ -15035,7 +15035,7 @@ Usage: $0 [OPTIONS] Report bugs to <bug-libtool@gnu.org>." lt_cl_version="\ -dvipng (TeX Live) config.lt 1.14 +dvipng (TeX Live) config.lt 1.15 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -16608,7 +16608,7 @@ $as_echo " ac_config_headers="$ac_config_headers config.h" -DVIPNG_TREE=dvipng-1.14 +DVIPNG_TREE=dvipng-1.15 if test "x$kpse_cv_have_win32" != xno; then @@ -17191,7 +17191,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dvipng (TeX Live) $as_me 1.14, which was +This file was extended by dvipng (TeX Live) $as_me 1.15, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17261,7 +17261,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dvipng (TeX Live) config.status 1.14 +dvipng (TeX Live) config.status 1.15 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/texk/dvipng/doc/COPYING.gd b/Build/source/texk/dvipng/doc/COPYING.gd deleted file mode 100644 index 4a91420256e..00000000000 --- a/Build/source/texk/dvipng/doc/COPYING.gd +++ /dev/null @@ -1,53 +0,0 @@ - - Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002 by Cold Spring Harbor Laboratory. Funded under Grant - P41-RR02188 by the National Institutes of Health. - - Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 by - Boutell.Com, Inc. - - Portions relating to GD2 format copyright 1999, 2000, 2001, 2002 - Philip Warner. - - Portions relating to PNG copyright 1999, 2000, 2001, 2002 Greg - Roelofs. - - Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002 John - Ellson (ellson@@lucent.com). - - Portions relating to gdft.c copyright 2001, 2002 John Ellson - (ellson@@lucent.com). - - Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 - Pierre-Alain Joye (pierre@@libgd.org). - - Portions relating to JPEG and to color quantization copyright 2000, - 2001, 2002, Doug Becker and copyright (C) 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001, 2002, Thomas G. Lane. This software is - based in part on the work of the Independent JPEG Group. See the - file README-JPEG.TXT for more information. - - Portions relating to WBMP copyright 2000, 2001, 2002 Maurice - Szmurlo and Johan Van den Brande. - - Permission has been granted to copy, distribute and modify gd in - any context without fee, including a commercial application, - provided that this notice is present in user-accessible supporting - documentation. - - This does not affect your ownership of the derived work itself, and - the intent is to assure proper credit for the authors of gd, not to - interfere with your productive use of gd. If you have questions, - ask. "Derived works" includes all programs that utilize the - library. Credit must be given in user-accessible documentation. - - This software is provided "AS IS." The copyright holders disclaim - all warranties, either express or implied, including but not - limited to implied warranties of merchantability and fitness for a - particular purpose, with respect to this code and accompanying - documentation. - - Although their code does not appear in gd, the authors wish to thank - David Koblas, David Rowley, and Hutchison Avenue Software Corporation - for their prior contributions. - diff --git a/Build/source/texk/dvipng/doc/Makefile.am b/Build/source/texk/dvipng/doc/Makefile.am index 6cf506627fc..e61015bb4d5 100644 --- a/Build/source/texk/dvipng/doc/Makefile.am +++ b/Build/source/texk/dvipng/doc/Makefile.am @@ -1,12 +1,11 @@ ## Makefile.am for the TeX Live subdirectory texk/dvipng/doc/ ## -## Copyright (C) 2009-2013 Peter Breitenlohner <tex-live@tug.org> +## Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. # info_TEXINFOS = \ dvipng.texi dvipng_TEXINFOS = \ - COPYING.gd \ dvipng.help \ install.texi \ macros.texi \ diff --git a/Build/source/texk/dvipng/doc/Makefile.in b/Build/source/texk/dvipng/doc/Makefile.in index 4c6ea6592bc..90b0f385768 100644 --- a/Build/source/texk/dvipng/doc/Makefile.in +++ b/Build/source/texk/dvipng/doc/Makefile.in @@ -357,7 +357,6 @@ info_TEXINFOS = \ dvipng.texi dvipng_TEXINFOS = \ - COPYING.gd \ dvipng.help \ install.texi \ macros.texi \ diff --git a/Build/source/texk/dvipng/doc/dvipng.1 b/Build/source/texk/dvipng/doc/dvipng.1 index e57ca8aa9ce..d81d4fcbbb7 100644 --- a/Build/source/texk/dvipng/doc/dvipng.1 +++ b/Build/source/texk/dvipng/doc/dvipng.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.20) +.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== @@ -38,6 +38,8 @@ . ds PI \(*p . ds L" `` . ds R" '' +. ds C` +. ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. @@ -48,17 +50,24 @@ .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX .. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} .\} +.rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -124,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DVIPNG 1" -.TH DVIPNG 1 "2013-07-09" "dvipng (TeX Live) 1.14" "User commands" +.TH DVIPNG 1 "2015-03-03" "dvipng (TeX Live) 1.15" "User commands" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -153,15 +162,15 @@ as needed in preview-latex, WeBWorK and others. It does not read the postamble, so it can be started before TeX finishes. There is a \fB\-\-follow\fR switch that makes dvipng wait at end-of-file for further output, unless it finds the \s-1POST\s0 marker that -indicates the end of the \s-1DVI\s0. +indicates the end of the \s-1DVI.\s0 .IP "\(bu" 4 Interactive query of options. dvipng can read options interactively through stdin, and all options are usable. It is even possible to change the input file through this interface. .IP "\(bu" 4 -Supports \s-1PK\s0, \s-1VF\s0, PostScript Type1, and TrueType fonts, subfonts (i.e., +Supports \s-1PK, VF,\s0 PostScript Type1, and TrueType fonts, subfonts (i.e., as used in CJK-LaTeX), color specials, and inclusion of PostScript, -\&\s-1PNG\s0, \s-1JPEG\s0 or \s-1GIF\s0 images. +\&\s-1PNG, JPEG\s0 or \s-1GIF\s0 images. .IP "\(bu" 4 and more... .SH "OPTIONS" @@ -205,7 +214,7 @@ below). .IP "\fB\-bg\fR \fIcolor_spec\fR" 4 .IX Item "-bg color_spec" Choose background color for the images. This option will be ignored if -there is a background color \especial in the \s-1DVI\s0. The color spec should +there is a background color \especial in the \s-1DVI.\s0 The color spec should be in TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. You can also specify 'Transparent' or 'transparent' which will give you a transparent background with the normal background as a fallback color. A @@ -267,7 +276,7 @@ numbers rather than the physical page number. See the \fB\-o\fR switch. .IP "\fB\-fg\fR \fIcolor_spec\fR" 4 .IX Item "-fg color_spec" Choose foreground color for the images. This option will be ignored if -there is a foreground color \especial in the \s-1DVI\s0. The color spec should +there is a foreground color \especial in the \s-1DVI.\s0 The color spec should be in TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. .IP "\fB\-\-follow*\fR" 4 .IX Item "--follow*" @@ -275,7 +284,7 @@ Wait for data at end-of-file. One of the benefits of dvipng is that it does not read the postamble, so it can be started before TeX finishes. This switch makes dvipng wait at end-of-file for further output, unless it finds the \s-1POST\s0 marker that indicates the end of the -\&\s-1DVI\s0. This is similar to \fBtail \-f\fR but for DVI-to-PNG conversion. +\&\s-1DVI.\s0 This is similar to \fBtail \-f\fR but for DVI-to-PNG conversion. .IP "\fB\-\-freetype*\fR" 4 .IX Item "--freetype*" Enable/disable FreeType font rendering (default on). This option is @@ -286,9 +295,7 @@ for rendering the fonts. If you have PostScript versions of Computer Modern installed, there will be no need to generate bitmapped (\s-1PK\s0) variants on disk of these. Then, you can render images at different (and unusual) resolutions without cluttering the disk with lots of bitmapped -fonts. Note that if you have both FreeType and T1lib on your system, -FreeType will be preferred by dvipng. If you for some reason would want -to use T1lib rendering, use this option. +fonts. .IP "\fB\-\-gamma\fR \fInum\fR" 4 .IX Item "--gamma num" Control the interpolation of colors in the greyscale anti-aliasing @@ -421,7 +428,7 @@ output; report no warnings (only errors) to standard error. .IP "\fB\-Q\fR \fInum\fR" 4 .IX Item "-Q num" Set the quality to \fInum\fR. That is, choose the number of antialiasing -levels for bitmapped fonts (\s-1PK\s0) and fonts rendered using T1lib, to be +levels for bitmapped fonts (\s-1PK\s0), to be \&\fInum\fR*\fInum\fR+1. The default value is 4 which gives 17 levels of antialiasing for antialiased fonts from these two. If FreeType is available, its rendering is unaffected by this option. @@ -446,24 +453,11 @@ and in addition the \s-1DVI\s0 origin, located 1in from the top and 1in from the left edge of the paper. This usually gives whitespace above and to the left in the produced image. The value \fBtight\fR will make dvipng only include all ink put on the page, producing neat images. -.IP "\fB\-\-t1lib*\fR" 4 -.IX Item "--t1lib*" -Enable T1lib font rendering (default on). This option is available if -the T1lib font library was present at compilation time. If this is the -case, dvipng will have direct support for PostScript Type1 fonts -internally, rather than using \fBgsftopk\fR for rendering the fonts. If -you have PostScript versions of Computer Modern installed, there will be -no need to generate bitmapped variants on disk of these. Then, you can -render images at different (and unusual) resolutions without cluttering -the disk with lots of bitmapped fonts. Note that if you have both -FreeType and T1lib on your system, FreeType will be preferred by dvipng, -and if you for some reason rather want to use T1lib, give the option -\&\fB\-\-freetype0\fR (see above). .IP "\fB\-\-truecolor*\fR" 4 .IX Item "--truecolor*" This will make \fBdvipng\fR generate truecolor output. Note that truecolor output is automatic if you include an external image in your -\&\s-1DVI\s0, e.g., via a PostScript special (i.e., the \fBgraphics\fR or +\&\s-1DVI,\s0 e.g., via a PostScript special (i.e., the \fBgraphics\fR or \&\fBgraphicx\fR package). This switch is overridden by the \&\fB\-\-palette\fR switch. .IP "\fB\-v*\fR" 4 @@ -510,4 +504,4 @@ This program is released under the \s-1GNU\s0 Lesser General Public License version 3, see the \s-1COPYING\s0 file in the dvipng distribution or <\fBhttp://www.gnu.org/licenses/gpl.html\fR>. .PP -Copyright (c) 2002\-2010 Jan-AAke Larsson +Copyright (c) 2002\-2015 Jan-AAke Larsson diff --git a/Build/source/texk/dvipng/doc/dvipng.help b/Build/source/texk/dvipng/doc/dvipng.help index 251ab8823c1..86566aee4dc 100644 --- a/Build/source/texk/dvipng/doc/dvipng.help +++ b/Build/source/texk/dvipng/doc/dvipng.help @@ -1,4 +1,4 @@ -This is ./dvipng (TeX Live) 1.14 Copyright 2002-2010 Jan-Ake Larsson +This is ./dvipng (TeX Live) 1.15 Copyright 2002-2015 Jan-Ake Larsson Usage: ./dvipng [OPTION]... FILENAME[.dvi] Options are chosen to be similar to dvips' options where possible: @@ -34,7 +34,7 @@ These do not correspond to dvips options: --png Output PNG images (dvipng default) --strict When a warning occurs, exit --truecolor* Truecolor output - -Q # Quality (T1lib and PK subsampling) + -Q # Quality (PK subsampling) --width* Output the image width on stdout -z # PNG compression level diff --git a/Build/source/texk/dvipng/doc/dvipng.info b/Build/source/texk/dvipng/doc/dvipng.info index c1062fb6d72..0f98fd5ebd4 100644 --- a/Build/source/texk/dvipng/doc/dvipng.info +++ b/Build/source/texk/dvipng/doc/dvipng.info @@ -1,4 +1,4 @@ -This is dvipng.info, produced by makeinfo version 5.1 from dvipng.texi. +This is dvipng.info, produced by makeinfo version 5.2 from dvipng.texi. INFO-DIR-SECTION TeX START-INFO-DIR-ENTRY @@ -15,7 +15,7 @@ dvipng This manual documents dvipng, a program to translate a DVI (DeVice Independent) file into PNG (Portable Network Graphics). - This file documents dvipng version 1.14 + This file documents dvipng version 1.15 Corrections or perhaps rewrites of sections are _very welcome_. @@ -98,11 +98,11 @@ Installing dvipng should be simple: merely './configure', 'make', and * Menu: -* Prerequisites:: -* Configure:: -* Build/install:: +* Prerequisites:: +* Configure:: +* Build/install:: * Installation outside the texmf tree:: -* Advice for non-privileged users:: +* Advice for non-privileged users:: File: dvipng.info, Node: Prerequisites, Next: Configure, Up: Installation @@ -144,15 +144,6 @@ File: dvipng.info, Node: Prerequisites, Next: Configure, Up: Installation want to render CJK-LaTeX characters, you must have FreeType 2 installed. - * The font-rendering library T1lib - - An alternative to FreeType 2 is T1lib, but this will enable only - PostScript fonts in dvipng and will not include subfont support. - Also here, you can render images at different (and unusual) - resolutions without cluttering the disk with lots of bitmapped - fonts. If both FreeType 2 and T1lib are present, FreeType will be - internally preferred by dvipng but T1lib can be chosen at runtime. - * libpng and libz To be able to compress and write PNG files to disk, dvipng (or @@ -286,15 +277,15 @@ format. If there are four pages in 'foo.dvi', those pages will be output as 'foo1.png', 'foo2.png', 'foo3.png', and 'foo4.png', respectively. - If you have enabled the PostScript font support (via FreeType or -T1lib), fonts will be rendered as they are needed. Otherwise, dvipng -will use bitmapped (PK) fonts, and if you use PK fonts that have not -been used on your system before, they may be automatically generated; -this process can take a few minutes, so progress reports appear by -default. The next time the same font is used, it will have been saved -on disk, so rendering will go much faster. (If dvipng tries to -endlessly generate the same fonts over and over again, something is -wrong. *Note (kpathsea)Unable to generate fonts::.) + If you have enabled the PostScript font support (via FreeType), fonts +will be rendered as they are needed. Otherwise, dvipng will use +bitmapped (PK) fonts, and if you use PK fonts that have not been used on +your system before, they may be automatically generated; this process +can take a few minutes, so progress reports appear by default. The next +time the same font is used, it will have been saved on disk, so +rendering will go much faster. (If dvipng tries to endlessly generate +the same fonts over and over again, something is wrong. *Note +(kpathsea)Unable to generate fonts::.) Many options are available (see the next section). For a brief summary of available options, just type @@ -324,7 +315,7 @@ File: dvipng.info, Node: Option summary, Next: Option details, Up: Command-li Here is a handy summary of the options; it is printed out when you run dvipng with no arguments or with the standard '--help' option. - This is ./dvipng (TeX Live) 1.14 Copyright 2002-2010 Jan-Ake Larsson + This is ./dvipng (TeX Live) 1.15 Copyright 2002-2015 Jan-Ake Larsson Usage: ./dvipng [OPTION]... FILENAME[.dvi] Options are chosen to be similar to dvips' options where possible: @@ -360,13 +351,14 @@ dvipng with no arguments or with the standard '--help' option. --png Output PNG images (dvipng default) --strict When a warning occurs, exit --truecolor* Truecolor output - -Q # Quality (T1lib and PK subsampling) + -Q # Quality (PK subsampling) --width* Output the image width on stdout -z # PNG compression level # = number f = file s = string * = suffix, '0' to turn off c = comma-separated dimension pair (e.g., 3.2in,-32.1cm) + File: dvipng.info, Node: Option details, Prev: Option summary, Up: Command-line options @@ -480,10 +472,7 @@ reversal, use '-r0'. Such options are marked with a trailing '*'. PostScript versions of Computer Modern installed, there will be no need to generate bitmapped (PK) variants on disk of these. Then, you can render images at different (and unusual) resolutions - without cluttering the disk with lots of bitmapped fonts. Note - that if you have both FreeType and T1lib on your system, FreeType - will be preferred by dvipng. If you for some reason would want to - use T1lib rendering, use this option. + without cluttering the disk with lots of bitmapped fonts. '--gamma NUM' Control the interpolation of colors in the greyscale anti-aliasing @@ -614,10 +603,10 @@ reversal, use '-r0'. Such options are marked with a trailing '*'. '-Q NUM' Set the quality to NUM. That is, choose the number of antialiasing - levels for bitmapped fonts (PK) and fonts rendered using T1lib, to - be NUM*NUM+1. The default value is 4 which gives 17 levels of - antialiasing for antialiased fonts from these two. If FreeType is - available, its rendering is unaffected by this option. + levels for bitmapped fonts (PK), to be NUM*NUM+1. The default + value is 4 which gives 17 levels of antialiasing for antialiased + fonts from these two. If FreeType is available, its rendering is + unaffected by this option. '-r*' Toggle output of pages in reverse/forward order. By default, the @@ -640,20 +629,6 @@ reversal, use '-r0'. Such options are marked with a trailing '*'. image. The value 'tight' will make dvipng only include all ink put on the page, producing neat images. -'--t1lib*' - Enable T1lib font rendering (default on). This option is available - if the T1lib font library was present at compilation time. If this - is the case, dvipng will have direct support for PostScript Type1 - fonts internally, rather than using 'gsftopk' for rendering the - fonts. If you have PostScript versions of Computer Modern - installed, there will be no need to generate bitmapped variants on - disk of these. Then, you can render images at different (and - unusual) resolutions without cluttering the disk with lots of - bitmapped fonts. Note that if you have both FreeType and T1lib on - your system, FreeType will be preferred by dvipng, and if you for - some reason rather want to use T1lib, give the option '--freetype0' - (see above). - '--truecolor*' This will make 'dvipng' generate truecolor output. Note that truecolor output is automatic if you include an external image in @@ -823,8 +798,8 @@ color specification. * Menu: -* Color specifications:: -* Color specials:: +* Color specifications:: +* Color specials:: File: dvipng.info, Node: Color specifications, Next: Color specials, Up: Color @@ -954,14 +929,12 @@ track all classes, you can use '-1'. 256 GhostScript specials 512 - T1lib calls -1024 Kpathsea 'stat' calls -2048 +1024 Kpathsea hash table lookups -4096 +2048 Kpathsea path element expansion -8192 +4096 Kpathsea path searches @@ -987,61 +960,6 @@ Ridderstro"m, Ezra Peisach, William H Wheeler, Thomas Klausner, Harald Koenig, Adrian Bunk, Kevin Smith, Jason Riedy, Wolfram Krause, Reinhard Kotucha, Takeshi Abe, and Waldeck Schutzer. - Use of the 'gd' library requires inclusion of the following copyright -notice, which applies to the 'gd' library: - - Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002 by Cold Spring Harbor Laboratory. Funded under Grant - P41-RR02188 by the National Institutes of Health. - - Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 by - Boutell.Com, Inc. - - Portions relating to GD2 format copyright 1999, 2000, 2001, 2002 - Philip Warner. - - Portions relating to PNG copyright 1999, 2000, 2001, 2002 Greg - Roelofs. - - Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002 John - Ellson (ellson@lucent.com). - - Portions relating to gdft.c copyright 2001, 2002 John Ellson - (ellson@lucent.com). - - Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 - Pierre-Alain Joye (pierre@libgd.org). - - Portions relating to JPEG and to color quantization copyright 2000, - 2001, 2002, Doug Becker and copyright (C) 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001, 2002, Thomas G. Lane. This software is - based in part on the work of the Independent JPEG Group. See the - file README-JPEG.TXT for more information. - - Portions relating to WBMP copyright 2000, 2001, 2002 Maurice - Szmurlo and Johan Van den Brande. - - Permission has been granted to copy, distribute and modify gd in - any context without fee, including a commercial application, - provided that this notice is present in user-accessible supporting - documentation. - - This does not affect your ownership of the derived work itself, and - the intent is to assure proper credit for the authors of gd, not to - interfere with your productive use of gd. If you have questions, - ask. "Derived works" includes all programs that utilize the - library. Credit must be given in user-accessible documentation. - - This software is provided "AS IS." The copyright holders disclaim - all warranties, either express or implied, including but not - limited to implied warranties of merchantability and fitness for a - particular purpose, with respect to this code and accompanying - documentation. - - Although their code does not appear in gd, the authors wish to - thank David Koblas, David Rowley, and Hutchison Avenue Software - Corporation for their prior contributions. - File: dvipng.info, Node: Copying, Next: Index, Prev: Credits, Up: Top @@ -1064,7 +982,7 @@ License along with this program. If not, see -Copyright (C) 2002-2010 Jan-AAke Larsson +Copyright (C) 2002-2015 Jan-AAke Larsson File: dvipng.info, Node: Index, Prev: Copying, Up: Top @@ -1075,79 +993,78 @@ Index * Menu: -* -dSAFER: Option details. (line 166) -* absolute page number, and '-l': Option details. (line 140) -* absolute page number, and '-p': Option details. (line 193) -* antialiasing levels, number of: Option details. (line 246) +* -dSAFER: Option details. (line 163) +* absolute page number, and '-l': Option details. (line 137) +* absolute page number, and '-p': Option details. (line 190) +* antialiasing levels, number of: Option details. (line 243) * background color (option): Option details. (line 40) * base resolution, setting: Option details. (line 33) * baseline reporting: Option details. (line 76) -* baseline reporting <1>: Option details. (line 132) +* baseline reporting <1>: Option details. (line 129) * color specifications: Color specifications. (line 6) * command-line options: Command-line options. (line 6) * compilation: Installation. (line 6) -* compression: Option details. (line 312) +* compression: Option details. (line 295) * configuration, of dvipng: Installation. (line 6) -* dark fonts: Option details. (line 119) +* dark fonts: Option details. (line 116) * debugging: Option details. (line 54) * debugging <1>: Diagnosing problems. (line 6) * depth reporting: Option details. (line 76) -* exit on erroneous images: Option details. (line 257) -* first page printed: Option details. (line 193) +* exit on erroneous images: Option details. (line 254) +* first page printed: Option details. (line 190) * follow mode: Option details. (line 97) -* font generation, avoiding: Option details. (line 158) -* forcing palette output: Option details. (line 202) +* font generation, avoiding: Option details. (line 155) +* forcing palette output: Option details. (line 199) * foreground color (option): Option details. (line 91) * FreeType font rendering: Option details. (line 105) -* fuzzy images: Option details. (line 119) -* gamma: Option details. (line 119) -* GhostScript and -dSAFER: Option details. (line 166) -* GhostScript, turning off: Option details. (line 162) -* GIF image format: Option details. (line 125) -* height reporting: Option details. (line 132) +* fuzzy images: Option details. (line 116) +* gamma: Option details. (line 116) +* GhostScript and -dSAFER: Option details. (line 163) +* GhostScript, turning off: Option details. (line 159) +* GIF image format: Option details. (line 122) +* height reporting: Option details. (line 129) * installation, of dvipng: Installation. (line 6) * invoking dvipng: Basic usage. (line 6) -* last page printed: Option details. (line 140) -* light fonts: Option details. (line 119) -* magnification, overriding DVI: Option details. (line 302) -* Metafont mode, specifying: Option details. (line 149) -* mktexpk, avoiding: Option details. (line 158) -* mode name, specifying: Option details. (line 149) -* no erroneous images: Option details. (line 211) -* offset pages: Option details. (line 187) +* last page printed: Option details. (line 137) +* light fonts: Option details. (line 116) +* magnification, overriding DVI: Option details. (line 285) +* Metafont mode, specifying: Option details. (line 146) +* mktexpk, avoiding: Option details. (line 155) +* mode name, specifying: Option details. (line 146) +* no erroneous images: Option details. (line 208) +* offset pages: Option details. (line 184) * option, details of: Option details. (line 6) * options, dvipng: Command-line options. (line 6) * options, reading from standard input: Option details. (line 11) * options, summary: Option summary. (line 6) * output resolution, setting: Option details. (line 60) -* output, redirecting: Option details. (line 180) -* page range: Option details. (line 224) -* page, first printed: Option details. (line 193) -* page, last printed: Option details. (line 140) -* physical page number, and '-l': Option details. (line 140) -* physical page number, and '-p': Option details. (line 193) -* PNG image format: Option details. (line 220) +* output, redirecting: Option details. (line 177) +* page range: Option details. (line 221) +* page, first printed: Option details. (line 190) +* page, last printed: Option details. (line 137) +* physical page number, and '-l': Option details. (line 137) +* physical page number, and '-p': Option details. (line 190) +* PNG image format: Option details. (line 217) * PostScript inclusion problems: Encapsulated PostScript. (line 21) * PostScript, turning off raw PostScript specials: Option details. - (line 174) + (line 171) * problems: Diagnosing problems. (line 6) -* quality: Option details. (line 246) -* quiet operation: Option details. (line 242) -* reverse pagination: Option details. (line 253) -* silent operation: Option details. (line 242) +* quality: Option details. (line 243) +* quiet operation: Option details. (line 239) +* reverse pagination: Option details. (line 250) +* silent operation: Option details. (line 239) * standard input, reading options from: Option details. (line 11) -* standard output, output to: Option details. (line 180) -* T1lib font rendering: Option details. (line 274) +* standard output, output to: Option details. (line 177) * transparent border fallback color: Option details. (line 23) * transparent border width: Option details. (line 23) * trouble: Diagnosing problems. (line 6) -* truecolor output: Option details. (line 288) -* warnings, suppressing: Option details. (line 242) -* width reporting: Option details. (line 299) +* truecolor output: Option details. (line 271) +* warnings, suppressing: Option details. (line 239) +* width reporting: Option details. (line 282) @@ -1155,27 +1072,27 @@ Tag Table: Node: Top296 Node: Introduction1191 Node: Installation3436 -Node: Prerequisites3834 -Node: Configure6331 -Node: Build/install8378 -Node: Installation outside the texmf tree8846 -Node: Advice for non-privileged users9556 -Node: Basic usage10567 -Node: Command-line options11720 -Node: Option summary12143 -Node: Option details14526 -Node: Graphics30489 -Node: Encapsulated PostScript31244 -Node: Bitmapped graphics32594 -Node: Raw PostScript33822 -Node: Color36075 -Node: Color specifications36486 -Node: Color specials37589 -Node: Diagnosing problems39006 -Node: Contact information39490 -Node: Debug options40218 -Node: Credits41229 -Node: Copying44830 -Node: Index45611 +Node: Prerequisites3783 +Node: Configure5823 +Node: Build/install7870 +Node: Installation outside the texmf tree8338 +Node: Advice for non-privileged users9048 +Node: Basic usage10059 +Node: Command-line options11203 +Node: Option summary11626 +Node: Option details14000 +Node: Graphics28938 +Node: Encapsulated PostScript29693 +Node: Bitmapped graphics31043 +Node: Raw PostScript32271 +Node: Color34524 +Node: Color specifications34913 +Node: Color specials36016 +Node: Diagnosing problems37433 +Node: Contact information37917 +Node: Debug options38645 +Node: Credits39634 +Node: Copying40840 +Node: Index41621 End Tag Table diff --git a/Build/source/texk/dvipng/doc/dvipng.texi b/Build/source/texk/dvipng/doc/dvipng.texi index 0235c349b4b..16a40ec3a0c 100644 --- a/Build/source/texk/dvipng/doc/dvipng.texi +++ b/Build/source/texk/dvipng/doc/dvipng.texi @@ -9,8 +9,8 @@ dvipng [options] [filename] - @c man end @end ifset -@set version 1.14 -@set month-year October 2010 +@set version 1.15 +@set month-year February 2015 @c Put everything in one index (arbitrarily chosen to be the concept index). @syncodeindex fn cp @@ -39,8 +39,8 @@ dvipng [options] [filename] - @author by Jan-@AA{}ke Larsson. @page @vskip 0pt plus 1filll -Copyright @copyright{} 2002-2010 Jan-@AA{}ke Larsson - +Copyright @copyright{} 2002-2015 Jan-@AA{}ke Larsson + Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. @@ -131,7 +131,7 @@ PNG format. If there are four pages in @file{foo.dvi}, those pages will be output as @file{foo1.png}, @file{foo2.png}, @file{foo3.png}, and @file{foo4.png}, respectively. -If you have enabled the PostScript font support (via FreeType or T1lib), +If you have enabled the PostScript font support (via FreeType), fonts will be rendered as they are needed. Otherwise, dvipng will use bitmapped (PK) fonts, and if you use PK fonts that have not been used on your system before, they may be automatically generated; this process @@ -239,12 +239,12 @@ both variants will use the latter behaviour. @xref{Color}. Set the debug flags, showing what dvipng (thinks it) is doing. This will work unless dvipng has been compiled without the @code{DEBUG} option (not recommended). Set the flags as you need them, use @samp{-d -1} as -the first option for maximum output. @xref{Debug options}. +the first option for maximum output. @xref{Debug options}. @item -D @var{num} @cindex output resolution, setting Set the output resolution, both horizontal and vertical, to @var{num} -dpi (dots per inch). +dpi (dots per inch). One may want to adjust this to fit a certain text font size (e.g., on a web page), and for a text font height of @var{font_px} pixels (in @@ -258,7 +258,7 @@ proprietary browsers have font height in pt (points), not pixels. You have to rescale that to pixels, using the screen resolution (default is usually 96 dpi) which means the formula is @example -@var{font_px} = @var{font_pt} * 96 / 72 [pt * px/in / (pt/in)] +@var{font_px} = @var{font_pt} * 96 / 72 [pt * px/in / (pt/in)] @end example On some high-res screens, the value is instead 120 dpi. Good luck! @@ -346,9 +346,7 @@ for rendering the fonts. If you have PostScript versions of Computer Modern installed, there will be no need to generate bitmapped (PK) variants on disk of these. Then, you can render images at different (and unusual) resolutions without cluttering the disk with lots of bitmapped -fonts. Note that if you have both FreeType and T1lib on your system, -FreeType will be preferred by dvipng. If you for some reason would want -to use T1lib rendering, use this option. +fonts. @item --gamma @var{num} @cindex gamma @@ -408,7 +406,7 @@ Kpathsea}. @pindex mktexpk@r{, avoiding} @c this description repeated in kpathsea.texi This option only has an effect when using bitmapped (PK) fonts. It turns -off automatic PK font generation (@file{mktexpk}). +off automatic PK font generation (@file{mktexpk}). @ignore @flindex missfont.log If @code{mktexpk}, the invocation is appended to a file @@ -459,10 +457,10 @@ file was @samp{@var{file}.dvi}. @cindex offset pages Move the origin by @var{x-offset},@var{y-offset}, a comma-separated pair of dimensions such as @samp{.1in,-.3cm}. -@c (@pxref{papersize special}). +@c (@pxref{papersize special}). The origin of the page is shifted from the default position (of one inch down, one inch to the right from the upper left corner of -the paper) by this amount. +the paper) by this amount. @item -p [=]@var{num} @cindex first page printed @@ -533,7 +531,7 @@ output; report no warnings (only errors) to standard error. @cindex antialiasing levels@r{, number of} @cindex quality Set the quality to @var{num}. That is, choose the number of antialiasing -levels for bitmapped fonts (PK) and fonts rendered using T1lib, to be +levels for bitmapped fonts (PK), to be @var{num}*@var{num}+1. The default value is 4 which gives 17 levels of antialiasing for antialiased fonts from these two. If FreeType is available, its rendering is unaffected by this option. @@ -566,7 +564,7 @@ output files, and opening of any absolute filenames. Set the paper type to @var{papertype}. @c usually defined in one of the @c configuration files, along with the appropriate PostScript code to -@c select it (@pxref{Config file paper sizes}). +@c select it (@pxref{Config file paper sizes}). You can also specify a @var{papertype} of @samp{landscape}, which rotates a document by 90 degrees. To rotate a document whose paper type is not the default, you can use the @samp{-t} option twice, once for the @@ -590,23 +588,9 @@ and in addition the DVI origin, located 1in from the top and 1in from the left edge of the paper. This usually gives whitespace above and to the left in the produced image. The value @samp{tight} will make dvipng only include all ink put on the page, producing neat images. -@c (@pxref{papersize special}). +@c (@pxref{papersize special}). @c This option overrides any papersize special in the DVI file. -@item --t1lib* -@cindex T1lib font rendering -Enable T1lib font rendering (default on). This option is available if -the T1lib font library was present at compilation time. If this is the -case, dvipng will have direct support for PostScript Type1 fonts -internally, rather than using @samp{gsftopk} for rendering the fonts. If -you have PostScript versions of Computer Modern installed, there will be -no need to generate bitmapped variants on disk of these. Then, you can -render images at different (and unusual) resolutions without cluttering -the disk with lots of bitmapped fonts. Note that if you have both -FreeType and T1lib on your system, FreeType will be preferred by dvipng, -and if you for some reason rather want to use T1lib, give the option -@samp{--freetype0} (see above). - @item --truecolor* @cindex truecolor output This will make @samp{dvipng} generate truecolor output. Note that @@ -614,8 +598,8 @@ truecolor output is automatic if you include an external image in your DVI, e.g., via a PostScript special (i.e., the @samp{graphics} or @samp{graphicx} package). This switch is overridden by the @samp{--palette} switch. - -@item -v* + +@item -v* Enable verbose operation. This will currently indicate what fonts is used, in addition to the usual output. @@ -664,7 +648,7 @@ correspond directly to the zlib compression levels.'' @c man end @node Graphics -@chapter Graphics +@chapter Graphics @samp{dvipng} attempts to handle graphics as included by the @samp{graphicx} and @samp{graphics} packages, without the need of @@ -789,8 +773,8 @@ specials start with the keyword @samp{color} or the keyword @samp{background}, followed by a color specification. @menu -* Color specifications:: -* Color specials:: +* Color specifications:: +* Color specials:: @end menu @@ -804,9 +788,9 @@ by-value spec starts with the name of a color model (one of @samp{rgb}, @samp{hsb}, @samp{cmy}, @samp{cmyk}, or @samp{gray}) followed by the appropriate number of parameters. Thus, the color specification @samp{rgb 0.3 0.4 0.5} would correspond to the color that is @samp{0.3 -0.4 0.5} in its red, blue and green values. The color model used -internally in dvipng is @samp{RGB} (discretized to 256 levels), for -details on the formulas used in conversion, see the @samp{xcolor} +0.4 0.5} in its red, blue and green values. The color model used +internally in dvipng is @samp{RGB} (discretized to 256 levels), for +details on the formulas used in conversion, see the @samp{xcolor} documentation. By-name color specifications are single (case-dependent) words and are @@ -869,7 +853,7 @@ yourself in such a situation. @section Contact information Bug reports should be sent to -@email{dvipng@@nongnu.org}. +@email{dvipng@@nongnu.org}. Questions, suggestions for new features, pleas for help, and/or praise should go to @email{dvipng@@nongnu.org}. For more information on this @@ -892,14 +876,14 @@ parameter to this flag is an integer that tells what errors are currently being tracked. To track a certain class of debug messages, simply provide the appropriate number given below; if you wish to track multiple classes, sum the numbers of the classes you wish to track. To -track all classes, you can use @code{-1}. +track all classes, you can use @code{-1}. Some of these debugging options are actually provided by Kpathsea (@pxref{Debugging, , , kpathsea, Kpathsea}). The classes are: @table @asis -@item 1 +@item 1 Normal dvi op-codes @item 2 Virtual fonts @@ -918,16 +902,15 @@ Color specials @item 256 GhostScript specials @item 512 -T1lib calls -@item 1024 Kpathsea @code{stat} calls -@item 2048 +@item 1024 Kpathsea hash table lookups -@item 4096 +@item 2048 Kpathsea path element expansion -@item 8192 +@item 4096 Kpathsea path searches @ignore +@item 8192 @item 16384 @end ignore @@ -954,13 +937,6 @@ William H Wheeler, Thomas Klausner, Harald Koenig, Adrian Bunk, Kevin Smith, Jason Riedy, Wolfram Krause, Reinhard Kotucha, Takeshi Abe, and Waldeck Schutzer. -Use of the @code{gd} library requires inclusion of the following -copyright notice, which applies to the @code{gd} library: - -@quotation -@include COPYING.gd -@end quotation - @ifset man @c man begin NOTES The full manual is accessible in info format, on most systems by typing @@ -973,7 +949,7 @@ This program is released under the GNU Lesser General Public License version 3, see the COPYING file in the dvipng distribution or @url{http://www.gnu.org/licenses/gpl.html}. -Copyright @copyright{} 2002-2010 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2015 Jan-@AA{}ke Larsson @c man end @end ifset @@ -996,11 +972,10 @@ License along with this program. If not, see @sp 2 @noindent -Copyright @copyright{} 2002-2010 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2015 Jan-@AA{}ke Larsson @node Index @unnumbered Index @printindex cp @bye - diff --git a/Build/source/texk/dvipng/doc/install.texi b/Build/source/texk/dvipng/doc/install.texi index c58f9af6013..c9928a1ba7e 100644 --- a/Build/source/texk/dvipng/doc/install.texi +++ b/Build/source/texk/dvipng/doc/install.texi @@ -1,5 +1,5 @@ @c install.texi -@c +@c @c Part of the dvipng distribution @include macros.texi @@ -9,15 +9,15 @@ @end ifset @c ----------------------- Installing dvipng should be simple: merely @code{./configure}, -@code{make}, and @code{make install}. +@code{make}, and @code{make install}. @ifclear rawfile @menu -* Prerequisites:: -* Configure:: -* Build/install:: +* Prerequisites:: +* Configure:: +* Build/install:: * Installation outside the texmf tree:: -* Advice for non-privileged users:: +* Advice for non-privileged users:: @end menu @end ifclear @@ -57,15 +57,6 @@ resolutions without cluttering the disk with lots of bitmapped fonts. Finally, it will enable subfont support in dvipng. That is, if you want to render CJK-@LaTeX{} characters, you must have FreeType 2 installed. -@item The font-rendering library T1lib - -An alternative to FreeType 2 is T1lib, but this will enable only -PostScript fonts in dvipng and will not include subfont support. Also -here, you can render images at different (and unusual) resolutions -without cluttering the disk with lots of bitmapped fonts. If both -FreeType 2 and T1lib are present, FreeType will be internally -preferred by dvipng but T1lib can be chosen at runtime. - @item libpng and libz To be able to compress and write PNG files to disk, dvipng (or really @@ -74,7 +65,7 @@ any modern system, if not, download them and install them. @item The @code{texinfo} package -This is needed for building the documentation. +This is needed for building the documentation. @end itemize @node Configure @@ -150,7 +141,7 @@ Once @file{configure} has been run, simply enter make @end example -@noindent +@noindent at the prompt to compile the C code, and build the documentation files. To install the files into the locations chosen earlier, type @@ -158,7 +149,7 @@ To install the files into the locations chosen earlier, type make install @end example -@noindent +@noindent You may need special privileges to install, e.g., if you are installing into system directories. @@ -199,5 +190,5 @@ This program is released under the GNU Lesser General Public License version 3, see the COPYING file in the dvipng distribution or @url{http://www.gnu.org/licenses/}. -Copyright @copyright{} 2002-2009 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2015 Jan-@AA{}ke Larsson @end ifset diff --git a/Build/source/texk/dvipng/doc/readme.texi b/Build/source/texk/dvipng/doc/readme.texi index 378333376ae..32faa64c02b 100644 --- a/Build/source/texk/dvipng/doc/readme.texi +++ b/Build/source/texk/dvipng/doc/readme.texi @@ -12,7 +12,7 @@ @c ----------------------- This program makes PNG and/or GIF graphics from DVI files as obtained -from @TeX{} and its relatives. +from @TeX{} and its relatives. If GIF support is enabled, GIF output is chosen by using the @samp{dvigif} binary or with the @samp{--gif} option. @@ -24,7 +24,7 @@ as is possible. The target audience is people who need to generate and regenerate many images again and again. The primary target is the @previewlatex{} (X)Emacs package, a package to preview formulas from within (X)Emacs. Yes, you get to see your formulas in the (X)Emacs -buffer, see @url{http://www.gnu.org/software/auctex/preview-latex.html}. +buffer, see @url{http://www.gnu.org/software/auctex/preview-latex.html}. Another example is WeBWorK, an internet-based method for delivering homework problems to students over the internet, giving students @@ -47,28 +47,28 @@ and WYSIWYG editors like LyX. The benefits of @samp{dvipng}/@samp{dvigif} include @itemize @bullet -@item +@item Speed. It is a very fast bitmap-rendering code for DVI files, which makes it suitable for generating large amounts of images on-the-fly, as needed in @previewlatex{}, WeBWorK and others. -@item +@item It does not read the postamble, so it can be started before @TeX{} finishes. There is a @samp{--follow} switch that makes dvipng wait at end-of-file for further output, unless it finds the POST marker that indicates the end of the DVI. -@item +@item Interactive query of options. dvipng can read options interactively through stdin, and all options are usable. It is even possible to change the input file through this interface. -@item +@item Supports PK, VF, PostScript Type1, and TrueType fonts, subfonts (i.e., as used in CJK-@LaTeX{}), color specials, and inclusion of PostScript, PNG, JPEG or GIF images. -@item +@item and more... @end itemize @@ -105,7 +105,7 @@ The dvipng package is available at Savannah, the GNU project site. Since dvipng is not part of the GNU project, although released under the GNU GPL, the web address is @url{http://savannah.nongnu.org/projects/dvipng}. Instructions for -anonymous CVS access can be found at +anonymous CVS access can be found at @url{http://savannah.nongnu.org/cvs/?group=dvipng}. @section Contacts @@ -127,7 +127,7 @@ This program is released under the GNU Lesser General Public License version 3, see the COPYING file in the dvipng distribution or @url{http://www.gnu.org/licenses/}. -Copyright @copyright{} 2002-2009 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2014 Jan-@AA{}ke Larsson @section Todo @@ -139,18 +139,15 @@ Use gs interpreter library for speed and possibly for functionality. Add more color models for xcolor compatibility @item -Fix T1lib and PK rendering so it is on par with Freetype. - -@item Enable a named pipe as DVI -@item +@item Further speed improvements. -@item +@item Other output specials and source specials. -@item +@item Clean internal structures. Overhaul file handling. @item diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-01-gd-copyright b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-01-gd-copyright deleted file mode 100644 index 53e8509ad16..00000000000 --- a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-01-gd-copyright +++ /dev/null @@ -1,19 +0,0 @@ - Add libgd-2.1.0/COPYING as COPYING.gd, replacing '@' => '@@'. - -diff -ur -x COPYING.gd dvipng-1.14.orig/dvipng.texi dvipng-1.14/dvipng.texi ---- dvipng-1.14.orig/dvipng.texi 2010-12-06 21:07:18.000000000 +0100 -+++ dvipng-1.14/dvipng.texi 2013-07-09 10:01:11.000000000 +0200 -@@ -954,6 +954,13 @@ - Smith, Jason Riedy, Wolfram Krause, Reinhard Kotucha, Takeshi Abe, and - Waldeck Schutzer. - -+Use of the @code{gd} library requires inclusion of the following -+copyright notice, which applies to the @code{gd} library: -+ -+@quotation -+@include COPYING.gd -+@end quotation -+ - @ifset man - @c man begin NOTES - The full manual is accessible in info format, on most systems by typing diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-05-sys_wait b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-05-sys_wait deleted file mode 100644 index 39de7d508e2..00000000000 --- a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-05-sys_wait +++ /dev/null @@ -1,17 +0,0 @@ - Posix requires to include <sys/wait.h>, not <wait.h>. - FreeBSD has no <wait.h>. - - From Nikola Lecic <nikola.lecic@anthesphoria.net>. - -diff -ur dvipng-1.14.orig/special.c dvipng-1.14/special.c ---- dvipng-1.14.orig/special.c 2010-12-15 16:01:07.000000000 +0100 -+++ dvipng-1.14/special.c 2011-02-07 11:47:08.000000000 +0100 -@@ -26,7 +26,7 @@ - - #ifndef MIKTEX - #ifndef WIN32 --#include <wait.h> -+#include <sys/wait.h> - #else /* WIN32 */ - #include <fcntl.h> - #include <io.h> diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-07-w64-ptr b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-07-w64-ptr deleted file mode 100644 index 59c74420322..00000000000 --- a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-07-w64-ptr +++ /dev/null @@ -1,79 +0,0 @@ -diff -ur -x COPYING.gd dvipng-1.14.orig/pk.c dvipng-1.14/pk.c ---- dvipng-1.14.orig/pk.c 2010-02-11 15:09:10.000000000 +0100 -+++ dvipng-1.14/pk.c 2014-11-05 12:13:12.000000000 +0100 -@@ -345,8 +345,13 @@ - /* Read char definitions */ - position = skip_specials(position); - while (*position != PK_POST) { -+#ifdef _WIN64 -+ DEBUG_PRINT(DEBUG_PK,("\n @%I64d PK CHAR:\t%d", -+ (__int64)position - (__int64)tfontp->fmmap.data, *position)); -+#else - DEBUG_PRINT(DEBUG_PK,("\n @%ld PK CHAR:\t%d", - (long)position - (long)tfontp->fmmap.data, *position)); -+#endif - if ((tcharptr = malloc(sizeof(struct char_entry))) == NULL) - Fatal("cannot malloc space for char_entry"); - tcharptr->flag_byte = *position; -diff -ur -x COPYING.gd dvipng-1.14.orig/special.c dvipng-1.14/special.c ---- dvipng-1.14.orig/special.c 2012-08-25 21:36:09.000000000 +0200 -+++ dvipng-1.14/special.c 2014-07-14 17:29:34.000000000 +0200 -@@ -214,7 +214,7 @@ - savestdout = _dup(fileno(stdout)); - _dup2(pngpipe[WRITE_END], fileno(stdout)); - if ((hchild= -- (HANDLE)spawnlp(_P_NOWAIT, GS_PATH, GS_PATH, device, resolution, -+ (HANDLE)_spawnlp(_P_NOWAIT, GS_PATH, GS_PATH, device, resolution, - "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", - "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - (option_flags & NO_GSSAFER) ? "-": "-dSAFER", -diff -ur -x COPYING.gd dvipng-1.14.orig/tfm.c dvipng-1.14/tfm.c ---- dvipng-1.14.orig/tfm.c 2009-03-26 23:14:01.000000000 +0100 -+++ dvipng-1.14/tfm.c 2014-07-14 20:02:32.000000000 +0200 -@@ -54,8 +54,13 @@ - c=bc; - position=(unsigned char*)fmmap.data+24+lh*4; - while(c <= ec) { -+#ifdef _WIN64 -+ DEBUG_PRINT(DEBUG_TFM,("\n@%I64d TFM METRICS:\t", -+ (__int64)position - (__int64)fmmap.data)); -+#else - DEBUG_PRINT(DEBUG_TFM,("\n@%ld TFM METRICS:\t", - (long)position - (long)fmmap.data)); -+#endif - tcharptr=xmalloc(sizeof(struct char_entry)); - tcharptr->data=NULL; - tcharptr->tfmw=width[*position]; -diff -ur -x COPYING.gd dvipng-1.14.orig/vf.c dvipng-1.14/vf.c ---- dvipng-1.14.orig/vf.c 2010-03-17 14:02:35.000000000 +0100 -+++ dvipng-1.14/vf.c 2014-07-14 20:02:33.000000000 +0200 -@@ -79,9 +79,15 @@ - /* Read font definitions */ - position += 8; - while(*position >= FNT_DEF1 && *position <= FNT_DEF4) { -+#ifdef _WIN64 -+ DEBUG_PRINT(DEBUG_VF,("\n @%I64d VF:\t%s", -+ (__int64)position - (__int64)tfontp->fmmap.data, -+ dvi_commands[*position])); -+#else - DEBUG_PRINT(DEBUG_VF,("\n @%ld VF:\t%s", - (long)position - (long)tfontp->fmmap.data, - dvi_commands[*position])); -+#endif - FontDef(position,tfontp); - length = dvi_commandlength[*position]; - position += length + *(position + length-1) + *(position+length-2); -@@ -95,8 +101,13 @@ - - /* Read char definitions */ - while(*position < FNT_DEF1) { -+#ifdef _WIN64 -+ DEBUG_PRINT(DEBUG_VF,("\n@%I64d VF CHAR:\t", -+ (__int64)position - (__int64)tfontp->fmmap.data)); -+#else - DEBUG_PRINT(DEBUG_VF,("\n@%ld VF CHAR:\t", - (long)position - (long)tfontp->fmmap.data)); -+#endif - tcharptr=xmalloc(sizeof(struct char_entry)); - switch (*position) { - case LONG_CHAR: diff --git a/Build/source/texk/dvipng/dvipng-1.14/COPYING.gd b/Build/source/texk/dvipng/dvipng-1.14/COPYING.gd deleted file mode 100644 index 4a91420256e..00000000000 --- a/Build/source/texk/dvipng/dvipng-1.14/COPYING.gd +++ /dev/null @@ -1,53 +0,0 @@ - - Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002 by Cold Spring Harbor Laboratory. Funded under Grant - P41-RR02188 by the National Institutes of Health. - - Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 by - Boutell.Com, Inc. - - Portions relating to GD2 format copyright 1999, 2000, 2001, 2002 - Philip Warner. - - Portions relating to PNG copyright 1999, 2000, 2001, 2002 Greg - Roelofs. - - Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002 John - Ellson (ellson@@lucent.com). - - Portions relating to gdft.c copyright 2001, 2002 John Ellson - (ellson@@lucent.com). - - Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 - Pierre-Alain Joye (pierre@@libgd.org). - - Portions relating to JPEG and to color quantization copyright 2000, - 2001, 2002, Doug Becker and copyright (C) 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001, 2002, Thomas G. Lane. This software is - based in part on the work of the Independent JPEG Group. See the - file README-JPEG.TXT for more information. - - Portions relating to WBMP copyright 2000, 2001, 2002 Maurice - Szmurlo and Johan Van den Brande. - - Permission has been granted to copy, distribute and modify gd in - any context without fee, including a commercial application, - provided that this notice is present in user-accessible supporting - documentation. - - This does not affect your ownership of the derived work itself, and - the intent is to assure proper credit for the authors of gd, not to - interfere with your productive use of gd. If you have questions, - ask. "Derived works" includes all programs that utilize the - library. Credit must be given in user-accessible documentation. - - This software is provided "AS IS." The copyright holders disclaim - all warranties, either express or implied, including but not - limited to implied warranties of merchantability and fitness for a - particular purpose, with respect to this code and accompanying - documentation. - - Although their code does not appear in gd, the authors wish to thank - David Koblas, David Rowley, and Hutchison Avenue Software Corporation - for their prior contributions. - diff --git a/Build/source/texk/dvipng/dvipng-1.14/INSTALL b/Build/source/texk/dvipng/dvipng-1.14/INSTALL deleted file mode 100644 index bef302aebd8..00000000000 --- a/Build/source/texk/dvipng/dvipng-1.14/INSTALL +++ /dev/null @@ -1,168 +0,0 @@ -Installing dvipng -***************** - -Installing dvipng should be simple: merely `./configure', `make', and -`make install'. - -Prerequisites -============= - - * The GD Graphics Draw library, libgd - - The drawing library `libgd' is necessary, and is downloadable at - `http://www.boutell.com/gd', and there are binary packages for - most operating systems from their respective distributors. In any - case, the latest version of the library installs using `autoconf' - so it should not be difficult for you to install it from source, - and then proceed with installing dvipng. - - * The path-searching library kpathsea - - Kpathsea is most likely included in your LaTeX installation, but it - may happen that ./configure does not find it; see below. If you do - not have it, download it from `http://www.ctan.org' and compile it. - I have no experience with this, so I cannot help much here. - - * The font-rendering library FreeType 2 - - While not strictly necessary, a recent FreeType 2 is recommended - since dvipng currently will produce better-quality images when - this library is available. To take advantage of this, you should - have at least FreeType 2.1.9. - - FreeType 2 will enable direct support for PostScript and TrueType - fonts, so that dvipng will not need to generate bitmapped variants - on disk of the TeX fonts since modern TeX distributions include - PostScript versions of them. Then, you can render images at - different (and unusual) resolutions without cluttering the disk - with lots of bitmapped fonts. - - Finally, it will enable subfont support in dvipng. That is, if you - want to render CJK-LaTeX characters, you must have FreeType 2 - installed. - - * The font-rendering library T1lib - - An alternative to FreeType 2 is T1lib, but this will enable only - PostScript fonts in dvipng and will not include subfont support. - Also here, you can render images at different (and unusual) - resolutions without cluttering the disk with lots of bitmapped - fonts. If both FreeType 2 and T1lib are present, FreeType will be - internally preferred by dvipng but T1lib can be chosen at runtime. - - * libpng and libz - - To be able to compress and write PNG files to disk, dvipng (or - really libgd) uses libpng which in turn uses libz. These should be - available on any modern system, if not, download them and install - them. - - * The `texinfo' package - - This is needed for building the documentation. - -Configure -========= - -The first step is to configure the source code, telling it where -various files will be. To do so, run - - ./configure OPTIONS - - (Note: if you have fetched dvipng from CVS rather than a regular -release, you will have to first generate `./configure' by running -`autoconf' 2.53 or later.) - - On many machines, you will not need to specify any options, but if -`configure' cannot determine something on its own, you'll need to help -it out. For a list of the options type - - ./configure --help - - On some machines, the libraries will be installed in directories that -are not in the linker's search path. This will generate an error when -running `./configure', indicating that it cannot find libgd or -libkpathsea (most likely). You then need to specify the path to the -respective library's object files. They are typically called e.g., -`libgd.a' or `libgd.so'. If they are located in e.g., `/sw/local/lib', -do - - ./configure LDFLAGS=-L/sw/local/lib - - If the library is available as a shared object file (`.so'), the -runtime linker may also need to be told where to find the library, then -use - - ./configure LDFLAGS='-L/sw/local/lib -R/sw/local/lib' - - When either of these is necessary, it is likely that the C header -files are also installed in directories that are not in the C -preprocessor's search path. This will also generate an error when -running `./configure', indicating that it cannot find e.g., `gd.h' or -`kpathsea.h' (most likely). You then need to specify the path to the -respective library's C header files. If they are located in e.g., -`/sw/local/include', do - - ./configure CPPFLAGS=-I/sw/local/include - - On my SUN Solaris workstation, I had to combine this into - - ./configure CPPFLAGS='-I/sw/local/include -I/sw/tex/teTeX/1.0/include'\ - LDFLAGS='-L/sw/local/lib -R/sw/local/lib -L/sw/tex/teTeX/1.0/lib/' - -where the backslash denotes a continuation of the line. - -Build/install -============= - -Once `configure' has been run, simply enter - - make - -at the prompt to compile the C code, and build the documentation files. -To install the files into the locations chosen earlier, type - - make install - -You may need special privileges to install, e.g., if you are installing -into system directories. - -Installation outside the texmf tree -=================================== - -In some cases, a dvipng binary installed outside the texmf tree will -not be able to find virtual fonts, or the PostScript font maps -(normally used by dvips). This may be because _only_ $SELFAUTOLOC, -$SELFAUTODIR, and $SELFAUTOPARENT are used in the texmf tree -configuration file `texmf.cnf'. If so, give the switch -`--enable-selfauto-set' to `./configure'. This will make dvipng adjust -these three internally so that kpathsea thinks that dvipng _is_ -installed in the texmf tree. - -Installation for non-privileged users -===================================== - -Often people without system administration privileges want to install -software for their private use. In that case you need to specify more -options to the `configure' script, usually this is done by using the -`--prefix' option to the `configure' script, and let it point to the -personal home directory. In that way, resulting binaries will be -installed under the `bin' subdirectory of your home directory, manual -pages under `man' and so on. That way, it is reasonably easy to -maintain a bunch of additional packages, since the prefix argument is -supported by most `configure' scripts. - - You'll have to add something like `/home/myself/bin' to your `PATH' -shell variable, if it isn't there already, and similarly set the -`INFOPATH' and `MANPATH' variables to be able to access the -documentation. - -Copying -======= - -This program is released under the GNU Lesser General Public License -version 3, see the COPYING file in the dvipng distribution or -`http://www.gnu.org/licenses/'. - - Copyright (C) 2002-2009 Jan-AAke Larsson - diff --git a/Build/source/texk/dvipng/dvipng-1.14/RELEASE b/Build/source/texk/dvipng/dvipng-1.14/RELEASE deleted file mode 100644 index 60f81395aff..00000000000 --- a/Build/source/texk/dvipng/dvipng-1.14/RELEASE +++ /dev/null @@ -1,15 +0,0 @@ -Release notes for version 1.14 of the dvipng package: - -This program makes PNG graphics from DVI files as obtained from TeX -and its relatives. - - -This release changes raw PostScript processing to avoid the -non-rendering PostScript specials created by hyperref. A command-line -switch to turn off raw PostScript rendering has been added. Finally, a -few bugs has been fixed, such as correct decoding of the -T switch, a -CRLF bug when reading configuration files in Windows, and a few bugs -associated to subprocesses. - - -Report any bugs you find, see README for instructions. diff --git a/Build/source/texk/dvipng/dvipng-1.14/t1.c b/Build/source/texk/dvipng/dvipng-1.14/t1.c deleted file mode 100644 index 4a74a8274f4..00000000000 --- a/Build/source/texk/dvipng/dvipng-1.14/t1.c +++ /dev/null @@ -1,192 +0,0 @@ -/* t1.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/>. - - Copyright (C) 2002-2009 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" - -void LoadT1(int32_t c, struct char_entry * ptr) -{ - GLYPH *glyph; - int original_width,original_height; - int i,j,k,width,height; - unsigned short shrunk_width,shrunk_height; - short xoffset,yoffset; - unsigned short i_offset,j_offset; - - DEBUG_PRINT(DEBUG_T1,("\n LOAD T1 CHAR\t%d",c)); - if ((glyph= - T1_SetChar(currentfont->T1id, c, - (float)currentfont->dpi*currentfont->d/65536/72.27, - currentfont->psfontmap==NULL ? NULL : currentfont->psfontmap->t1_transformp)) - ==NULL) - Fatal("cannot load T1 char %d",c); - - DEBUG_PRINT(DEBUG_T1,(" (%d)",ptr->tfmw)); - - original_width = glyph->metrics.rightSideBearing - - glyph->metrics.leftSideBearing; - original_height = glyph->metrics.ascent - glyph->metrics.descent; - DEBUG_PRINT(DEBUG_T1,(" %dx%d",original_width,original_height)); - - if (original_width > 0x7fff || original_height > 0x7fff) - Fatal("character %d too large in file %s", c, currentfont->name); - - /* - * Hotspot issues: Shrinking to the topleft corner rather than the - hotspot will displace glyphs a fraction of a pixel. We deal with - this in as follows: The glyph is shrunk to its hotspot by - offsetting the bitmap somewhat to put the hotspot in the lower - left corner of a "shrink square". Shrinking to the topleft corner - will then act as shrinking to the hotspot. This may enlarge the - bitmap somewhat, of course. (Also remember that the below - calculation of i/j_offset is in integer arithmetics.) - - There will still be a displacement from rounding the dvi - position, but vertically it will be equal for all glyphs on a - line, so we displace a whole line vertically by fractions of a - pixel. This is acceptible, IMHO. Sometime there will be support - for subpixel positioning, horizontally. Will do for now, I - suppose. - */ - xoffset = -glyph->metrics.leftSideBearing; - /* printf("xoffset: %d\n",xoffset); */ - i_offset = ( shrinkfactor - xoffset % shrinkfactor ) % shrinkfactor; - width = original_width+i_offset; - ptr->xOffset = xoffset+i_offset; - - yoffset = glyph->metrics.ascent-1; - /* printf("yoffset: %d\n",yoffset); */ - j_offset = ( shrinkfactor - (yoffset-(shrinkfactor-1)) % shrinkfactor ) - % shrinkfactor; - height = original_height+j_offset; - ptr->yOffset = yoffset+j_offset; - - DEBUG_PRINT(DEBUG_T1,(" (%dx%d)",width,height)); - /* - Extra marginal so that we do not crop the image when shrinking. - */ - shrunk_width = (width + shrinkfactor - 1) / shrinkfactor; - shrunk_height = (height + shrinkfactor - 1) / shrinkfactor; - ptr->w = shrunk_width; - ptr->h = shrunk_height; - - /* printf("(%d,%d) ",ptr->w,ptr->h); */ - DEBUG_PRINT(DEBUG_GLYPH,("\nDRAW GLYPH %d\n", (int)c)); - - /* - Shrink raster while doing antialiasing. - */ - if ((ptr->data = calloc(shrunk_width*shrunk_height,sizeof(char))) == NULL) - Fatal("unable to malloc image space for char %c", (char)c); - for (j = 0; j < original_height; j++) { - for (i = 0; i < (original_width+7)/8 ; i++) { - for (k = 0; k < 8 ; k++) { - DEBUG_PRINT(DEBUG_GLYPH, - ("%c", - (glyph->bits[i+j*((original_width+7)/8)] & (1<<k)) ? - 'x' : ' ')); - ptr->data[(i*8+k+i_offset)/shrinkfactor - +(j+j_offset)/shrinkfactor*shrunk_width] += - (glyph->bits[i+j*((original_width+7)/8)] & (1<<k) ? 1 : 0); - } - } - DEBUG_PRINT(DEBUG_GLYPH,("|\n")); - } - for (j = 0; j < shrunk_height; j++) { - for (i = 0; i < shrunk_width; i++) { - ptr->data[i+j*shrunk_width] = ptr->data[i+j*shrunk_width] - *255/shrinkfactor/shrinkfactor; - DEBUG_PRINT(DEBUG_GLYPH,("%3u ",ptr->data[i+j*shrunk_width])); - } - DEBUG_PRINT(DEBUG_GLYPH,("|\n")); - } -} - -bool InitT1(struct font_entry * tfontp) -{ - if (libt1==NULL) { - if ((libt1=T1_InitLib( NO_LOGFILE | IGNORE_CONFIGFILE - | IGNORE_FONTDATABASE | T1_NO_AFM)) == NULL) { - Warning("an error occured during t1lib initialisation, disabling it"); - option_flags &= ~USE_LIBT1; - return(false); - } -# ifdef DEBUG - else - DEBUG_PRINT(DEBUG_T1,("\n T1LIB VERSION: %s", T1_GetLibIdent())); -# endif - } - - DEBUG_PRINT((DEBUG_DVI|DEBUG_T1),("\n OPEN T1 FONT:\t'%s'", tfontp->name)); - tfontp->T1id = T1_AddFont( tfontp->name ); - if (tfontp->T1id < 0) { - Warning("t1lib could not open font file %s", tfontp->name); - return(false); - } - if (T1_LoadFont(tfontp->T1id)) { - Warning("t1lib could not load font file %s", tfontp->name); - return(false); - } - Message(BE_VERBOSE,"<%s>", tfontp->name); - if (tfontp->psfontmap!=NULL && tfontp->psfontmap->encoding != NULL) { - DEBUG_PRINT(DEBUG_T1,("\n USE ENCODING:\t'%s'", tfontp->psfontmap->encoding->name)); - if (T1_ReencodeFont(tfontp->T1id,tfontp->psfontmap->encoding->charname)) { - Warning("unable to use font encoding '%s' for %s", - tfontp->psfontmap->encoding->name,tfontp->name); - return(false); - } - } - tfontp->type = FONT_TYPE_T1; - return(true); -} - - -static void UnLoadT1(struct char_entry *ptr) -{ - if (ptr->data!=NULL) - free(ptr->data); - ptr->data=NULL; -} - - -void DoneT1(struct font_entry *tfontp) -{ - int c=0; - - int error = T1_DeleteFont( tfontp->T1id ); - if (error) - Warning("font file %s could not be closed", tfontp->name); - while(c<NFNTCHARS) { - if (tfontp->chr[c]!=NULL) { - UnLoadT1((struct char_entry*)tfontp->chr[c]); - free(tfontp->chr[c]); - tfontp->chr[c]=NULL; - } - c++; - } - if (tfontp->name!=NULL) - free(tfontp->name); - tfontp->name=NULL; -} - - diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/ChangeLog b/Build/source/texk/dvipng/dvipng-1.15-PATCHES/ChangeLog index 77dd844fe5c..1765ed9d1c5 100644 --- a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/ChangeLog +++ b/Build/source/texk/dvipng/dvipng-1.15-PATCHES/ChangeLog @@ -1,3 +1,11 @@ +2015-03-03 Peter Breitenlohner <peb@mppmu.mpg.de> + + * Imported release 1.15 from savannah.nongnu.org. + * patch-01-gd-copyright: Removed. + * patch-05-sys_wait (removed): Included in 1.15. + * patch-02-const, patch-03-programname, patch-06-WIN32, + patch-07-w64-ptr: Adapted. + 2014-11-05 Peter Breitenlohner <peb@mppmu.mpg.de> * patch-07-w64-ptr: Fixed a typo. diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/TL-Changes b/Build/source/texk/dvipng/dvipng-1.15-PATCHES/TL-Changes index d082d0662f5..15cd6bb63db 100644 --- a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/TL-Changes +++ b/Build/source/texk/dvipng/dvipng-1.15-PATCHES/TL-Changes @@ -1,18 +1,16 @@ -Changes applied to the dvipng-1.14 tree as obtained from: +Changes applied to the dvipng-1.15 tree as obtained from: http://savannah.nongnu.org/files/?group=dvipng Removed: configure + config.h install-sh mkinstalldirs -Added libgd-2.1.0/COPYING as COPYING.gd, replacing '@' => '@@'. - Created Autoconf macro files ../m4/gs-device.m4 and ../m4/makeinfo.m4 adapting code in aclocal.m4. Copied these files to ../doc/: - COPYING.gd dvipng.texi install.texi macros.texi diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-02-const b/Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-02-const index ef9dcd0200f..f10faef62e4 100644 --- a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-02-const +++ b/Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-02-const @@ -1,6 +1,6 @@ -diff -ur dvipng-1.14.orig/special.c dvipng-1.14/special.c ---- dvipng-1.14.orig/special.c 2010-12-06 11:14:22.000000000 +0100 -+++ dvipng-1.14/special.c 2010-12-15 16:01:07.000000000 +0100 +diff -ur dvipng-1.15.orig/special.c dvipng-1.15/special.c +--- dvipng-1.15.orig/special.c 2015-03-02 20:33:55.000000000 +0100 ++++ dvipng-1.15/special.c 2015-03-03 12:51:18.000000000 +0100 @@ -44,9 +44,9 @@ struct pscode { struct pscode* next; diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-03-programname b/Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-03-programname index 2a1d4467340..e106c3a0789 100644 --- a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-03-programname +++ b/Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-03-programname @@ -1,6 +1,6 @@ -diff -ur -x COPYING.gd dvipng-1.14.orig/misc.c dvipng-1.14/misc.c ---- dvipng-1.14.orig/misc.c 2010-09-30 12:13:40.000000000 +0200 -+++ dvipng-1.14/misc.c 2013-07-09 11:49:56.600160931 +0200 +diff -ur dvipng-1.15.orig/misc.c dvipng-1.15/misc.c +--- dvipng-1.15.orig/misc.c 2015-03-02 20:33:56.000000000 +0100 ++++ dvipng-1.15/misc.c 2015-03-03 13:35:10.000000000 +0100 @@ -47,24 +47,43 @@ int32_t number; /* Temporary storage for numeric parameter */ char *dviname=NULL; /* Name of dvi file */ @@ -49,13 +49,13 @@ diff -ur -x COPYING.gd dvipng-1.14.orig/misc.c dvipng-1.14/misc.c - Message(BE_NONQUIET,"This is %s",programname); - if (strcmp(basename(programname),PACKAGE_NAME)!=0) - Message(BE_NONQUIET," (%s)", PACKAGE_NAME); -- Message(BE_NONQUIET," %s Copyright 2002-2010 Jan-Ake Larsson\n", +- Message(BE_NONQUIET," %s Copyright 2002-2015 Jan-Ake Larsson\n", - PACKAGE_VERSION); - } + Message(BE_NONQUIET,"This is %s",programname); + if (strcmp(base,PACKAGE_NAME)!=0) + Message(BE_NONQUIET," (%s)", PACKAGE_NAME); -+ Message(BE_NONQUIET," %s Copyright 2002-2010 Jan-Ake Larsson\n", ++ Message(BE_NONQUIET," %s Copyright 2002-2015 Jan-Ake Larsson\n", + PACKAGE_VERSION); for (i=1; i<argc; i++) { diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-06-WIN32 b/Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-06-WIN32 index 0107043ab5c..252b15abee5 100644 --- a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-06-WIN32 +++ b/Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-06-WIN32 @@ -1,6 +1,6 @@ -diff -ur dvipng-1.14.orig/dvipng.c dvipng-1.14/dvipng.c ---- dvipng-1.14.orig/dvipng.c 2008-02-08 14:45:25.000000000 +0100 -+++ dvipng-1.14/dvipng.c 2011-08-03 13:34:44.000000000 +0200 +diff -ur dvipng-1.15.orig/dvipng.c dvipng-1.15/dvipng.c +--- dvipng-1.15.orig/dvipng.c 2015-03-02 20:33:56.000000000 +0100 ++++ dvipng-1.15/dvipng.c 2015-03-03 13:04:09.000000000 +0100 @@ -79,6 +79,10 @@ kpse_set_program_enabled (kpse_pk_format, makeTexPK, kpse_src_compile); #endif @@ -12,9 +12,9 @@ diff -ur dvipng-1.14.orig/dvipng.c dvipng-1.14/dvipng.c initcolor(); parsestdin = DecodeArgs(argc, argv); -diff -ur dvipng-1.14.orig/special.c dvipng-1.14/special.c ---- dvipng-1.14.orig/special.c 2011-02-07 11:47:08.000000000 +0100 -+++ dvipng-1.14/special.c 2012-08-25 21:36:09.000000000 +0200 +diff -ur -x COPYING.gd dvipng-1.15.orig/special.c dvipng-1.15/special.c +--- dvipng-1.15.orig/special.c 2015-03-03 12:51:18.000000000 +0100 ++++ dvipng-1.15/special.c 2015-03-03 13:04:09.000000000 +0100 @@ -28,11 +28,8 @@ #ifndef WIN32 #include <sys/wait.h> diff --git a/Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-07-w64-ptr b/Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-07-w64-ptr new file mode 100644 index 00000000000..186df2638a8 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.15-PATCHES/patch-07-w64-ptr @@ -0,0 +1,79 @@ +diff -ur dvipng-1.15.orig/pk.c dvipng-1.15/pk.c +--- dvipng-1.15.orig/pk.c 2015-03-02 20:33:56.000000000 +0100 ++++ dvipng-1.15/pk.c 2015-03-03 13:09:32.000000000 +0100 +@@ -346,8 +346,13 @@ + /* Read char definitions */ + position = skip_specials(position); + while (*position != PK_POST) { ++#ifdef _WIN64 ++ DEBUG_PRINT(DEBUG_PK,("\n @%I64d PK CHAR:\t%d", ++ (__int64)position - (__int64)tfontp->fmmap.data, *position)); ++#else + DEBUG_PRINT(DEBUG_PK,("\n @%ld PK CHAR:\t%d", + (long)position - (long)tfontp->fmmap.data, *position)); ++#endif + if ((tcharptr = malloc(sizeof(struct char_entry))) == NULL) + Fatal("cannot allocate space for char_entry"); + tcharptr->flag_byte = *position; +diff -ur dvipng-1.15.orig/special.c dvipng-1.15/special.c +--- dvipng-1.15.orig/special.c 2015-03-03 13:04:09.000000000 +0100 ++++ dvipng-1.15/special.c 2015-03-03 13:11:16.000000000 +0100 +@@ -214,7 +214,7 @@ + savestdout = _dup(fileno(stdout)); + _dup2(pngpipe[WRITE_END], fileno(stdout)); + if ((hchild= +- (HANDLE)spawnlp(_P_NOWAIT, GS_PATH, GS_PATH, device, resolution, ++ (HANDLE)_spawnlp(_P_NOWAIT, GS_PATH, GS_PATH, device, resolution, + "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", + "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", + (option_flags & NO_GSSAFER) ? "-": "-dSAFER", +diff -ur dvipng-1.15.orig/tfm.c dvipng-1.15/tfm.c +--- dvipng-1.15.orig/tfm.c 2015-03-02 20:33:56.000000000 +0100 ++++ dvipng-1.15/tfm.c 2015-03-03 13:29:02.000000000 +0100 +@@ -55,8 +55,13 @@ + c=bc; + position=(unsigned char*)fmmap.data+24+lh*4; + while(c <= ec) { ++#ifdef _WIN64 ++ DEBUG_PRINT(DEBUG_TFM,("\n@%I64d TFM METRICS:\t", ++ (__int64)position - (__int64)fmmap.data)); ++#else + DEBUG_PRINT(DEBUG_TFM,("\n@%ld TFM METRICS:\t", + (long)position - (long)fmmap.data)); ++#endif + if ((tcharptr=malloc(sizeof(struct char_entry)))==NULL) + Fatal("cannot allocate memory for TFM char entry"); + tcharptr->data=NULL; +diff -ur dvipng-1.15.orig/vf.c dvipng-1.15/vf.c +--- dvipng-1.15.orig/vf.c 2015-03-02 20:33:56.000000000 +0100 ++++ dvipng-1.15/vf.c 2015-03-03 13:28:26.000000000 +0100 +@@ -79,9 +79,15 @@ + /* Read font definitions */ + position += 8; + while(*position >= FNT_DEF1 && *position <= FNT_DEF4) { ++#ifdef _WIN64 ++ DEBUG_PRINT(DEBUG_VF,("\n @%I64d VF:\t%s", ++ (__int64)position - (__int64)tfontp->fmmap.data, ++ dvi_commands[*position])); ++#else + DEBUG_PRINT(DEBUG_VF,("\n @%ld VF:\t%s", + (long)position - (long)tfontp->fmmap.data, + dvi_commands[*position])); ++#endif + FontDef(position,tfontp); + length = dvi_commandlength[*position]; + position += length + *(position + length-1) + *(position+length-2); +@@ -94,8 +100,13 @@ + tfontp->defaultfont=tfontnump->k; + /* Read char definitions */ + while(*position < FNT_DEF1) { ++#ifdef _WIN64 ++ DEBUG_PRINT(DEBUG_VF,("\n@%I64d VF CHAR:\t", ++ (__int64)position - (__int64)tfontp->fmmap.data)); ++#else + DEBUG_PRINT(DEBUG_VF,("\n@%ld VF CHAR:\t", + (long)position - (long)tfontp->fmmap.data)); ++#endif + if ((tcharptr=malloc(sizeof(struct char_entry)))==NULL) + Fatal("cannot allocate memory for VF char entry"); + switch (*position) { diff --git a/Build/source/texk/dvipng/dvipng-1.14/COPYING b/Build/source/texk/dvipng/dvipng-1.15/COPYING index 94a9ed024d3..94a9ed024d3 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/COPYING +++ b/Build/source/texk/dvipng/dvipng-1.15/COPYING diff --git a/Build/source/texk/dvipng/dvipng-1.14/COPYING.LESSER b/Build/source/texk/dvipng/dvipng-1.15/COPYING.LESSER index fc8a5de7edf..fc8a5de7edf 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/COPYING.LESSER +++ b/Build/source/texk/dvipng/dvipng-1.15/COPYING.LESSER diff --git a/Build/source/texk/dvipng/dvipng-1.15/COPYING.gd b/Build/source/texk/dvipng/dvipng-1.15/COPYING.gd new file mode 100644 index 00000000000..db6a326580c --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.15/COPYING.gd @@ -0,0 +1,54 @@ +The below is the copyright notice of the gd library. +---------------------------------------------------- + +Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002 by Cold Spring Harbor Laboratory. Funded under Grant P41-RR02188 +by the National Institutes of Health. + +Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 by +Boutell.Com, Inc. + +Portions relating to GD2 format copyright 1999, 2000, 2001, 2002 +Philip Warner. + +Portions relating to PNG copyright 1999, 2000, 2001, 2002 Greg +Roelofs. + +Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002 John +Ellson (ellson@lucent.com). + +Portions relating to gdft.c copyright 2001, 2002 John Ellson +(ellson@lucent.com). + +Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +Pierre-Alain Joye (pierre@libgd.org). + +Portions relating to JPEG and to color quantization copyright 2000, +2001, 2002, Doug Becker and copyright (C) 1994, 1995, 1996, 1997, +1998, 1999, 2000, 2001, 2002, Thomas G. Lane. This software is +based in part on the work of the Independent JPEG Group. See the +file README-JPEG.TXT for more information. + +Portions relating to WBMP copyright 2000, 2001, 2002 Maurice +Szmurlo and Johan Van den Brande. + +Permission has been granted to copy, distribute and modify gd in +any context without fee, including a commercial application, +provided that this notice is present in user-accessible supporting +documentation. + +This does not affect your ownership of the derived work itself, and +the intent is to assure proper credit for the authors of gd, not to +interfere with your productive use of gd. If you have questions, +ask. "Derived works" includes all programs that utilize the +library. Credit must be given in user-accessible documentation. + +This software is provided "AS IS." The copyright holders disclaim +all warranties, either express or implied, including but not +limited to implied warranties of merchantability and fitness for a +particular purpose, with respect to this code and accompanying +documentation. + +Although their code does not appear in gd, the authors wish to thank +David Koblas, David Rowley, and Hutchison Avenue Software Corporation +for their prior contributions. diff --git a/Build/source/texk/dvipng/dvipng-1.14/ChangeLog b/Build/source/texk/dvipng/dvipng-1.15/ChangeLog index e21a07c761c..6fb7cd99a5e 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/ChangeLog +++ b/Build/source/texk/dvipng/dvipng-1.15/ChangeLog @@ -1,3 +1,46 @@ +2015-03-01 Jan-Åke Larsson <jan-ake.larsson@liu.se> + + * RELEASE: Release 1.15 + + * color.c, config.h.in, configure.ac, dvi.c, dvipng.h, misc.c, + pk.c, set.c, sfd.c, tfm.c, vf.c: Remove references to kpathsea + xmalloc, and enable non-GNU malloc + + * dvi.c: Fix long sleep interval in --follow + + * INSTALL, Makefile.in, README, config.h.in, configure.ac, draw.c, + dvipng.1, dvipng.c, dvipng.h, dvipng.texi, font.c, fontmap.c, + install.texi, miktex.h, misc.c, readme.texi, t1.c: Remove support + for the now dead libt1 + + * special.c: Use <sys/wait.h> + + * color.c: Fix segfault at missing xcolor.sty + + * set.c: Added check for out of memory in libgd allocate + +2012-09-15 Jan-Åke Larsson <jan-ake.larsson@liu.se> + + * ft.c: Add warning for missing target_light hinting + +2012-09-15 Jan-Åke Larsson <jan-ake.larsson@liu.se> + + * dvipng.c: Use return value of fgets better + +2010-12-17 Jan-Åke Larsson <jan-ake.larsson@liu.se> + + * COPYING.gd: Inclusion of the gd copyright notice + +2010-12-14 Jan-Åke Larsson <jan-ake.larsson@liu.se> + + * RELEASE: Spell correctly + +2010-12-06 Jan-Åke Larsson <jan-ake.larsson@liu.se> + + * special.c: Warn when --norawps hinders output + * dvipng.texi: Document usage of a fallback + * Makefile.in: Add www directory + 2010-10-23 Jan-Åke Larsson <jan-ake.larsson@liu.se> * dvipng.1, RELEASE: Prepare for 1.14 @@ -227,13 +270,13 @@ * Makefile.in, INSTALL, README, color.c, commands.h, configure.ac, * draw.c, dvi.c, dvipng.1, dvipng.c, dvipng.h, dvipng.texi, enc.c, - * font.c, fontmap.c, ft.c, install.texi, macros.texi, miktex.h, + * font.c, fontmap.c, ft.c, install.texi, macros.texi, miktex.h, * misc.c, papersiz.c, pk.c, ppagelist.c, readme.texi, set.c, sfd.c, * special.c, t1.c, test_dvipng.tex, tfm.c, vf.c, COPYING, * COPYING.LESSER: Change to LGPLv3 - * install.texi: - * README: + * install.texi: + * README: * dvipng.texi: Add blurb about MediaWiki, and cosmetic changes 2008-01-10 Jan-Ake Larsson <jalar@mai.liu.se> @@ -258,20 +301,20 @@ * special.c: Simplify PostScript header and multi-special handling - * color.c: + * color.c: * draw.c: * dvi.c: - * dvipng.h: - * font.c: - * ft.c: - * misc.c: - * set.c: + * dvipng.h: + * font.c: + * ft.c: + * misc.c: + * set.c: * special.c: - * t1.c: Split the flags variable into page_flags, option_flags and + * t1.c: Split the flags variable into page_flags, option_flags and dvi->flags * dvi.c: - * dvipng.c: dvi->flags resets now when the dvi is reopened + * dvipng.c: dvi->flags resets now when the dvi is reopened 2007-08-06 Jan-Ake Larsson <jalar@mai.liu.se> @@ -296,7 +339,7 @@ * special.c: Rewrite to allow for raw PostScript specials, also use PostScript headers - * dvipng.h: + * dvipng.h: * dvi.c: Add read-ahead for PostScript specials * config.h.in: @@ -320,8 +363,8 @@ * Release 1.9 - * INSTALL: - * README: Update for 1.9 + * INSTALL: + * README: Update for 1.9 * Makefile.in: Make the test fail if fonts not found @@ -371,7 +414,7 @@ * ft.c: Adjust debug output - * configure.ac: Add sfd.o + * configure.ac: Add sfd.o 2006-10-04 Jan-Ake Larsson <jalar@mai.liu.se> @@ -420,7 +463,7 @@ * Makefile.in: add www target - * README: + * README: * readme.texi: Update capabilities info and preview-latex link 2006-03-30 Jan-Ake Larsson <jalar@mai.liu.se> @@ -429,25 +472,25 @@ * RELEASE: Update for 1.8 - * set.c: - * readme.texi: - * install.texi: - * ft.c: - * dvi.c: - * draw.c: - * README: + * set.c: + * readme.texi: + * install.texi: + * ft.c: + * dvi.c: + * draw.c: + * README: * INSTALL: Update copyright 2006-03-29 Jan-Ake Larsson <jalar@mai.liu.se> - * dvipng.1: + * dvipng.1: * dvipng.texi: Document new switch, new PostScript inclusion, rearrange and adjust - * misc.c: - * INSTALL: - * README: - * install.texi: + * misc.c: + * INSTALL: + * README: + * install.texi: * readme.texi: Minimal documentation adjustments 2006-03-27 Jan-Ake Larsson <jalar@mai.liu.se> @@ -462,7 +505,7 @@ 2006-02-27 Jan-Ake Larsson <jalar@mai.liu.se> * special.c: Use gs' pngalpha device, render without clipping, - adjust image position + adjust image position * set.c: Simplify code, make color cache (page-)persistent @@ -473,10 +516,10 @@ * dvipng.h: New flags - * configure.ac: + * configure.ac: * config.h.in: Simplify gd tests - * configure.ac: + * configure.ac: * aclocal.m4: Check gs devices 2006-02-10 Jan-Ake Larsson <jalar@mai.liu.se> @@ -538,13 +581,13 @@ 2005-10-11 Jan-Ake Larsson <jalar@mai.liu.se> * Release 1.7 - + * INSTALL: Typographic changes - * README: - * RELEASE: - * configure.ac: - * dvipng.1: + * README: + * RELEASE: + * configure.ac: + * dvipng.1: * dvipng.texi: Adjust for 1.7 * install.texi: Insert space @@ -597,12 +640,12 @@ * color.c: Don't use strtok, adjust for xcolor - * special.c: Don't use strtok + * special.c: Don't use strtok 2005-04-25 Jan-Ake Larsson <jalar@mai.liu.se> - * config.h.in: - * configure.ac: + * config.h.in: + * configure.ac: * set.c: Don't do alpha blending in truecolor mode, write alpha channel to file @@ -624,17 +667,17 @@ * dvipng.1: Regenerate man page - * configure.ac: - * dvipng.texi: + * configure.ac: + * dvipng.texi: * miktex.h: Update version info - * configure.ac: - * dvipng.texi: - * README: + * configure.ac: + * dvipng.texi: + * README: * readme.texi: Update mailing list address - * configure.ac: - * config.h.in: + * configure.ac: + * config.h.in: * special.c: Simplify string search 2005-04-03 Jan-Ake Larsson <jalar@mai.liu.se> @@ -650,75 +693,75 @@ DVI files * ft.c: Sizes are given in big points in FreeType, in TeX points - in DVI files + in DVI files - * dvipng.h: Fix boolean type again + * dvipng.h: Fix boolean type again 2005-02-10 Jan-Ake Larsson <jalar@mai.liu.se> - * config.h.in: - * configure.ac: - * dvipng.texi: - * dvipng.h: - * misc.c: - * set.c: Add proper alpha channel + * config.h.in: + * configure.ac: + * dvipng.texi: + * dvipng.h: + * misc.c: + * set.c: Add proper alpha channel 2005-02-04 Jan-Ake Larsson <jalar@mai.liu.se> - * color.c: - * draw.c: - * dvi.c: - * dvipng.c: - * font.c: - * ft.c: - * misc.c: - * papersiz.c: - * pk.c: - * set.c: - * special.c: - * t1.c: + * color.c: + * draw.c: + * dvi.c: + * dvipng.c: + * font.c: + * ft.c: + * misc.c: + * papersiz.c: + * pk.c: + * set.c: + * special.c: + * t1.c: * tfm.c: * vf.c: Cosmetic changes to warnings and fatals * Release 1.5 - - * RELEASE: Prepare for 1.5 - - * INSTALL: - * Makefile.in: - * README: - * color.c: - * commands.h: - * configure.ac: - * draw.c: - * dvi.c: - * dvipng.1: - * dvipng.c: - * dvipng.h: - * dvipng.texi: - * enc.c: - * font.c: - * fontmap.c: - * ft.c: - * install.texi: - * macros.texi: - * miktex.h: - * misc.c: - * papersiz.c: - * pk.c: - * ppagelist.c: - * readme.texi: - * set.c: - * special.c: - * t1.c: - * test_dvipng.tex: + + * RELEASE: Prepare for 1.5 + + * INSTALL: + * Makefile.in: + * README: + * color.c: + * commands.h: + * configure.ac: + * draw.c: + * dvi.c: + * dvipng.1: + * dvipng.c: + * dvipng.h: + * dvipng.texi: + * enc.c: + * font.c: + * fontmap.c: + * ft.c: + * install.texi: + * macros.texi: + * miktex.h: + * misc.c: + * papersiz.c: + * pk.c: + * ppagelist.c: + * readme.texi: + * set.c: + * special.c: + * t1.c: + * test_dvipng.tex: * tfm.c: * vf.c: Update Copyright, set version 1.5 2005-02-03 Jan-Ake Larsson <jalar@mai.liu.se> - * draw.c: - * dvipng.h: + * draw.c: + * dvipng.h: * set.c: Fix bug in --picky mode 2005-01-27 Jan-Ake Larsson <jalar@mai.liu.se> @@ -737,9 +780,9 @@ * Release 1.4 * RELEASE: - * configure.ac: + * configure.ac: * dvipng.1: - * dvipng.texi: Set version 1.4 + * dvipng.texi: Set version 1.4 * README: Fix formatting @@ -752,7 +795,7 @@ * configure.ac: * dvipng.h: Move int64_t and uint64_t tests entirely to autoconf - * dvi.c: Fix signedness + * dvi.c: Fix signedness 2004-11-30 Jan-Ake Larsson <jalar@mai.liu.se> @@ -760,13 +803,13 @@ 2004-11-25 Jan-Ake Larsson <jalar@mai.liu.se> - * Release 1.3 - + * Release 1.3 + * Makefile.in, README, dvipng.1, readme.texi: Fix dvigif installation and docs * INSTALL: - * README: Add license + * README: Add license * dvipng.c: Remove duplicate copyright @@ -784,7 +827,7 @@ * dvipng.h: Use char* arithmetic, not void*. And enable use of gcc -ansi -pedantic. - * special.c: Don't use C++ comments. + * special.c: Don't use C++ comments. * papersiz.c: Rewrite @@ -813,7 +856,7 @@ 2004-11-01 Jan-Åke Larsson <jalar@mai.liu.se> - * RELEASE: Update for 1.3 + * RELEASE: Update for 1.3 * dvipng.h: Load alloca.h when available @@ -852,9 +895,9 @@ 2004-10-27 Jan-Åke Larsson <jalar@mai.liu.se> * dvipng.1: - * dvipng.texi: Amend docs + * dvipng.texi: Amend docs - * misc.c: Amend helptext + * misc.c: Amend helptext 2004-10-26 Jan-Åke Larsson <jalar@mai.liu.se> @@ -862,7 +905,7 @@ * misc.c: * dvipng.h: Change background transparency - * configure.ac: Bump version, add test for libz + * configure.ac: Bump version, add test for libz 2004-10-07 Jan-Åke Larsson <jalar@mai.liu.se> @@ -875,16 +918,16 @@ 2004-08-18 Jan-Åke Larsson <jalar@mai.liu.se> * Release 1.2 - - * RELEASE: Change for 1.2 + + * RELEASE: Change for 1.2 * config.h.in: Update - * dvipng.1: change help text + * dvipng.1: change help text * dvipng.texi: update mailing list text. And version. - * README: + * README: * readme.texi: update info and todo list * draw.c, misc.c, dvipng.c, dvipng.h: @@ -896,7 +939,7 @@ * special.c: Fix comment - * set.c: + * set.c: * dvipng.h: new Gamma function * configure.ac: libm is needed by new gamma code @@ -909,27 +952,27 @@ * special.c: do not call ghostscript when switch given * misc.c: add picky and ghostscript switches - - * dvipng.h: add picky and ghostscript flags + + * dvipng.h: add picky and ghostscript flags 2004-08-06 Jan-Åke Larsson <jalar@mai.liu.se> * dvipng.texi: Document --png, --gif, and --picky - * .cvsignore: Add *.gif + * .cvsignore: Add *.gif - * Makefile.in: Install 'dvigif' if we have GIF support + * Makefile.in: Install 'dvigif' if we have GIF support - * configure.ac: Test for gdImageGif and 'ln -s' + * configure.ac: Test for gdImageGif and 'ln -s' - * config.h.in: GIF support + * config.h.in: GIF support * set.c: GIF writing * misc.c: basename fixes, --png and --gif fixes, - --no-image-on-warn changes name to --picky + --no-image-on-warn changes name to --picky - * dvi.c: basename fixes + * dvi.c: basename fixes * dvipng.h: Portability fixes, add GIF image flag @@ -939,12 +982,12 @@ 2004-07-01 Jan-Åke Larsson <jalar@mai.liu.se> - * miktex.mak: New, for MIKTeX + * miktex.mak: New, for MIKTeX * dvi.c: * dvipng.c: * dvipng.h: - * special.c: Adjust for MIKTeX + * special.c: Adjust for MIKTeX * color.c: * enc.c: @@ -972,89 +1015,89 @@ 2004-06-24 Jan-Åke Larsson <jalar@mai.liu.se> - * fontmap.c: - * pk.c: + * fontmap.c: + * pk.c: * vf.c: More memory fixes 2004-06-21 Jan-Åke Larsson <jalar@mai.liu.se> * config.h.in: - * configure.ac: Test for stdbool, munmap and strtol + * configure.ac: Test for stdbool, munmap and strtol - * test_dvipng.tex: Change color test + * test_dvipng.tex: Change color test - * dvipng.h: - * misc.c: + * dvipng.h: + * misc.c: * ppagelist.c: Fix -r switch - * dvipng.h: - * font.c: - * misc.c: + * dvipng.h: + * font.c: + * misc.c: * ppagelist.c: - * special.c: - * t1.c: + * special.c: + * t1.c: * tfm.c: Use stdbool - * color.c: - * dvi.c: - * dvipng.c: - * dvipng.h: - * enc.c: - * font.c: - * fontmap.c: + * color.c: + * dvi.c: + * dvipng.c: + * dvipng.h: + * enc.c: + * font.c: + * fontmap.c: * ppagelist.c: * special.c: Fix memory leak(s) - * color.c: - * draw.c: - * dvi.c: - * dvipng.h: - * misc.c: + * color.c: + * draw.c: + * dvi.c: + * dvipng.h: + * misc.c: * set.c: * special.c: Fix color stack - * draw.c: - * dvipng.h: - * ft.c: - * pk.c: + * draw.c: + * dvipng.h: + * ft.c: + * pk.c: * set.c: - * t1.c: - * tfm.c: + * t1.c: + * tfm.c: * vf.c: Simplify char structs - * color.c: - * draw.c: - * dvi.c: - * dvipng.c: - * dvipng.h: - * enc.c: - * font.c: - * fontmap.c: - * ft.c: - * misc.c: - * papersiz.c: - * pk.c: + * color.c: + * draw.c: + * dvi.c: + * dvipng.c: + * dvipng.h: + * enc.c: + * font.c: + * fontmap.c: + * ft.c: + * misc.c: + * papersiz.c: + * pk.c: * ppagelist.c: * set.c: - * special.c: - * t1.c: - * tfm.c: - * vf.c: Add copyright notice + * special.c: + * t1.c: + * tfm.c: + * vf.c: Add copyright notice 2004-05-31 Jan-Åke Larsson <jalar@mai.liu.se> * dvipng.1: * configure.ac: * RELEASE: - * INSTALL: Release 1.1 + * INSTALL: Release 1.1 2004-05-26 Jan-Åke Larsson <jalar@mai.liu.se> * special.c: Handle source specials - * test_dvipng.tex: Add failing special and color test + * test_dvipng.tex: Add failing special and color test - * dvipng.c: Adjust coment about SELFAUTO... + * dvipng.c: Adjust coment about SELFAUTO... * dvi.c: Fix possible overflow @@ -1066,30 +1109,30 @@ 2004-05-18 Jan-Åke Larsson <jalar@mai.liu.se> - * dvipng.texi: Fix build + * dvipng.texi: Fix build 2004-05-14 Jan-Åke Larsson <jalar@mai.liu.se> - * config.h.in: Use more tests + * config.h.in: Use more tests - * dvipng.1: Add documentation + * dvipng.1: Add documentation * dvipng.texi: Fix build. Revert to four-argument @node, my makeinfo cannot handle the one-argument form (yet). 2004-05-11 Jan-Åke Larsson <jalar@mai.liu.se> - * configure.ac: More tests + * configure.ac: More tests 2004-05-09 Jan-Åke Larsson <jalar@mai.liu.se> - * install.texi: T1lib docs + * install.texi: T1lib docs * dvipng.1: - * dvipng.texi: Add documentation, and spellcheck + * dvipng.texi: Add documentation, and spellcheck * special.c: - * color.c: Make colors work again. + * color.c: Make colors work again. 2004-05-08 David Kastrup <dakas@users.sourceforge.net> @@ -1100,7 +1143,7 @@ * fontmap.c: Use both kpse_fontmap_format and _dvips_header_ - * enc.c: Use configure test + * enc.c: Use configure test * configure.ac: Add test for kpse_enc_format, reorder gd and png tests @@ -1135,7 +1178,7 @@ 2004-05-02 Jan-Åke Larsson <jalar@mai.liu.se> * Makefile.in: - * config.h.in: + * config.h.in: * configure.ac: * draw.c: * dvipng.c: @@ -1149,13 +1192,13 @@ 2004-04-05 Jan-Åke Larsson <jalar@mai.liu.se> - * dvipng.1: - * readme.texi: + * dvipng.1: + * readme.texi: * dvipng.texi: - * Makefile.in: Add man page + * Makefile.in: Add man page 2004-03-27 Jan-Åke Larsson <jalar@mai.liu.se> - + * dvipng.texi: Fix debug documentations * dvipng.c: Dont fail on --mode without --bdpi, output a warning. @@ -1164,7 +1207,7 @@ * papersiz.c: Remove compiler warning - * dvipng.texi: + * dvipng.texi: * misc.c: Change year 2004-03-25 Jan-Åke Larsson <jalar@mai.liu.se> @@ -1176,18 +1219,18 @@ * configure.ac: Change version number - * README: Checkin updated README + * README: Checkin updated README * pk.c: * ft.c: Speed up color cache - * dvipng.texi: Add info on resolution, change version number + * dvipng.texi: Add info on resolution, change version number 2004-03-24 Jan-Åke Larsson <jalar@mai.liu.se> - * special.c: Fix missing 'showpage' and a memory leak + * special.c: Fix missing 'showpage' and a memory leak - * font.c: Adjust error message + * font.c: Adjust error message * dvipng.h: * ft.c: @@ -1219,7 +1262,7 @@ * font.c: * misc.c: * papersiz.c: - * special.c: Change the behaviour of the -D switch + * special.c: Change the behaviour of the -D switch 2004-03-08 Jan-Åke Larsson <jalar@mai.liu.se> diff --git a/Build/source/texk/dvipng/dvipng-1.14/ChangeLog.0 b/Build/source/texk/dvipng/dvipng-1.15/ChangeLog.0 index 3c4689ad8c4..3c4689ad8c4 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/ChangeLog.0 +++ b/Build/source/texk/dvipng/dvipng-1.15/ChangeLog.0 diff --git a/Build/source/texk/dvipng/dvipng-1.15/INSTALL b/Build/source/texk/dvipng/dvipng-1.15/INSTALL new file mode 100644 index 00000000000..b7f8aebb9fb --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.15/INSTALL @@ -0,0 +1,157 @@ +Installing dvipng +***************** + +Installing dvipng should be simple: merely './configure', 'make', and +'make install'. + +Prerequisites +============= + + * The GD Graphics Draw library, libgd + + The drawing library 'libgd' is necessary, and is downloadable at + <http://www.boutell.com/gd>, and there are binary packages for most + operating systems from their respective distributors. In any case, + the latest version of the library installs using 'autoconf' so it + should not be difficult for you to install it from source, and then + proceed with installing dvipng. + + * The path-searching library kpathsea + + Kpathsea is most likely included in your LaTeX installation, but it + may happen that ./configure does not find it; see below. If you do + not have it, download it from <http://www.ctan.org> and compile it. + I have no experience with this, so I cannot help much here. + + * The font-rendering library FreeType 2 + + While not strictly necessary, a recent FreeType 2 is recommended + since dvipng currently will produce better-quality images when this + library is available. To take advantage of this, you should have + at least FreeType 2.1.9. + + FreeType 2 will enable direct support for PostScript and TrueType + fonts, so that dvipng will not need to generate bitmapped variants + on disk of the TeX fonts since modern TeX distributions include + PostScript versions of them. Then, you can render images at + different (and unusual) resolutions without cluttering the disk + with lots of bitmapped fonts. + + Finally, it will enable subfont support in dvipng. That is, if you + want to render CJK-LaTeX characters, you must have FreeType 2 + installed. + + * libpng and libz + + To be able to compress and write PNG files to disk, dvipng (or + really libgd) uses libpng which in turn uses libz. These should be + available on any modern system, if not, download them and install + them. + + * The 'texinfo' package + + This is needed for building the documentation. + +Configure +========= + +The first step is to configure the source code, telling it where various +files will be. To do so, run + + ./configure OPTIONS + + (Note: if you have fetched dvipng from CVS rather than a regular +release, you will have to first generate './configure' by running +'autoconf' 2.53 or later.) + + On many machines, you will not need to specify any options, but if +'configure' cannot determine something on its own, you'll need to help +it out. For a list of the options type + + ./configure --help + + On some machines, the libraries will be installed in directories that +are not in the linker's search path. This will generate an error when +running './configure', indicating that it cannot find libgd or +libkpathsea (most likely). You then need to specify the path to the +respective library's object files. They are typically called e.g., +'libgd.a' or 'libgd.so'. If they are located in e.g., '/sw/local/lib', +do + + ./configure LDFLAGS=-L/sw/local/lib + + If the library is available as a shared object file ('.so'), the +runtime linker may also need to be told where to find the library, then +use + + ./configure LDFLAGS='-L/sw/local/lib -R/sw/local/lib' + + When either of these is necessary, it is likely that the C header +files are also installed in directories that are not in the C +preprocessor's search path. This will also generate an error when +running './configure', indicating that it cannot find e.g., 'gd.h' or +'kpathsea.h' (most likely). You then need to specify the path to the +respective library's C header files. If they are located in e.g., +'/sw/local/include', do + + ./configure CPPFLAGS=-I/sw/local/include + + On my SUN Solaris workstation, I had to combine this into + + ./configure CPPFLAGS='-I/sw/local/include -I/sw/tex/teTeX/1.0/include'\ + LDFLAGS='-L/sw/local/lib -R/sw/local/lib -L/sw/tex/teTeX/1.0/lib/' + +where the backslash denotes a continuation of the line. + +Build/install +============= + +Once 'configure' has been run, simply enter + + make + +at the prompt to compile the C code, and build the documentation files. +To install the files into the locations chosen earlier, type + + make install + +You may need special privileges to install, e.g., if you are installing +into system directories. + +Installation outside the texmf tree +=================================== + +In some cases, a dvipng binary installed outside the texmf tree will not +be able to find virtual fonts, or the PostScript font maps (normally +used by dvips). This may be because _only_ $SELFAUTOLOC, $SELFAUTODIR, +and $SELFAUTOPARENT are used in the texmf tree configuration file +'texmf.cnf'. If so, give the switch '--enable-selfauto-set' to +'./configure'. This will make dvipng adjust these three internally so +that kpathsea thinks that dvipng _is_ installed in the texmf tree. + +Installation for non-privileged users +===================================== + +Often people without system administration privileges want to install +software for their private use. In that case you need to specify more +options to the 'configure' script, usually this is done by using the +'--prefix' option to the 'configure' script, and let it point to the +personal home directory. In that way, resulting binaries will be +installed under the 'bin' subdirectory of your home directory, manual +pages under 'man' and so on. That way, it is reasonably easy to +maintain a bunch of additional packages, since the prefix argument is +supported by most 'configure' scripts. + + You'll have to add something like '/home/myself/bin' to your 'PATH' +shell variable, if it isn't there already, and similarly set the +'INFOPATH' and 'MANPATH' variables to be able to access the +documentation. + +Copying +======= + +This program is released under the GNU Lesser General Public License +version 3, see the COPYING file in the dvipng distribution or +<http://www.gnu.org/licenses/>. + + Copyright (C) 2002-2015 Jan-AAke Larsson diff --git a/Build/source/texk/dvipng/dvipng-1.14/Makefile.in b/Build/source/texk/dvipng/dvipng-1.15/Makefile.in index 5845e238353..d57b925324a 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/Makefile.in +++ b/Build/source/texk/dvipng/dvipng-1.15/Makefile.in @@ -18,7 +18,7 @@ # License along with this program. If not, see # <http://www.gnu.org/licenses/>. # -# Copyright (C) 2002-2008 Jan-Åke Larsson +# Copyright (C) 2002-2015 Jan-Åke Larsson # #************************************************************************ @@ -40,6 +40,7 @@ exec_prefix = @exec_prefix@ bindir = @bindir@ infodir = @infodir@ mandir = @mandir@ +datarootdir = @datarootdir@ DESTDIR= INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -64,7 +65,7 @@ install: @INSTALL_BIN_TARGET@ @INSTALL_BIN_TARGET@-docs ####################################### The program dvipng: $(objects) - $(CC) $(LDFLAGS) $(objects) -o dvipng $(LIBS) + $(CC) $(LDFLAGS) $(objects) -o dvipng $(LIBS) $(objects): dvipng.h commands.h config.h @@ -83,7 +84,7 @@ dvipng.dvi: $(TEXIFILES) -$(TEXIDVI) -I $(srcdir) $(srcdir)/dvipng.texi dvipng.ps: dvipng.dvi - $(DVIPS) -Ppdf dvipng.dvi + $(DVIPS) -Ppdf dvipng.dvi dvipng.info: $(TEXIFILES) dvipng.help -$(MAKEINFO) -I$(srcdir) $(srcdir)/dvipng.texi @@ -100,7 +101,7 @@ www: $(TEXIFILES) dvipng.help -I $(srcdir) $(srcdir)/dvipng.texi (cd html; for i in *; do \ sed -e "s/Jan-A/Jan-\Å\;/g" $$i > ../www/$$i; \ - done) + done) cp www/dvipng.html www/index.html rm -rf html @@ -135,13 +136,14 @@ test_dvipng.dvi: test_dvipng.tex clean: rm -f *.o dvipng *.help *.info* *dvipng.dvi *.aux *.log - rm -f *dvipng.ps *.cp *.fn *.ky *~ \#*\# \ + rm -f *dvipng*.png *.cp *.fn *.ky *~ \#*\# \ *.tp *.vr *.pg *.toc *.tp *.bak *.cps *.kys *.tps \ *.fns *.vrs *.pgs *.html *.tmp distclean: clean rm -f Makefile rm -f config.status config.log config.cache c-auto.h + rm -rf autom4te.cache ####################################### Maintainer targets @@ -156,7 +158,7 @@ README: readme.texi -I$(srcdir) $(srcdir)/readme.texi --output README dvipng.1: dvipng.texi readme.texi - texi2pod.pl -D man $(srcdir)/dvipng.texi | \ + ~/bin/texi2pod.pl -D man $(srcdir)/dvipng.texi | \ sed -es/@//g -es/previewlatex/preview-latex/g -es/{}//g > dvipng.pod pod2man --center="User commands" --release=$(PACKAGE_STRING)\ dvipng.pod > dvipng.1 @@ -166,4 +168,3 @@ dist: INSTALL README dvipng.1 distclean # SunOS make suffix rule wierdness .cps.h: - diff --git a/Build/source/texk/dvipng/dvipng-1.14/README b/Build/source/texk/dvipng/dvipng-1.15/README index da9ba557f4c..a4e78345058 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/README +++ b/Build/source/texk/dvipng/dvipng-1.15/README @@ -4,25 +4,25 @@ dvipng This program makes PNG and/or GIF graphics from DVI files as obtained from TeX and its relatives. - If GIF support is enabled, GIF output is chosen by using the -`dvigif' binary or with the `--gif' option. + If GIF support is enabled, GIF output is chosen by using the 'dvigif' +binary or with the '--gif' option. It is intended to produce anti-aliased screen-resolution images as -fast as is possible. The target audience is people who need to generate -and regenerate many images again and again. The primary target is the +fast as is possible. The target audience is people who need to generate +and regenerate many images again and again. The primary target is the preview-latex (X)Emacs package, a package to preview formulas from -within (X)Emacs. Yes, you get to see your formulas in the (X)Emacs -buffer, see `http://www.gnu.org/software/auctex/preview-latex.html'. +within (X)Emacs. Yes, you get to see your formulas in the (X)Emacs +buffer, see <http://www.gnu.org/software/auctex/preview-latex.html>. Another example is WeBWorK, an internet-based method for delivering -homework problems to students over the internet, giving students -instant feedback as to whether or not their answers are correct, see -`http://webwork.math.rochester.edu'. +homework problems to students over the internet, giving students instant +feedback as to whether or not their answers are correct, see +<http://webwork.math.rochester.edu>. A more recent addition to the dvipng-using applications out there is -MediaWiki, the software behind Wikipedia and many other wikis out -there. Dvipng is used to render mathematical formulae from version -1.8.0 of MediaWiki, see `http://www.mediawiki.org'. +MediaWiki, the software behind Wikipedia and many other wikis out there. +Dvipng is used to render mathematical formulae from version 1.8.0 of +MediaWiki, see <http://www.mediawiki.org>. Other applications may also benefit, like web applications as latex2html and WYSIWYG editors like LyX. @@ -30,20 +30,20 @@ latex2html and WYSIWYG editors like LyX. Benefits of dvipng ================== - The benefits of `dvipng'/`dvigif' include +The benefits of 'dvipng'/'dvigif' include - * Speed. It is a very fast bitmap-rendering code for DVI files, which - makes it suitable for generating large amounts of images + * Speed. It is a very fast bitmap-rendering code for DVI files, + which makes it suitable for generating large amounts of images on-the-fly, as needed in preview-latex, WeBWorK and others. * It does not read the postamble, so it can be started before TeX - finishes. There is a `--follow' switch that makes dvipng wait at + finishes. There is a '--follow' switch that makes dvipng wait at end-of-file for further output, unless it finds the POST marker that indicates the end of the DVI. - * Interactive query of options. dvipng can read options interactively - through stdin, and all options are usable. It is even possible to - change the input file through this interface. + * Interactive query of options. dvipng can read options + interactively through stdin, and all options are usable. It is + even possible to change the input file through this interface. * Supports PK, VF, PostScript Type1, and TrueType fonts, subfonts (i.e., as used in CJK-LaTeX), color specials, and inclusion of @@ -51,11 +51,10 @@ Benefits of dvipng * and more... - Installation ============ -Read `INSTALL', included in the distribution. +Read 'INSTALL', included in the distribution. Usage ===== @@ -64,9 +63,9 @@ To use dvipng at its simplest, simply type dvipng foo -where `foo.dvi' is the output of TeX that you want to convert to PNG -format. If there are four pages in `foo.dvi', those pages will be -output as `foo1.png', `foo2.png', `foo3.png', and `foo4.png', +where 'foo.dvi' is the output of TeX that you want to convert to PNG +format. If there are four pages in 'foo.dvi', those pages will be +output as 'foo1.png', 'foo2.png', 'foo3.png', and 'foo4.png', respectively. Many options are available (see the info manual). For a brief @@ -77,11 +76,12 @@ summary of available options, just type Availability ============ -The dvipng package is available at Savannah, the GNU project site. Since -dvipng is not part of the GNU project, although released under the GNU -GPL, the web address is `http://savannah.nongnu.org/projects/dvipng'. -Instructions for anonymous CVS access can be found at -`http://savannah.nongnu.org/cvs/?group=dvipng'. +The dvipng package is available at Savannah, the GNU project site. +Since dvipng is not part of the GNU project, although released under the +GNU GPL, the web address is +<http://savannah.nongnu.org/projects/dvipng>. Instructions for +anonymous CVS access can be found at +<http://savannah.nongnu.org/cvs/?group=dvipng>. Contacts ======== @@ -89,12 +89,12 @@ Contacts Bug reports should be sent to <dvipng@nongnu.org>. Questions, suggestions for new features, pleas for help, and/or -praise should go to <dvipng@nongnu.org>. For more information on this -mailing list, send a message with just the word `help' as subject or +praise should go to <dvipng@nongnu.org>. For more information on this +mailing list, send a message with just the word 'help' as subject or body to <dvipng-request@nongnu.org> or look at -`http://lists.nongnu.org/mailman/listinfo/dvipng'. +<http://lists.nongnu.org/mailman/listinfo/dvipng>. - Offers to support further development will be appreciated. For + Offers to support further development will be appreciated. For developer access, ask on <dvipng@nongnu.org>. Copying @@ -102,9 +102,9 @@ Copying This program is released under the GNU Lesser General Public License version 3, see the COPYING file in the dvipng distribution or -`http://www.gnu.org/licenses/'. +<http://www.gnu.org/licenses/>. - Copyright (C) 2002-2009 Jan-AAke Larsson + Copyright (C) 2002-2014 Jan-AAke Larsson Todo ==== @@ -114,15 +114,13 @@ Todo * Add more color models for xcolor compatibility - * Fix T1lib and PK rendering so it is on par with Freetype. - * Enable a named pipe as DVI * Further speed improvements. * Other output specials and source specials. - * Clean internal structures. Overhaul file handling. + * Clean internal structures. Overhaul file handling. * Fix the SELFAUTO stuff at runtime rather than at build time diff --git a/Build/source/texk/dvipng/dvipng-1.15/RELEASE b/Build/source/texk/dvipng/dvipng-1.15/RELEASE new file mode 100644 index 00000000000..eb8615efed2 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.15/RELEASE @@ -0,0 +1,14 @@ +Release notes for version 1.15 of the dvipng package: + +This program makes PNG graphics from DVI files as obtained from TeX +and its relatives. + + +This is a bugfix release that removes the unnecessarily long delay in --follow +mode and a few segfaults on out-of-memory or missing standard-latex files, and +adds some documentation improvements. It also removes support for libt1, which +is reportedly not developed anymore, and not needed since Freetype does a much +better job. + + +Report any bugs you find, see README for instructions. diff --git a/Build/source/texk/dvipng/dvipng-1.14/aclocal.m4 b/Build/source/texk/dvipng/dvipng-1.15/aclocal.m4 index 0cd4eddf92e..0cd4eddf92e 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/aclocal.m4 +++ b/Build/source/texk/dvipng/dvipng-1.15/aclocal.m4 diff --git a/Build/source/texk/dvipng/dvipng-1.14/color.c b/Build/source/texk/dvipng/dvipng-1.15/color.c index ecaf425f35e..63fc29c6c57 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/color.c +++ b/Build/source/texk/dvipng/dvipng-1.15/color.c @@ -18,7 +18,7 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2010 Jan-Åke Larsson + Copyright (C) 2002-2015 Jan-Åke Larsson ************************************************************************/ @@ -40,15 +40,15 @@ const char *colordef[]={"xcolor.sty","dvipsnam.def", "svgnam.def","x11nam.def",NULL}; char *xcpname=NULL; -void initcolor(void) +void initcolor(void) { csp = 1; - cstack[0].red=255; - cstack[0].green=255; - cstack[0].blue=255; - cstack[1].red=0; - cstack[1].green=0; - cstack[1].blue=0; + cstack[0].red=255; + cstack[0].green=255; + cstack[0].blue=255; + cstack[1].red=0; + cstack[1].green=0; + cstack[1].blue=0; } static struct colorname * NewColor(const char* prefix, int nprefix, @@ -56,9 +56,8 @@ static struct colorname * NewColor(const char* prefix, int nprefix, char* model, int nmodel, char* values, int nvalues) { - struct colorname *tmp = - malloc(sizeof(struct colorname)+3+nprefix+nname+nmodel+nvalues); - if (tmp==NULL) + struct colorname *tmp; + if ((tmp=malloc(sizeof(struct colorname)+3+nprefix+nname+nmodel+nvalues))==NULL) Fatal("Cannot malloc space for color name"); tmp->color=tmp->name+nprefix+nname+1; strncpy(tmp->name,prefix,nprefix); @@ -69,13 +68,13 @@ static struct colorname * NewColor(const char* prefix, int nprefix, strncpy(tmp->color+nmodel+1,values,nvalues); tmp->color[nmodel+nvalues+1]='\0'; model=tmp->color; - while(*model!='\0') { - if (*model==',') - *model=' '; + while(*model!='\0') { + if (*model==',') + *model=' '; model++; } DEBUG_PRINT(DEBUG_COLOR,("\n COLOR NAME:\t'%s' '%s'", - tmp->name,tmp->color)); + tmp->name,tmp->color)); return(tmp); } @@ -87,11 +86,11 @@ static struct colorname * NewColor(const char* prefix, int nprefix, #define FINDVALEND(s,n) n=0; while(s<max && *s!='}' && *s!='/' && *s!=';') { s++; n++; } #define FINDLASTVALEND(s) while(s<max && *s!='}' && *s!=';') s++ #define FINDPSNAMEEND(s,n) n=0; while(s<max && *s!='{') { s++; n++; } -#define BLANKCOMMAS(s) +#define BLANKCOMMAS(s) static struct colorname* LoadColornameFile(const char* filename) { - struct colorname *list=NULL,*tmp=NULL; + struct colorname *list=NULL,*tmp=NULL; char *filepath,*pos,*max; const char *prefix=""; char *name,*values,*model; @@ -111,8 +110,8 @@ static struct colorname* LoadColornameFile(const char* filename) max=fmmap.data+fmmap.size; while (pos<max && *pos!='\\') pos++; while(pos+9<max && strncmp(pos,"\\endinput",9)!=0) { - if ((pos+20<max && strncmp(pos,"\\def\\colornameprefix",20)==0) - || (pos+32<max + if ((pos+20<max && strncmp(pos,"\\def\\colornameprefix",20)==0) + || (pos+32<max && strncmp(pos,"\\providecommand*\\colornameprefix",32)==0)) { DEBUG_PRINT(DEBUG_COLOR,("\n \t'%.20s'", pos)); FINDARG(pos); @@ -195,15 +194,14 @@ void ClearColorNames(void) void InitXColorPrologue(const char* name) { ClearXColorPrologue(); - xcpname=malloc(strlen(name)+1); - if (xcpname==NULL) + if ((xcpname=malloc(strlen(name)+1))==NULL) Fatal("cannot malloc memory for xcolor prologue name"); strcpy(xcpname,name); } static struct colorname* LoadXColorPrologue(void) { - struct colorname *list=NULL,*tmp=NULL; + struct colorname *list=NULL,*tmp=NULL; char *filepath,*pos,*max; const char *prefix=""; char *name,*values,*model; @@ -230,7 +228,7 @@ static struct colorname* LoadXColorPrologue(void) values=++pos; /* second argument: color values */ FINDVALEND(pos,nvalues); model=pos+3; /* third argument: color model, prefixed by 'XC' */ - while(pos<max && *pos!=' ' && *pos!='\r' && *pos!='\n') pos++; + while(pos<max && *pos!=' ' && *pos!='\r' && *pos!='\n') pos++; nmodel=pos-model; tmp=NewColor(prefix,nprefix,name,nname,model,nmodel,values,nvalues); tmp->next=list; @@ -254,7 +252,7 @@ static struct colorname* LoadXColorPrologue(void) void stringrgb(const char* color,int *r,int *g,int *b) { char* end; - static int unloaded=1; + static int unloaded=0; DEBUG_PRINT(DEBUG_COLOR,("\n COLOR SPEC:\t'%s' (",color)); SKIPSPACES(color); @@ -300,9 +298,9 @@ void stringrgb(const char* color,int *r,int *g,int *b) *r = c+k<255 ? 255-(c+k) : 0; *g = m+k<255 ? 255-(m+k) : 0; *b = y+k<255 ? 255-(y+k) : 0; - } else if (strncmp(color,"hsb ",4)==0 + } else if (strncmp(color,"hsb ",4)==0 || strncmp(color,"HSB ",4)==0) { - /* The hsb and HSB models really need more presicion. + /* The hsb and HSB models really need more presicion. Use double and convert back*/ double hu,sa,br,f,R,G,B; int i; @@ -320,19 +318,19 @@ void stringrgb(const char* color,int *r,int *g,int *b) i=6*hu; f=6*hu-i; switch(i) { - case 0: + case 0: R = br*(1-sa*0); G = br*(1-sa*(1-f)); B = br*(1-sa*1); break; - case 1: + case 1: R = br*(1-sa*f); G = br*(1-sa*0); B = br*(1-sa*1); break; - case 2: + case 2: R = br*(1-sa*1); G = br*(1-sa*0); B = br*(1-sa*(1-f)); break; - case 3: + case 3: R = br*(1-sa*1); G = br*(1-sa*f); B = br*(1-sa*0); break; - case 4: + case 4: R = br*(1-sa*(1-f)); G = br*(1-sa*1); B = br*(1-sa*0); break; - case 5: + case 5: R = br*(1-sa*0); G = br*(1-sa*1); B = br*(1-sa*f); break; - default: + default: R = br*(1-sa*0); G = br*(1-sa*1); B = br*(1-sa*1); } *r=FTO255(R); @@ -348,14 +346,13 @@ void stringrgb(const char* color,int *r,int *g,int *b) while(tmp!=NULL && strcmp(color,tmp->name)!=0) tmp=tmp->next; if (tmp==NULL) { - if (colornamep==NULL) - colornamep=LoadColornameFile(colordef[0]); + while (colornamep==NULL && colordef[unloaded]!=NULL) + colornamep=LoadColornameFile(colordef[unloaded++]); tmp=colornamep; - while((tmp->next!=NULL || colordef[unloaded]!=NULL) - && strcmp(color,tmp->name)!=0) { - if (tmp->next==NULL) - tmp->next=LoadColornameFile(colordef[unloaded++]); - tmp=tmp->next; + while(tmp!=NULL && strcmp(color,tmp->name)!=0) { + while (tmp->next==NULL && colordef[unloaded]!=NULL) + tmp->next=LoadColornameFile(colordef[unloaded++]); + tmp=tmp->next; } } if (strcmp(color,tmp->name)==0) { diff --git a/Build/source/texk/dvipng/dvipng-1.14/commands.h b/Build/source/texk/dvipng/dvipng-1.15/commands.h index e2a5404bb32..e2a5404bb32 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/commands.h +++ b/Build/source/texk/dvipng/dvipng-1.15/commands.h diff --git a/Build/source/texk/dvipng/dvipng-1.14/config.h.in b/Build/source/texk/dvipng/dvipng-1.15/config.h.in index 9c51686b9df..f1475404a96 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/config.h.in +++ b/Build/source/texk/dvipng/dvipng-1.15/config.h.in @@ -84,16 +84,9 @@ /* Define to 1 if you have the `png' library (-lpng). */ #undef HAVE_LIBPNG -/* Define to 1 if you have the `t1' library (-lt1). */ -#undef HAVE_LIBT1 - /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ -#undef HAVE_MALLOC - /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -142,6 +135,9 @@ /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL +/* Define to 1 if you have the <sys/param.h> header file. */ +#undef HAVE_SYS_PARAM_H + /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H @@ -154,9 +150,6 @@ /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H -/* Define to 1 if you have the <t1lib.h> header file. */ -#undef HAVE_T1LIB_H - /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H @@ -190,6 +183,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -208,9 +204,6 @@ /* Define to `long long' if <inttypes.h> does not define it. */ #undef int64_t -/* Define to rpl_malloc if the replacement function should be used. */ -#undef malloc - /* Define to `int' if <sys/types.h> does not define. */ #undef pid_t diff --git a/Build/source/texk/dvipng/dvipng-1.14/configure.ac b/Build/source/texk/dvipng/dvipng-1.15/configure.ac index 0630bb136a4..9b3852cdd5a 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/configure.ac +++ b/Build/source/texk/dvipng/dvipng-1.15/configure.ac @@ -18,23 +18,23 @@ # License along with this program. If not, see # <http://www.gnu.org/licenses/>. # -# Copyright (C) 2002-2010 Jan-Åke Larsson +# Copyright (C) 2002-2015 Jan-Åke Larsson # #************************************************************************ # Process this file with autoconf to produce a configure script. -AC_INIT([dvipng], [1.14], [dvipng@nongnu.org]) +AC_INIT([dvipng], [1.15], [dvipng@nongnu.org]) AC_CONFIG_SRCDIR([dvipng.c]) -AC_ARG_ENABLE(debug, - AC_HELP_STRING([--disable-debug],[Compile without debug (-d) option]), +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--disable-debug],[Compile without debug (-d) option]), [ if test "$enableval" = yes ; then AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.]) - fi ], + fi ], [ enable_debug="yes"; AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.])]) -AC_ARG_ENABLE(timing, - AC_HELP_STRING([--enable-timing],[Output execution time of dvipng]), +AC_ARG_ENABLE(timing, + AC_HELP_STRING([--enable-timing],[Output execution time of dvipng]), [ if test "$enableval" = yes ; then AC_DEFINE(TIMING, 1, [Define as 1 to get execution time output.]) fi ]) @@ -45,7 +45,7 @@ AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S AC_ARG_WITH(gs, - AC_HELP_STRING([--with-gs=/PATH/TO/gs],[Hard-wire the location of GhostScript]), + AC_HELP_STRING([--with-gs=/PATH/TO/gs],[Hard-wire the location of GhostScript]), [if test "x$withval" != xno ; then AC_PATH_PROG(GS,["$withval"]) AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.]) @@ -68,29 +68,22 @@ AC_CHECK_LIB([png], [png_read_image],, AC_CHECK_LIB([gd], [gdImageCreate],, [AC_MSG_ERROR([cannot find/use libgd This drawing library can be downloaded at http://www.boutell.com/gd])]) -AC_CHECK_LIB([kpathsea], [kpse_set_program_name],, +AC_CHECK_LIB([kpathsea], [kpse_set_program_name],, AC_MSG_ERROR([cannot find/use libkpathsea])) -AC_CHECK_LIB([t1], [T1_InitLib]) -PSFONTS_O="" -if test "$ac_cv_lib_t1_T1_InitLib" = yes; then - PSFONTS_O="t1.o" -fi -AC_SUBST(PSFONTS_O) -# Checks for header files. +# Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([gd.h png.h kpathsea/kpathsea.h],, [AC_MSG_ERROR([cannot find/use $ac_header])]) -AC_CHECK_HEADERS([t1lib.h libgen.h]) +AC_CHECK_HEADERS([libgen.h]) +PSFONTS_O="" +AC_SUBST(PSFONTS_O) AC_CHECK_FT2(,[CFLAGS="$FT2_CFLAGS $CFLAGS" LIBS="$FT2_LIBS $LIBS" - PSFONTS_O="$PSFONTS_O sfd.o ft.o" + PSFONTS_O="sfd.o ft.o enc.o fontmap.o tfm.o" AC_DEFINE(HAVE_FT2, 1, [Define to 1 if you have freetype2]) ac_have_freetype2="yes"], [ac_have_freetype2="no"]) -if test -n "$PSFONTS_O"; then - PSFONTS_O="$PSFONTS_O enc.o fontmap.o tfm.o" -fi AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_HEADER_STDBOOL @@ -123,8 +116,10 @@ AC_HAS_KPSE_ENC_FORMATS # Checks for library functions. AC_FUNC_FORK -AC_FUNC_MALLOC +# We always allocate nonzero chunks +# AC_FUNC_MALLOC AC_FUNC_MMAP +# AC_FUNC_REALLOC AC_FUNC_STRTOD AC_FUNC_VPRINTF AC_CHECK_FUNCS([dup2 memset munmap pow putenv strchr strrchr strtol strstr]) @@ -145,7 +140,7 @@ MAKEINFO_CHECK_MACROS(acronym env option) AC_PATH_PROG(INSTALL_INFO, install-info, :, $PATH /usr/sbin /sbin) # SELFAUTO -AC_ARG_ENABLE(selfauto-set, +AC_ARG_ENABLE(selfauto-set, AC_HELP_STRING([--enable-selfauto-set], [This option will make the final binary explicitly set the $SELFAUTO... variables to make it look as dvipng is installed in the @@ -202,22 +197,21 @@ AC_MSG_RESULT([ The -d (debug) switch is enabled: $enable_debug Your gd is new enough (>=2.0) to enable - the --truecolor switch, full alpha - transparency, proper rescaling of + the --truecolor switch, full alpha + transparency, proper rescaling of included bitmaps, and jpeg inclusion: $ac_cv_func_gdImageCreateTrueColor Your gd has jpeg inclusion enabled: $ac_cv_func_gdImageCreateFromJpeg - Your gd is new enough (>=2.0.12) to + Your gd is new enough (>=2.0.12) to enable transparent backgrounds for EPS inclusion and the -z (compression) switch: $ac_cv_func_gdImagePngEx Your gd is new enough (>=2.0.21) to allow image creation from memory $ac_cv_func_gdImageCreateFromPngPtr Your gd is new enough (>=2.0.28) to - enable gif inclusion and output + enable gif inclusion and output (dvigif): $ac_cv_func_gdImageGif FreeType font rendering available: $ac_have_freetype2 Support for subfonts (CJK-LaTeX): $ac_have_freetype2 - T1lib font rendering available: $ac_cv_lib_t1_T1_InitLib ]) AC_CONFIG_HEADER([config.h]) diff --git a/Build/source/texk/dvipng/dvipng-1.14/draw.c b/Build/source/texk/dvipng/dvipng-1.15/draw.c index a32bd9f19c2..6f772b92204 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/draw.c +++ b/Build/source/texk/dvipng/dvipng-1.15/draw.c @@ -18,7 +18,7 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2010 Jan-Åke Larsson + Copyright (C) 2002-2015 Jan-Åke Larsson ************************************************************************/ @@ -28,7 +28,7 @@ #include <ctype.h> /* isprint */ #endif -struct stack_entry { +struct stack_entry { dviunits h, v, w, x, y, z; /* stack entry */ subpixels hh,vv; } stack[STACK_SIZE+1]; /* stack + space for current pos */ @@ -49,7 +49,7 @@ struct stack_entry* dvi_stack=stack; DEBUG_PRINT(DEBUG_DVI, \ (" drift (%d,%d)", \ dvi_stack->hh-PIXROUND(dvi_stack->h,dvi->conv*shrinkfactor), \ - dvi_stack->vv-PIXROUND(dvi_stack->v,dvi->conv*shrinkfactor))); + dvi_stack->vv-PIXROUND(dvi_stack->v,dvi->conv*shrinkfactor))); #define MoveRight(x) \ temp=x; dvi_stack->h += temp; \ @@ -77,7 +77,7 @@ dviunits SetChar(int32_t c) { struct char_entry* ptr=NULL; - if (currentfont==NULL) + if (currentfont==NULL) Fatal("faulty DVI, trying to set character from null font"); if (c<0 || c>LASTFNTCHAR) { Warning("glyph index out of range (%d), skipping",c); @@ -92,7 +92,6 @@ dviunits SetChar(int32_t c) switch (currentfont->type) { case FONT_TYPE_VF: DEBUG_PRINT(DEBUG_DVI,("\n VF CHAR:\t")); break; case FONT_TYPE_PK: DEBUG_PRINT(DEBUG_DVI,("\n PK CHAR:\t")); break; - case FONT_TYPE_T1: DEBUG_PRINT(DEBUG_DVI,("\n T1 CHAR:\t")); break; case FONT_TYPE_FT: DEBUG_PRINT(DEBUG_DVI,("\n FT CHAR:\t")); break; default: DEBUG_PRINT(DEBUG_DVI,("\n NO CHAR:\t")) } @@ -104,12 +103,9 @@ dviunits SetChar(int32_t c) if (currentfont->type==FONT_TYPE_VF) { return(SetVF(ptr)); } else { - if (ptr->data == NULL) + if (ptr->data == NULL) switch(currentfont->type) { case FONT_TYPE_PK: LoadPK(c, ptr); break; -#ifdef HAVE_LIBT1 - case FONT_TYPE_T1: LoadT1(c, ptr); break; -#endif #ifdef HAVE_FT2 case FONT_TYPE_FT: LoadFT(c, ptr); break; #endif @@ -156,7 +152,7 @@ void DrawCommand(unsigned char* command, void* parent /* dvi/vf */) dvi_stack->h += temp; dvi_stack->hh += PIXROUND(temp,dvi->conv*shrinkfactor); CHECK_MAXDRIFT(dvi_stack->h,dvi_stack->hh); - } + } break; case SET_RULE: DEBUG_PRINT(DEBUG_DVI,(" %d %d", @@ -245,11 +241,13 @@ void DrawCommand(unsigned char* command, void* parent /* dvi/vf */) DEBUG_PRINT(DEBUG_DVI,(" %d", UNumRead(command+1, dvi_commandlength[*command]-1))); SetSpecial((char*)command + dvi_commandlength[*command], + (char*)command + dvi_commandlength[*command] + +UNumRead(command+1, dvi_commandlength[*command]-1), dvi_stack->hh,dvi_stack->vv); break; case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: if (((struct font_entry*)parent)->type==DVI_TYPE) { - FontDef(command, parent); + FontDef(command, parent); } else { Fatal("%s within VF macro from %s",dvi_commands[*command], ((struct font_entry*)parent)->n); @@ -290,7 +288,7 @@ void EndVFMacro(void) } -static void DrawPage(dviunits hoffset, dviunits voffset) +static void DrawPage(dviunits hoffset, dviunits voffset) /* To be used after having read BOP and will exit cleanly when * encountering EOP. */ @@ -310,7 +308,7 @@ static void DrawPage(dviunits hoffset, dviunits voffset) DrawCommand(command,dvi); command=DVIGetCommand(dvi); DEBUG_PRINT(DEBUG_DVI,("DRAW CMD:\t%s", dvi_commands[*command])); - } + } } void DrawPages(void) @@ -340,7 +338,7 @@ void DrawPages(void) y_offset_def=y_offset_tightpage; } if (x_width_def >= 0) { /* extend BBOX */ - min(x_min,-x_offset_def); + min(x_min,-x_offset_def); max(x_max,x_min + x_width_def); min(y_min,-y_offset_def); max(y_max,y_min + y_width_def); @@ -348,7 +346,7 @@ void DrawPages(void) if (x_width_def <= 0 || option_flags & EXPAND_BBOX) { x_width = x_max-x_min; y_width = y_max-y_min; - x_offset = -x_min; /* offset by moving topleft corner */ + x_offset = -x_min; /* offset by moving topleft corner */ y_offset = -y_min; /* offset by moving topleft corner */ } else { x_width=x_width_def; @@ -363,7 +361,7 @@ void DrawPages(void) DEBUG_PRINT(DEBUG_DVI,("\n@%d PAGE START:\tBOP",dvi_pos->offset)); { int i; - for (i=0;i<10;i++) + for (i=0;i<10;i++) DEBUG_PRINT(DEBUG_DVI,(" %d",dvi_pos->count[i])); DEBUG_PRINT(DEBUG_DVI,(" (%d)\n",dvi_pos->count[10])); } diff --git a/Build/source/texk/dvipng/dvipng-1.14/dvi.c b/Build/source/texk/dvipng/dvipng-1.15/dvi.c index a20290ecfd9..7221c315c00 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/dvi.c +++ b/Build/source/texk/dvipng/dvipng-1.15/dvi.c @@ -18,14 +18,14 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2010 Jan-Åke Larsson + Copyright (C) 2002-2015 Jan-Åke Larsson ************************************************************************/ #include "dvipng.h" #ifdef MIKTEX # include <gnu-miktex.h> -# define SLEEP Sleep(1000) +# define USLEEP Sleep #else /* MIKTEX */ # ifdef HAVE_LIBGEN_H # include <libgen.h> @@ -33,13 +33,15 @@ # define basename xbasename # endif # ifdef WIN32 -# define SLEEP Sleep(1000) +# define USLEEP Sleep # include <stdlib.h> # else -# define SLEEP sleep(1) +# include <unistd.h> +# define USLEEP usleep # endif /* WIN32 */ #endif /* MIKTEX */ #include <sys/stat.h> +#include <fcntl.h> bool followmode=0; @@ -50,11 +52,14 @@ bool DVIFollowToggle(void) static unsigned char fgetc_follow(FILE* fp) { - int got=fgetc(fp); + int got=fgetc(fp),nsleep=1; while(followmode && got==EOF) { - SLEEP; + USLEEP(nsleep/1310); /* After a few trials, poll every 65536/1310=50 usec */ + clearerr(fp); got=fgetc(fp); + if (nsleep<50000) + nsleep*=2; } if (got==EOF) Fatal("DVI file ends prematurely"); @@ -107,41 +112,34 @@ struct dvi_data* DVIOpen(char* dviname,char* outname) struct dvi_data* dvi; if ((dvi = calloc(1,sizeof(struct dvi_data)))==NULL) - Fatal("cannot malloc memory for DVI struct"); - + Fatal("cannot allocate memory for DVI struct"); dvi->type = DVI_TYPE; dvi->fontnump=NULL; - - dvi->name = malloc(strlen(dviname)+5); - if (dvi->name==NULL) - Fatal("cannot malloc space for DVI filename"); + if ((dvi->name = malloc(strlen(dviname)+5))==NULL) + Fatal("cannot allocate space for DVI filename"); strcpy(dvi->name, dviname); tmpstring = strrchr(dvi->name, '.'); - if (tmpstring == NULL || strcmp(tmpstring,".dvi") != 0) + if (tmpstring == NULL || strcmp(tmpstring,".dvi") != 0) strcat(dvi->name, ".dvi"); - - if (outname==NULL) { - dvi->outname = malloc(strlen(basename(dviname))+7); - if (dvi->outname==NULL) { + if (outname==NULL) { + if ((dvi->outname = malloc(strlen(basename(dviname))+7))==NULL) { free(dvi->name); free(dvi); - Fatal("cannot malloc space for output filename"); + Fatal("cannot allocate space for output filename"); } strcpy(dvi->outname,basename(dviname)); tmpstring = strrchr(dvi->outname, '.'); - if (tmpstring != NULL && strcmp(tmpstring,".dvi") == 0) + if (tmpstring != NULL && strcmp(tmpstring,".dvi") == 0) *tmpstring = '\0'; strcat(dvi->outname, "%d.png"); } else { - dvi->outname = malloc(strlen(outname)+1); - if (dvi->outname==NULL) { + if ((dvi->outname = malloc(strlen(outname)+1))==NULL) { free(dvi->name); free(dvi); - Fatal("cannot malloc space for output filename"); + Fatal("cannot allocate space for output filename"); } strcpy(dvi->outname,outname); } - if ((dvi->filep = fopen(dvi->name,"rb")) == NULL) { /* do not insist on .dvi */ tmpstring = strrchr(dvi->name, '.'); @@ -149,7 +147,7 @@ struct dvi_data* DVIOpen(char* dviname,char* outname) dvi->filep = fopen(dvi->name,"rb"); } while((dvi->filep == NULL) && followmode) { - SLEEP; + USLEEP(50); *tmpstring='.'; if ((dvi->filep = fopen(dvi->name,"rb")) == NULL) { /* do not insist on .dvi */ @@ -173,7 +171,7 @@ unsigned char* DVIGetCommand(struct dvi_data* dvi) /* This function reads in and stores the next dvi command. */ /* Mmap is not appropriate here, we may want to read from half-written files. */ -{ +{ static unsigned char* command=NULL; static uint32_t commlen=0; unsigned char *current = command; @@ -183,21 +181,21 @@ unsigned char* DVIGetCommand(struct dvi_data* dvi) if (commlen==0) { commlen=STRSIZE; if ((current=command=malloc(commlen))==NULL) - Fatal("cannot malloc memory for DVI command"); + Fatal("cannot allocate memory for DVI command"); } DEBUG_PRINT(DEBUG_DVI,("\n@%ld ", ftell(dvi->filep))); *(current++) = fgetc_follow(dvi->filep); length = dvi_commandlength[*command]; if (length < 0) Fatal("undefined DVI op-code %d",*command); - while(current < command+length) + while(current < command+length) *(current++) = fgetc_follow(dvi->filep); switch (*command) { case XXX4: strlength = *(current - 4); case XXX3: strlength = strlength * 256 + *(current - 3); - case XXX2: + case XXX2: strlength = strlength * 256 + *(current - 2); case XXX1: strlength = strlength * 256 + *(current - 1); @@ -205,7 +203,7 @@ unsigned char* DVIGetCommand(struct dvi_data* dvi) case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: strlength = *(current - 1) + *(current - 2); break; - case PRE: + case PRE: strlength = *(current - 1); break; } @@ -214,10 +212,10 @@ unsigned char* DVIGetCommand(struct dvi_data* dvi) /* string + command length exceeds that of buffer */ commlen=strlength+1 + (uint32_t)length; if ((command=realloc(command,commlen))==NULL) - Fatal("cannot malloc memory for DVI command"); + Fatal("cannot allocate memory for DVI command"); current = command + length; } - while(current < command+length+strlength) + while(current < command+length+strlength) *(current++) = fgetc_follow(dvi->filep); *current='\0'; } @@ -229,7 +227,7 @@ bool DVIIsNextPSSpecial(struct dvi_data* dvi) special */ /* Mmap is not appropriate here, we may want to read from half-written files. */ -{ +{ long fpos; uint32_t strlength=0; bool israwps=false; @@ -241,15 +239,15 @@ bool DVIIsNextPSSpecial(struct dvi_data* dvi) strlength = fgetc_follow(dvi->filep); case XXX3: strlength = strlength * 256 + fgetc_follow(dvi->filep); - case XXX2: + case XXX2: strlength = strlength * 256 + fgetc_follow(dvi->filep); case XXX1: strlength = strlength * 256 + fgetc_follow(dvi->filep); } - if (strlength > 0) { + if (strlength > 0) { switch(fgetc_follow(dvi->filep)) { case 'p': - if (strlength > 2 + if (strlength > 2 && fgetc_follow(dvi->filep)=='s' && fgetc_follow(dvi->filep)==':') israwps=true; @@ -263,19 +261,19 @@ bool DVIIsNextPSSpecial(struct dvi_data* dvi) } uint32_t CommandLength(unsigned char* command) -{ +{ /* generally 2^32+5 bytes max, but in practice 32 bit numbers suffice */ uint32_t length=0; length = dvi_commandlength[*command]; switch (*command) { - case XXX1: case XXX2: case XXX3: case XXX4: + case XXX1: case XXX2: case XXX3: case XXX4: length += UNumRead(command + 1,length - 1); break; - case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: + case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: length += *(command + length - 1) + *(command + length - 2); break; - case PRE: + case PRE: length += *(command + length - 1); break; } @@ -283,9 +281,9 @@ uint32_t CommandLength(unsigned char* command) } static void SkipPage(struct dvi_data* dvi) -{ +{ /* Skip present page */ - unsigned char* command; + unsigned char* command; command=DVIGetCommand(dvi); while (*command != EOP) { @@ -297,7 +295,10 @@ static void SkipPage(struct dvi_data* dvi) case XXX1: case XXX2: case XXX3: case XXX4: DEBUG_PRINT(DEBUG_DVI,("NOSKIP CMD:\t%s %d", dvi_commands[*command], UNumRead(command+1, dvi_commandlength[*command]-1))); - SetSpecial((char*)command + dvi_commandlength[*command],0,0); + SetSpecial((char*)command + dvi_commandlength[*command], + (char*)command + dvi_commandlength[*command] + +UNumRead(command+1, dvi_commandlength[*command]-1), + 0,0); break; case BOP: case PRE: case POST: case POST_POST: Fatal("%s occurs within page", dvi_commands[*command]); @@ -316,7 +317,7 @@ static struct page_list* InitPage(struct dvi_data* dvi) { /* Find page start, return pointer to page_list entry if found */ struct page_list* tpagelistp=NULL; - unsigned char* command; + unsigned char* command; command=DVIGetCommand(dvi); /* Skip until page start or postamble */ @@ -334,10 +335,10 @@ static struct page_list* InitPage(struct dvi_data* dvi) } command=DVIGetCommand(dvi); } - if ((tpagelistp = + if ((tpagelistp = malloc(sizeof(struct page_list) +(csp+1-2)*sizeof(struct dvi_color)))==NULL) - Fatal("cannot malloc memory for new page entry"); + Fatal("cannot allocate memory for new page entry"); tpagelistp->next = NULL; if ( *command == BOP ) { /* Init page */ int i; @@ -348,7 +349,7 @@ static struct page_list* InitPage(struct dvi_data* dvi) tpagelistp->count[i] = UNumRead(command + 1 + i*4, 4); DEBUG_PRINT(DEBUG_DVI,(" %d",tpagelistp->count[i])); } - if (dvi->pagelistp==NULL) + if (dvi->pagelistp==NULL) tpagelistp->count[10] = 1; else tpagelistp->count[10] = dvi->pagelistp->count[10]+1; @@ -365,7 +366,7 @@ static struct page_list* InitPage(struct dvi_data* dvi) int SeekPage(struct dvi_data* dvi, struct page_list* page) { ReadColorStack(page); - return(fseek(dvi->filep, + return(fseek(dvi->filep, page->offset+((page->count[0]==PAGE_POST) ? 1L : 45L), SEEK_SET)); } @@ -375,7 +376,7 @@ struct page_list* NextPage(struct dvi_data* dvi, struct page_list* page) struct page_list* tpagelistp; /* if page points to POST there is no next page */ - if (page!=NULL && page->count[0]==PAGE_POST) + if (page!=NULL && page->count[0]==PAGE_POST) return(NULL); /* If we have read past the last page in our current list or the @@ -415,18 +416,18 @@ struct page_list* PrevPage(struct dvi_data* dvi, struct page_list* page) struct page_list* FindPage(struct dvi_data* dvi, int32_t pagenum, bool abspage) - /* Find first page of certain number, + /* Find first page of certain number, absolute number if abspage is set */ { struct page_list* page=NextPage(dvi, NULL); - + if (pagenum==PAGE_LASTPAGE || pagenum==PAGE_POST) { while(page!=NULL && page->count[0]!=PAGE_POST) page=NextPage(dvi,page); if (pagenum==PAGE_LASTPAGE) page=PrevPage(dvi,page); } else - if (pagenum!=PAGE_FIRSTPAGE) + if (pagenum!=PAGE_FIRSTPAGE) while(page != NULL && pagenum != page->count[abspage ? 0 : 10]) page=NextPage(dvi,page); return(page); @@ -436,7 +437,7 @@ struct page_list* FindPage(struct dvi_data* dvi, int32_t pagenum, bool abspage) static void DelPageList(struct dvi_data* dvi) { struct page_list* temp; - + /* Delete the page list */ temp=dvi->pagelistp; @@ -469,7 +470,7 @@ bool DVIReOpen(struct dvi_data* dvi) DelPageList(dvi); ClearPSHeaders(); while(((dvi->filep = fopen(dvi->name,"rb")) == NULL) && followmode) { - SLEEP; + USLEEP(50); } if (dvi->filep == NULL) { perror(dvi->name); diff --git a/Build/source/texk/dvipng/dvipng-1.14/dvipng.1 b/Build/source/texk/dvipng/dvipng-1.15/dvipng.1 index 44537c4e8b7..be24b6ad2ee 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/dvipng.1 +++ b/Build/source/texk/dvipng/dvipng-1.15/dvipng.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== @@ -38,6 +38,8 @@ . ds PI \(*p . ds L" `` . ds R" '' +. ds C` +. ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. @@ -48,17 +50,24 @@ .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX .. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} .\} +.rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -124,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DVIPNG 1" -.TH DVIPNG 1 "2010-10-23" "dvipng 1.14" "User commands" +.TH DVIPNG 1 "2015-02-23" "dvipng 1.15" "User commands" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -145,24 +154,24 @@ If \s-1GIF\s0 support is enabled, \s-1GIF\s0 output is chosen by using the \&\fBdvigif\fR binary or with the \fB\-\-gif\fR option. .PP The benefits of \fBdvipng\fR/\fBdvigif\fR include -.IP "\(bu" 4 +.IP "*" 4 Speed. It is a very fast bitmap-rendering code for \s-1DVI\s0 files, which makes it suitable for generating large amounts of images on-the-fly, as needed in preview-latex, WeBWorK and others. -.IP "\(bu" 4 +.IP "*" 4 It does not read the postamble, so it can be started before TeX finishes. There is a \fB\-\-follow\fR switch that makes dvipng wait at end-of-file for further output, unless it finds the \s-1POST\s0 marker that -indicates the end of the \s-1DVI\s0. -.IP "\(bu" 4 +indicates the end of the \s-1DVI.\s0 +.IP "*" 4 Interactive query of options. dvipng can read options interactively through stdin, and all options are usable. It is even possible to change the input file through this interface. -.IP "\(bu" 4 -Supports \s-1PK\s0, \s-1VF\s0, PostScript Type1, and TrueType fonts, subfonts (i.e., +.IP "*" 4 +Supports \s-1PK, VF,\s0 PostScript Type1, and TrueType fonts, subfonts (i.e., as used in CJK-LaTeX), color specials, and inclusion of PostScript, -\&\s-1PNG\s0, \s-1JPEG\s0 or \s-1GIF\s0 images. -.IP "\(bu" 4 +\&\s-1PNG, JPEG\s0 or \s-1GIF\s0 images. +.IP "*" 4 and more... .SH "OPTIONS" .IX Header "OPTIONS" @@ -205,7 +214,7 @@ below). .IP "\fB\-bg\fR \fIcolor_spec\fR" 4 .IX Item "-bg color_spec" Choose background color for the images. This option will be ignored if -there is a background color \especial in the \s-1DVI\s0. The color spec should +there is a background color \especial in the \s-1DVI.\s0 The color spec should be in TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. You can also specify 'Transparent' or 'transparent' which will give you a transparent background with the normal background as a fallback color. A @@ -267,7 +276,7 @@ numbers rather than the physical page number. See the \fB\-o\fR switch. .IP "\fB\-fg\fR \fIcolor_spec\fR" 4 .IX Item "-fg color_spec" Choose foreground color for the images. This option will be ignored if -there is a foreground color \especial in the \s-1DVI\s0. The color spec should +there is a foreground color \especial in the \s-1DVI.\s0 The color spec should be in TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. .IP "\fB\-\-follow*\fR" 4 .IX Item "--follow*" @@ -275,7 +284,7 @@ Wait for data at end-of-file. One of the benefits of dvipng is that it does not read the postamble, so it can be started before TeX finishes. This switch makes dvipng wait at end-of-file for further output, unless it finds the \s-1POST\s0 marker that indicates the end of the -\&\s-1DVI\s0. This is similar to \fBtail \-f\fR but for DVI-to-PNG conversion. +\&\s-1DVI.\s0 This is similar to \fBtail \-f\fR but for DVI-to-PNG conversion. .IP "\fB\-\-freetype*\fR" 4 .IX Item "--freetype*" Enable/disable FreeType font rendering (default on). This option is @@ -286,9 +295,7 @@ for rendering the fonts. If you have PostScript versions of Computer Modern installed, there will be no need to generate bitmapped (\s-1PK\s0) variants on disk of these. Then, you can render images at different (and unusual) resolutions without cluttering the disk with lots of bitmapped -fonts. Note that if you have both FreeType and T1lib on your system, -FreeType will be preferred by dvipng. If you for some reason would want -to use T1lib rendering, use this option. +fonts. .IP "\fB\-\-gamma\fR \fInum\fR" 4 .IX Item "--gamma num" Control the interpolation of colors in the greyscale anti-aliasing @@ -421,7 +428,7 @@ output; report no warnings (only errors) to standard error. .IP "\fB\-Q\fR \fInum\fR" 4 .IX Item "-Q num" Set the quality to \fInum\fR. That is, choose the number of antialiasing -levels for bitmapped fonts (\s-1PK\s0) and fonts rendered using T1lib, to be +levels for bitmapped fonts (\s-1PK\s0), to be \&\fInum\fR*\fInum\fR+1. The default value is 4 which gives 17 levels of antialiasing for antialiased fonts from these two. If FreeType is available, its rendering is unaffected by this option. @@ -446,24 +453,11 @@ and in addition the \s-1DVI\s0 origin, located 1in from the top and 1in from the left edge of the paper. This usually gives whitespace above and to the left in the produced image. The value \fBtight\fR will make dvipng only include all ink put on the page, producing neat images. -.IP "\fB\-\-t1lib*\fR" 4 -.IX Item "--t1lib*" -Enable T1lib font rendering (default on). This option is available if -the T1lib font library was present at compilation time. If this is the -case, dvipng will have direct support for PostScript Type1 fonts -internally, rather than using \fBgsftopk\fR for rendering the fonts. If -you have PostScript versions of Computer Modern installed, there will be -no need to generate bitmapped variants on disk of these. Then, you can -render images at different (and unusual) resolutions without cluttering -the disk with lots of bitmapped fonts. Note that if you have both -FreeType and T1lib on your system, FreeType will be preferred by dvipng, -and if you for some reason rather want to use T1lib, give the option -\&\fB\-\-freetype0\fR (see above). .IP "\fB\-\-truecolor*\fR" 4 .IX Item "--truecolor*" This will make \fBdvipng\fR generate truecolor output. Note that truecolor output is automatic if you include an external image in your -\&\s-1DVI\s0, e.g., via a PostScript special (i.e., the \fBgraphics\fR or +\&\s-1DVI,\s0 e.g., via a PostScript special (i.e., the \fBgraphics\fR or \&\fBgraphicx\fR package). This switch is overridden by the \&\fB\-\-palette\fR switch. .IP "\fB\-v*\fR" 4 @@ -510,4 +504,4 @@ This program is released under the \s-1GNU\s0 Lesser General Public License version 3, see the \s-1COPYING\s0 file in the dvipng distribution or <\fBhttp://www.gnu.org/licenses/gpl.html\fR>. .PP -Copyright (c) 2002\-2010 Jan-AAke Larsson +Copyright (c) 2002\-2015 Jan-AAke Larsson diff --git a/Build/source/texk/dvipng/dvipng-1.14/dvipng.c b/Build/source/texk/dvipng/dvipng-1.15/dvipng.c index 2c9179ba7a3..43f4791f4f8 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/dvipng.c +++ b/Build/source/texk/dvipng/dvipng-1.15/dvipng.c @@ -18,7 +18,7 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2008 Jan-Åke Larsson + Copyright (C) 2002-2015 Jan-Åke Larsson ************************************************************************/ @@ -36,7 +36,7 @@ int main(int argc, char ** argv) { bool parsestdin; - + #ifdef TIMING # ifdef HAVE_GETTIMEOFDAY gettimeofday(&Tp, NULL); @@ -99,7 +99,7 @@ int main(int argc, char ** argv) kpse_init_prog("DVIPNG", 300, "cx", "cmr10"); #endif -#ifdef HAVE_FT2_OR_LIBT1 +#ifdef HAVE_FT2 InitPSFontMap(); #endif @@ -109,15 +109,13 @@ int main(int argc, char ** argv) char line[STRSIZE]; printf("%s> ",dvi!=NULL?dvi->name:""); - fgets(line,STRSIZE,stdin); - while(!feof(stdin)) { + while(fgets(line,STRSIZE,stdin)) { DecodeString(line); if (dvi!=NULL) { DVIReOpen(dvi); DrawPages(); } printf("%s> ",dvi!=NULL?dvi->name:""); - fgets(line,STRSIZE,stdin); } printf("\n"); } @@ -132,12 +130,12 @@ int main(int argc, char ** argv) timer = timebuffer.time + timebuffer.millitm/1000.0 - timer; # endif # endif - - if (ndone > 0) + + if (ndone > 0) fprintf(stderr, "Time of complete run: %.2f s, %d page(s), %.4f s/page.\n", timer, ndone, timer / ndone); - if (my_toc >= 0.0001) + if (my_toc >= 0.0001) fprintf(stderr, "Thereof in TIC/TOC region %.5f s.\n",my_toc); #endif @@ -145,24 +143,14 @@ int main(int argc, char ** argv) ClearFonts(); DVIClose(dvi); ClearColorNames(); -#ifdef HAVE_FT2_OR_LIBT1 +#ifdef HAVE_FT2 ClearPSFontMap(); ClearEncoding(); -#endif -#ifdef HAVE_FT2 ClearSubfont(); - if (libfreetype!=NULL && FT_Done_FreeType(libfreetype)) - Fatal("an error occured during freetype destruction"); + if (libfreetype!=NULL && FT_Done_FreeType(libfreetype)) + Fatal("an error occured during freetype destruction"); libfreetype = NULL; -#endif -#ifdef HAVE_LIBT1 - if (libt1!=NULL && T1_CloseLib()) - Fatal("an error occured during t1lib destruction"); - libt1 = NULL; -#endif +#endif exit(exitcode); } - - - diff --git a/Build/source/texk/dvipng/dvipng-1.14/dvipng.h b/Build/source/texk/dvipng/dvipng-1.15/dvipng.h index 81845a82c2d..9b5c5684730 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/dvipng.h +++ b/Build/source/texk/dvipng/dvipng-1.15/dvipng.h @@ -18,7 +18,7 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2010 Jan-Åke Larsson + Copyright (C) 2002-2015 Jan-Åke Larsson ************************************************************************/ @@ -26,13 +26,6 @@ #define DVIPNG_H #include "config.h" -/* Autoconf may define malloc to rpl_malloc, if the system does not - * have a GNU Libc-compatible malloc (for which malloc(0) gives a - * valid pointer). We don't need that (yet) */ -#ifdef malloc -# undef malloc -#endif - #define STRSIZE 255 /* stringsize for file specifications */ #define FIRSTFNTCHAR 0 @@ -79,16 +72,10 @@ typedef unsigned long long uint64_t; #endif #ifdef HAVE_FT2 -#define HAVE_FT2_OR_LIBT1 -#include <ft2build.h> +#include <ft2build.h> #include FT_FREETYPE_H #endif -#ifdef HAVE_LIBT1 -#define HAVE_FT2_OR_LIBT1 -#include <t1lib.h> -#endif - #ifdef HAVE_STDBOOL_H # include <stdbool.h> #else @@ -158,7 +145,7 @@ struct dvi_data { /* dvi entry */ #define PAGE_POST INT32_MAX #define PAGE_LASTPAGE INT32_MAX-1 #define PAGE_MAXPAGE INT32_MAX-2 /* assume no pages out of this range */ -#define PAGE_FIRSTPAGE INT32_MIN +#define PAGE_FIRSTPAGE INT32_MIN #define PAGE_MINPAGE INT32_MIN+1 /* assume no pages out of this range */ struct dvi_color { @@ -186,7 +173,7 @@ int SeekPage(struct dvi_data*, struct page_list*); bool DVIFollowToggle(void); unsigned char* DVIGetCommand(struct dvi_data*); bool DVIIsNextPSSpecial(struct dvi_data*); -uint32_t CommandLength(unsigned char*); +uint32_t CommandLength(unsigned char*); void ClearPSHeaders(void); /********************************************************/ @@ -237,28 +224,21 @@ struct subfont { int32_t charindex[256]; }; -#ifdef HAVE_FT2_OR_LIBT1 +#ifdef HAVE_FT2 struct psfontmap { struct psfontmap *next; char *line,*psfile,*tfmname,*encname,*end; struct encoding* encoding; -#ifdef HAVE_FT2 FT_Matrix* ft_transformp; FT_Matrix ft_transform; struct subfont* subfont; -#endif -#ifdef HAVE_LIBT1 - T1_TMATRIX* t1_transformp; - T1_TMATRIX t1_transform; -#endif }; #endif #define FONT_TYPE_PK 1 #define FONT_TYPE_VF 2 #define FONT_TYPE_FT 3 -#define FONT_TYPE_T1 4 -struct char_entry { /* PK/FT/T1 Glyph/VF Macro */ +struct char_entry { /* PK/FT Glyph/VF Macro */ dviunits tfmw; /* TFM width */ unsigned char *data; /* glyph data, either pixel data * (0=transp, 255=max ink) or VF macro */ @@ -274,22 +254,17 @@ struct char_entry { /* PK/FT/T1 Glyph/VF Macro */ struct font_entry { /* font entry */ int type; /* PK/VF/Type1 ... */ struct font_entry *next; - uint32_t c, s, d; - uint8_t a, l; + uint32_t c, s, d; + uint8_t a, l; char n[STRSIZE]; /* FNT_DEF command parameters */ int dpi; /* computed from s and d */ char * name; /* full name of PK/VF file */ struct filemmap fmmap; /* file memory map */ uint32_t magnification; /* magnification read from font file */ uint32_t designsize; /* design size read from font file */ - void * chr[NFNTCHARS]; /* character information */ + void * chr[NFNTCHARS]; /* character information */ #ifdef HAVE_FT2 FT_Face face; /* Freetype2 face */ -#endif -#ifdef HAVE_LIBT1 - int T1id; /* T1lib font id */ -#endif -#ifdef HAVE_FT2_OR_LIBT1 struct psfontmap* psfontmap; /* Font transformation */ #endif struct font_num *vffontnump; /* VF local font numbering */ @@ -311,10 +286,10 @@ void DoneVF(struct font_entry *oldfontp); void FontDef(unsigned char*, void* /* dvi/vf */); void ClearFonts(void); -void SetFntNum(int32_t, void* /* dvi/vf */); +void SetFntNum(int32_t, void* /* dvi/vf */); void FreeFontNumP(struct font_num *hfontnump); -#ifdef HAVE_FT2_OR_LIBT1 +#ifdef HAVE_FT2 char* copyword(char* orig); struct psfontmap *NewPSFont(struct psfontmap* copyfrom); void InitPSFontMap(void); @@ -323,9 +298,6 @@ struct psfontmap* FindPSFontMap(char*); struct encoding* FindEncoding(char*); void ClearEncoding(void); bool ReadTFM(struct font_entry *, char*); -#endif - -#ifdef HAVE_FT2 bool InitFT(struct font_entry *); void DoneFT(struct font_entry *tfontp); void LoadFT(int32_t, struct char_entry *); @@ -333,12 +305,6 @@ struct psfontmap* FindSubFont(struct psfontmap* entry, char* fontname); void ClearSubfont(void); #endif -#ifdef HAVE_LIBT1 -bool InitT1(struct font_entry *); -void DoneT1(struct font_entry *tfontp); -void LoadT1(int32_t, struct char_entry *); -#endif - /********************************************************/ /********************* ppagelist.h ********************/ /********************************************************/ @@ -368,7 +334,7 @@ struct page_list* NextPPage(void* /* dvi */, struct page_list*); void CreateImage(pixels width, pixels height); void DestroyImage(void); -void DrawCommand(unsigned char*, void* /* dvi/vf */); +void DrawCommand(unsigned char*, void* /* dvi/vf */); void DrawPages(void); void WriteImage(char*, int); void LoadPK(int32_t, register struct char_entry *); @@ -377,7 +343,7 @@ dviunits SetGlyph(struct char_entry *ptr, int32_t hh,int32_t vv); void Gamma(double gamma); int32_t SetVF(struct char_entry *ptr); int32_t SetRule(int32_t, int32_t, int32_t, int32_t); -void SetSpecial(char *, int32_t, int32_t); +void SetSpecial(char *, char *, int32_t, int32_t); void BeginVFMacro(struct font_entry*); void EndVFMacro(void); @@ -422,21 +388,20 @@ EXTERN struct internal_state { #define TIGHT_BBOX (1<<4) #define FORCE_TRUECOLOR (1<<5) #define USE_FREETYPE (1<<6) -#define USE_LIBT1 (1<<7) -#define REPORT_HEIGHT (1<<8) -#define REPORT_DEPTH (1<<9) -#define REPORT_WIDTH (1<<10) -#define DVI_PAGENUM (1<<11) -#define MODE_PICKY (1<<12) -#define GIF_OUTPUT (1<<13) -#define MODE_STRICT (1<<14) -#define NO_GHOSTSCRIPT (1<<15) -#define NO_GSSAFER (1<<16) -#define BG_TRANSPARENT (1<<17) -#define BG_TRANSPARENT_ALPHA (1<<18) -#define FORCE_PALETTE (1<<19) -#define NO_RAW_PS (1<<20) -EXTERN uint32_t option_flags INIT(BE_NONQUIET | USE_FREETYPE | USE_LIBT1); +#define REPORT_HEIGHT (1<<7) +#define REPORT_DEPTH (1<<8) +#define REPORT_WIDTH (1<<9) +#define DVI_PAGENUM (1<<10) +#define MODE_PICKY (1<<11) +#define GIF_OUTPUT (1<<12) +#define MODE_STRICT (1<<13) +#define NO_GHOSTSCRIPT (1<<14) +#define NO_GSSAFER (1<<15) +#define BG_TRANSPARENT (1<<16) +#define BG_TRANSPARENT_ALPHA (1<<17) +#define FORCE_PALETTE (1<<18) +#define NO_RAW_PS (1<<19) +EXTERN uint32_t option_flags INIT(BE_NONQUIET | USE_FREETYPE); #define PAGE_GAVE_WARN 1 #define PAGE_PREVIEW_BOP (1<<1) @@ -456,8 +421,7 @@ EXTERN unsigned int debug INIT(0); #define DEBUG_ENC (1<<6) #define DEBUG_COLOR (1<<7) #define DEBUG_GS (1<<8) -#define DEBUG_T1 (1<<9) -#define LASTDEBUG DEBUG_T1 +#define LASTDEBUG DEBUG_GS #define DEBUG_DEFAULT DEBUG_DVI #else #define DEBUG_PRINT(a,b) @@ -511,13 +475,13 @@ EXTERN int compression INIT(1); # define min(x,y) if ((y)<(x)) x = y /* These are in pixels*/ -EXTERN int x_min INIT(0); +EXTERN int x_min INIT(0); EXTERN int y_min INIT(0); EXTERN int x_max INIT(0); EXTERN int y_max INIT(0); /* Page size: default set by -T */ -EXTERN int x_width_def INIT(0); +EXTERN int x_width_def INIT(0); EXTERN int y_width_def INIT(0); /* Offset: default set by -O and -T bbox */ @@ -525,14 +489,14 @@ EXTERN int x_offset_def INIT(0); EXTERN int y_offset_def INIT(0); /* Preview-latex's tightpage */ -EXTERN int x_width_tightpage INIT(0); +EXTERN int x_width_tightpage INIT(0); EXTERN int y_width_tightpage INIT(0); EXTERN int x_offset_tightpage INIT(0); EXTERN int y_offset_tightpage INIT(0); /* Paper size: set by -t, for cropmark purposes only */ /* This has yet to be written */ -EXTERN int x_pwidth INIT(0); +EXTERN int x_pwidth INIT(0); EXTERN int y_pwidth INIT(0); /* The transparent border preview-latex desires */ @@ -556,10 +520,6 @@ EXTERN struct dvi_data* dvi INIT(NULL); EXTERN FT_Library libfreetype INIT(NULL); #endif -#ifdef HAVE_LIBT1 -EXTERN void* libt1 INIT(NULL); -#endif - #define EXIT_FATAL EXIT_FAILURE+1 EXTERN int exitcode INIT(EXIT_SUCCESS); diff --git a/Build/source/texk/dvipng/dvipng-1.14/dvipng.texi b/Build/source/texk/dvipng/dvipng-1.15/dvipng.texi index 0235c349b4b..16a40ec3a0c 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/dvipng.texi +++ b/Build/source/texk/dvipng/dvipng-1.15/dvipng.texi @@ -9,8 +9,8 @@ dvipng [options] [filename] - @c man end @end ifset -@set version 1.14 -@set month-year October 2010 +@set version 1.15 +@set month-year February 2015 @c Put everything in one index (arbitrarily chosen to be the concept index). @syncodeindex fn cp @@ -39,8 +39,8 @@ dvipng [options] [filename] - @author by Jan-@AA{}ke Larsson. @page @vskip 0pt plus 1filll -Copyright @copyright{} 2002-2010 Jan-@AA{}ke Larsson - +Copyright @copyright{} 2002-2015 Jan-@AA{}ke Larsson + Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. @@ -131,7 +131,7 @@ PNG format. If there are four pages in @file{foo.dvi}, those pages will be output as @file{foo1.png}, @file{foo2.png}, @file{foo3.png}, and @file{foo4.png}, respectively. -If you have enabled the PostScript font support (via FreeType or T1lib), +If you have enabled the PostScript font support (via FreeType), fonts will be rendered as they are needed. Otherwise, dvipng will use bitmapped (PK) fonts, and if you use PK fonts that have not been used on your system before, they may be automatically generated; this process @@ -239,12 +239,12 @@ both variants will use the latter behaviour. @xref{Color}. Set the debug flags, showing what dvipng (thinks it) is doing. This will work unless dvipng has been compiled without the @code{DEBUG} option (not recommended). Set the flags as you need them, use @samp{-d -1} as -the first option for maximum output. @xref{Debug options}. +the first option for maximum output. @xref{Debug options}. @item -D @var{num} @cindex output resolution, setting Set the output resolution, both horizontal and vertical, to @var{num} -dpi (dots per inch). +dpi (dots per inch). One may want to adjust this to fit a certain text font size (e.g., on a web page), and for a text font height of @var{font_px} pixels (in @@ -258,7 +258,7 @@ proprietary browsers have font height in pt (points), not pixels. You have to rescale that to pixels, using the screen resolution (default is usually 96 dpi) which means the formula is @example -@var{font_px} = @var{font_pt} * 96 / 72 [pt * px/in / (pt/in)] +@var{font_px} = @var{font_pt} * 96 / 72 [pt * px/in / (pt/in)] @end example On some high-res screens, the value is instead 120 dpi. Good luck! @@ -346,9 +346,7 @@ for rendering the fonts. If you have PostScript versions of Computer Modern installed, there will be no need to generate bitmapped (PK) variants on disk of these. Then, you can render images at different (and unusual) resolutions without cluttering the disk with lots of bitmapped -fonts. Note that if you have both FreeType and T1lib on your system, -FreeType will be preferred by dvipng. If you for some reason would want -to use T1lib rendering, use this option. +fonts. @item --gamma @var{num} @cindex gamma @@ -408,7 +406,7 @@ Kpathsea}. @pindex mktexpk@r{, avoiding} @c this description repeated in kpathsea.texi This option only has an effect when using bitmapped (PK) fonts. It turns -off automatic PK font generation (@file{mktexpk}). +off automatic PK font generation (@file{mktexpk}). @ignore @flindex missfont.log If @code{mktexpk}, the invocation is appended to a file @@ -459,10 +457,10 @@ file was @samp{@var{file}.dvi}. @cindex offset pages Move the origin by @var{x-offset},@var{y-offset}, a comma-separated pair of dimensions such as @samp{.1in,-.3cm}. -@c (@pxref{papersize special}). +@c (@pxref{papersize special}). The origin of the page is shifted from the default position (of one inch down, one inch to the right from the upper left corner of -the paper) by this amount. +the paper) by this amount. @item -p [=]@var{num} @cindex first page printed @@ -533,7 +531,7 @@ output; report no warnings (only errors) to standard error. @cindex antialiasing levels@r{, number of} @cindex quality Set the quality to @var{num}. That is, choose the number of antialiasing -levels for bitmapped fonts (PK) and fonts rendered using T1lib, to be +levels for bitmapped fonts (PK), to be @var{num}*@var{num}+1. The default value is 4 which gives 17 levels of antialiasing for antialiased fonts from these two. If FreeType is available, its rendering is unaffected by this option. @@ -566,7 +564,7 @@ output files, and opening of any absolute filenames. Set the paper type to @var{papertype}. @c usually defined in one of the @c configuration files, along with the appropriate PostScript code to -@c select it (@pxref{Config file paper sizes}). +@c select it (@pxref{Config file paper sizes}). You can also specify a @var{papertype} of @samp{landscape}, which rotates a document by 90 degrees. To rotate a document whose paper type is not the default, you can use the @samp{-t} option twice, once for the @@ -590,23 +588,9 @@ and in addition the DVI origin, located 1in from the top and 1in from the left edge of the paper. This usually gives whitespace above and to the left in the produced image. The value @samp{tight} will make dvipng only include all ink put on the page, producing neat images. -@c (@pxref{papersize special}). +@c (@pxref{papersize special}). @c This option overrides any papersize special in the DVI file. -@item --t1lib* -@cindex T1lib font rendering -Enable T1lib font rendering (default on). This option is available if -the T1lib font library was present at compilation time. If this is the -case, dvipng will have direct support for PostScript Type1 fonts -internally, rather than using @samp{gsftopk} for rendering the fonts. If -you have PostScript versions of Computer Modern installed, there will be -no need to generate bitmapped variants on disk of these. Then, you can -render images at different (and unusual) resolutions without cluttering -the disk with lots of bitmapped fonts. Note that if you have both -FreeType and T1lib on your system, FreeType will be preferred by dvipng, -and if you for some reason rather want to use T1lib, give the option -@samp{--freetype0} (see above). - @item --truecolor* @cindex truecolor output This will make @samp{dvipng} generate truecolor output. Note that @@ -614,8 +598,8 @@ truecolor output is automatic if you include an external image in your DVI, e.g., via a PostScript special (i.e., the @samp{graphics} or @samp{graphicx} package). This switch is overridden by the @samp{--palette} switch. - -@item -v* + +@item -v* Enable verbose operation. This will currently indicate what fonts is used, in addition to the usual output. @@ -664,7 +648,7 @@ correspond directly to the zlib compression levels.'' @c man end @node Graphics -@chapter Graphics +@chapter Graphics @samp{dvipng} attempts to handle graphics as included by the @samp{graphicx} and @samp{graphics} packages, without the need of @@ -789,8 +773,8 @@ specials start with the keyword @samp{color} or the keyword @samp{background}, followed by a color specification. @menu -* Color specifications:: -* Color specials:: +* Color specifications:: +* Color specials:: @end menu @@ -804,9 +788,9 @@ by-value spec starts with the name of a color model (one of @samp{rgb}, @samp{hsb}, @samp{cmy}, @samp{cmyk}, or @samp{gray}) followed by the appropriate number of parameters. Thus, the color specification @samp{rgb 0.3 0.4 0.5} would correspond to the color that is @samp{0.3 -0.4 0.5} in its red, blue and green values. The color model used -internally in dvipng is @samp{RGB} (discretized to 256 levels), for -details on the formulas used in conversion, see the @samp{xcolor} +0.4 0.5} in its red, blue and green values. The color model used +internally in dvipng is @samp{RGB} (discretized to 256 levels), for +details on the formulas used in conversion, see the @samp{xcolor} documentation. By-name color specifications are single (case-dependent) words and are @@ -869,7 +853,7 @@ yourself in such a situation. @section Contact information Bug reports should be sent to -@email{dvipng@@nongnu.org}. +@email{dvipng@@nongnu.org}. Questions, suggestions for new features, pleas for help, and/or praise should go to @email{dvipng@@nongnu.org}. For more information on this @@ -892,14 +876,14 @@ parameter to this flag is an integer that tells what errors are currently being tracked. To track a certain class of debug messages, simply provide the appropriate number given below; if you wish to track multiple classes, sum the numbers of the classes you wish to track. To -track all classes, you can use @code{-1}. +track all classes, you can use @code{-1}. Some of these debugging options are actually provided by Kpathsea (@pxref{Debugging, , , kpathsea, Kpathsea}). The classes are: @table @asis -@item 1 +@item 1 Normal dvi op-codes @item 2 Virtual fonts @@ -918,16 +902,15 @@ Color specials @item 256 GhostScript specials @item 512 -T1lib calls -@item 1024 Kpathsea @code{stat} calls -@item 2048 +@item 1024 Kpathsea hash table lookups -@item 4096 +@item 2048 Kpathsea path element expansion -@item 8192 +@item 4096 Kpathsea path searches @ignore +@item 8192 @item 16384 @end ignore @@ -954,13 +937,6 @@ William H Wheeler, Thomas Klausner, Harald Koenig, Adrian Bunk, Kevin Smith, Jason Riedy, Wolfram Krause, Reinhard Kotucha, Takeshi Abe, and Waldeck Schutzer. -Use of the @code{gd} library requires inclusion of the following -copyright notice, which applies to the @code{gd} library: - -@quotation -@include COPYING.gd -@end quotation - @ifset man @c man begin NOTES The full manual is accessible in info format, on most systems by typing @@ -973,7 +949,7 @@ This program is released under the GNU Lesser General Public License version 3, see the COPYING file in the dvipng distribution or @url{http://www.gnu.org/licenses/gpl.html}. -Copyright @copyright{} 2002-2010 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2015 Jan-@AA{}ke Larsson @c man end @end ifset @@ -996,11 +972,10 @@ License along with this program. If not, see @sp 2 @noindent -Copyright @copyright{} 2002-2010 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2015 Jan-@AA{}ke Larsson @node Index @unnumbered Index @printindex cp @bye - diff --git a/Build/source/texk/dvipng/dvipng-1.14/enc.c b/Build/source/texk/dvipng/dvipng-1.15/enc.c index 03224769c78..03224769c78 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/enc.c +++ b/Build/source/texk/dvipng/dvipng-1.15/enc.c diff --git a/Build/source/texk/dvipng/dvipng-1.14/font.c b/Build/source/texk/dvipng/dvipng-1.15/font.c index 2a8b59b9723..d8a374e473a 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/font.c +++ b/Build/source/texk/dvipng/dvipng-1.15/font.c @@ -18,7 +18,7 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2010 Jan-Åke Larsson + Copyright (C) 2002-2015 Jan-Åke Larsson ************************************************************************/ @@ -85,7 +85,7 @@ void FontDef(unsigned char* command, void* parent) if (((struct font_entry*)parent)->type==FONT_TYPE_VF) { DEBUG_PRINT(DEBUG_VF,(" %d %d %d",k,c,s)); /* Rescale. s is relative to the actual scale /(1<<20) */ - s = (uint32_t)((uint64_t) s * (((struct font_entry*) parent)->s) + s = (uint32_t)((uint64_t) s * (((struct font_entry*) parent)->s) / (1<<20)); DEBUG_PRINT(DEBUG_VF,(" (%d) %d",s,d)); /* Oddly, d differs in the DVI and the VF that my system produces */ @@ -114,17 +114,17 @@ void FontDef(unsigned char* command, void* parent) tfontnump = tfontnump->next; } /* If found, return if it is correct */ - if (tfontnump!=NULL - && tfontnump->fontp->s == s - && tfontnump->fontp->d == d - && strlen(tfontnump->fontp->n) == a+l + if (tfontnump!=NULL + && tfontnump->fontp->s == s + && tfontnump->fontp->d == d + && strlen(tfontnump->fontp->n) == a+l && strncmp(tfontnump->fontp->n,(char*)current+14,a+l) == 0) { DEBUG_PRINT((DEBUG_DVI|DEBUG_VF),("\n FONT %d:\tMatch found",k)); return; } /* If not found, create new */ if (tfontnump==NULL) { - if ((tfontnump=malloc(sizeof(struct font_num)))==NULL) + if ((tfontnump=malloc(sizeof(struct font_num)))==NULL) Fatal("cannot malloc memory for new font number"); tfontnump->k=k; switch (((struct font_entry*)parent)->type) { @@ -140,17 +140,17 @@ void FontDef(unsigned char* command, void* parent) /* Search font list for possible match */ tfontptr = hfontptr; - while (tfontptr != NULL - && (tfontptr->s != s - || tfontptr->d != d - || strlen(tfontptr->n) != a+l + while (tfontptr != NULL + && (tfontptr->s != s + || tfontptr->d != d + || strlen(tfontptr->n) != a+l || strncmp(tfontptr->n,(char*)current+14,a+l) != 0 ) ) { tfontptr = tfontptr->next; } /* If found, set its number and return */ if (tfontptr!=NULL) { DEBUG_PRINT((DEBUG_DVI|DEBUG_VF),("\n FONT %d:\tMatch found, number set",k)); - tfontnump->fontp = tfontptr; + tfontnump->fontp = tfontptr; return; } @@ -173,29 +173,27 @@ void FontDef(unsigned char* command, void* parent) tfontptr->l = l; /* device length */ strncpy(tfontptr->n,(char*)current+14,a+l); /* full font name */ tfontptr->n[a+l] = '\0'; - + tfontptr->name = NULL; for (i = FIRSTFNTCHAR; i <= LASTFNTCHAR; i++) { tfontptr->chr[i] = NULL; } - tfontptr->dpi = + tfontptr->dpi = (uint32_t)((ActualFactor((uint32_t)(1000.0*tfontptr->s /(double)tfontptr->d+0.5)) * ActualFactor(dvi->mag) * dpi*shrinkfactor) + 0.5); -#ifdef HAVE_FT2_OR_LIBT1 +#ifdef HAVE_FT2 tfontptr->psfontmap=NULL; #endif } -#ifdef HAVE_FT2_OR_LIBT1 -static char* kpse_find_t1_or_tt(char* filename) +#ifdef HAVE_FT2 +static char* kpse_find_t1_or_tt(char* filename) { char* filepath = kpse_find_file(filename, kpse_type1_format, false); -#ifdef HAVE_FT2 - if ((option_flags & USE_FREETYPE) && filepath==NULL) + if ((option_flags & USE_FREETYPE) && filepath==NULL) filepath = kpse_find_file(filename, kpse_truetype_format, false); -#endif return(filepath); } #endif @@ -208,10 +206,10 @@ static void FontFind(struct font_entry * tfontptr) DEBUG_PRINT(DEBUG_DVI,("\n FIND FONT:\t%s %d",tfontptr->n,tfontptr->dpi)); tfontptr->name = kpse_find_vf (tfontptr->n); - if (tfontptr->name!=NULL) + if (tfontptr->name!=NULL) InitVF(tfontptr); -#ifdef HAVE_FT2_OR_LIBT1 - else if (option_flags & (USE_FREETYPE | USE_LIBT1)) { +#ifdef HAVE_FT2 + else if (option_flags & USE_FREETYPE) { tfontptr->psfontmap = FindPSFontMap(tfontptr->n); if (tfontptr->psfontmap!=NULL) tfontptr->name=kpse_find_t1_or_tt(tfontptr->psfontmap->psfile); @@ -220,51 +218,39 @@ static void FontFind(struct font_entry * tfontptr) if (tfontptr->name!=NULL) { char* tfmname=kpse_find_file(tfontptr->n, kpse_tfm_format, false); if (tfmname!=NULL) { - if (!ReadTFM(tfontptr,tfmname)) { - Warning("unable to read tfm file %s", tfmname); - free(tfontptr->name); - tfontptr->name=NULL; - } else -#ifdef HAVE_FT2 - if ((option_flags & USE_FREETYPE)==0 || !InitFT(tfontptr)) { -#endif -#ifdef HAVE_LIBT1 - if ((option_flags & USE_LIBT1)==0 || !InitT1(tfontptr)) { -#endif - /* if Freetype or T1 loading fails for some reason, fall - back to PK font */ - free(tfontptr->name); - tfontptr->name=NULL; -#ifdef HAVE_LIBT1 - } -#endif -#ifdef HAVE_FT2 - } -#endif - free(tfmname); + if (!ReadTFM(tfontptr,tfmname)) { + Warning("unable to read tfm file %s", tfmname); + free(tfontptr->name); + tfontptr->name=NULL; + } else if ((option_flags & USE_FREETYPE)==0 || !InitFT(tfontptr)) { + /* if Freetype loading fails for some reason, fall back to PK font */ + free(tfontptr->name); + tfontptr->name=NULL; + } + free(tfmname); } } } -#endif /* HAVE_FT2_OR_LIBT1 */ +#endif /* HAVE_FT2 */ if (tfontptr->name==NULL) { tfontptr->name=kpse_find_pk (tfontptr->n, tfontptr->dpi, &font_ret); if (tfontptr->name!=NULL) { if (!FILESTRCASEEQ (tfontptr->n, font_ret.name)) { - page_flags |= PAGE_GAVE_WARN; - Warning("font %s not found, using %s at %d dpi instead", - tfontptr->n, font_ret.name, font_ret.dpi); - tfontptr->c = 0; /* no checksum warning */ - } else if (!kpse_bitmap_tolerance ((double)font_ret.dpi, - (double) tfontptr->dpi)) { - page_flags |= PAGE_GAVE_WARN; - Warning("font %s at %d dpi not found, using %d dpi instead", - tfontptr->n, tfontptr->dpi, font_ret.dpi); + page_flags |= PAGE_GAVE_WARN; + Warning("font %s not found, using %s at %d dpi instead", + tfontptr->n, font_ret.name, font_ret.dpi); + tfontptr->c = 0; /* no checksum warning */ + } else if (!kpse_bitmap_tolerance ((double)font_ret.dpi, + (double) tfontptr->dpi)) { + page_flags |= PAGE_GAVE_WARN; + Warning("font %s at %d dpi not found, using %d dpi instead", + tfontptr->n, tfontptr->dpi, font_ret.dpi); } InitPK(tfontptr); } else { page_flags |= PAGE_GAVE_WARN; Warning("font %s at %d dpi not found, characters will be left blank", - tfontptr->n, tfontptr->dpi); + tfontptr->n, tfontptr->dpi); #ifndef WIN32 tfontptr->fmmap.fd = 0; #else /* WIN32 */ @@ -291,11 +277,6 @@ static void DoneFont(struct font_entry *tfontp) DoneFT(tfontp); break; #endif -#ifdef HAVE_LIBT1 - case FONT_TYPE_T1: - DoneT1(tfontp); - break; -#endif } } @@ -304,7 +285,7 @@ void FreeFontNumP(struct font_num *hfontnump) { struct font_num *tmp; while(hfontnump!=NULL) { - tmp=hfontnump->next; + tmp=hfontnump->next; free(hfontnump); hfontnump=tmp; } @@ -352,5 +333,3 @@ void SetFntNum(int32_t k, void* parent /* dvi/vf */) if (currentfont->name==NULL) FontFind(currentfont); } - - diff --git a/Build/source/texk/dvipng/dvipng-1.14/fontmap.c b/Build/source/texk/dvipng/dvipng-1.15/fontmap.c index df6c6e43515..f362a57defa 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/fontmap.c +++ b/Build/source/texk/dvipng/dvipng-1.15/fontmap.c @@ -18,7 +18,7 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2010 Jan-Åke Larsson + Copyright (C) 2002-2015 Jan-Åke Larsson ************************************************************************/ @@ -30,7 +30,7 @@ static struct filemmap ttfont_mmap; #endif static struct psfontmap *psfontmap=NULL; -static char* newword(char** buffer, char* end) +static char* newword(char** buffer, char* end) { char *word,*pos=*buffer; @@ -43,7 +43,7 @@ static char* newword(char** buffer, char* end) return(word); } -char* copyword(char* orig) +char* copyword(char* orig) { char *word; @@ -76,8 +76,8 @@ void InitPSFontMap(void) if (psfont_name==NULL) { Warning("cannot find ps2pk.map, nor psfonts.map"); } else { - DEBUG_PRINT((DEBUG_FT|DEBUG_T1), - ("\n OPEN PSFONT MAP:\t'%s'", psfont_name)); + DEBUG_PRINT(DEBUG_FT, + ("\n OPEN PSFONT MAP:\t'%s'", psfont_name)); if (MmapFile(psfont_name,&psfont_mmap)) { Warning("psfonts map %s could not be opened", psfont_name); } @@ -86,7 +86,7 @@ void InitPSFontMap(void) #ifdef HAVE_FT2 psfont_name=find_format("ttfonts.map"); if (psfont_name!=NULL) { - DEBUG_PRINT(DEBUG_FT,("\n OPEN TTFONT MAP:\t'%s'", psfont_name)); + DEBUG_PRINT(DEBUG_FT,("\n OPEN TTFONT MAP:\t'%s'", psfont_name)); if (MmapFile(psfont_name,&ttfont_mmap)) { Warning("ttfonts map %s could not be opened", psfont_name); } @@ -106,9 +106,6 @@ struct psfontmap *NewPSFont(struct psfontmap* copyfrom) newentry->psfile = copyword(copyfrom->psfile); newentry->encname = copyword(copyfrom->encname); newentry->encoding = copyfrom->encoding; -#ifdef HAVE_LIBT1 - newentry->t1_transformp = copyfrom->t1_transformp; -#endif #ifdef HAVE_FT2 newentry->ft_transformp = copyfrom->ft_transformp; newentry->subfont = copyfrom->subfont; @@ -120,9 +117,6 @@ struct psfontmap *NewPSFont(struct psfontmap* copyfrom) newentry->psfile = NULL; newentry->encname = NULL; newentry->encoding = NULL; -#ifdef HAVE_LIBT1 - newentry->t1_transformp = NULL; -#endif #ifdef HAVE_FT2 newentry->ft_transformp = NULL; newentry->subfont = NULL; @@ -147,8 +141,8 @@ static struct psfontmap *SearchPSFontMap(char* fontname, end=searching_mmap->data+searching_mmap->size; } while(pos<end && (entry==NULL || strcmp(entry->tfmname,fontname)!=0)) { - while(pos < end - && (*pos=='\r' || *pos=='\n' || *pos==' ' || *pos=='\t' + while(pos < end + && (*pos=='\r' || *pos=='\n' || *pos==' ' || *pos=='\t' || *pos=='%' || *pos=='*' || *pos==';' || *pos=='#')) { while(pos < end && *pos!='\r' && *pos!='\n') pos++; /* skip comments/empty rows */ pos++; @@ -158,9 +152,9 @@ static struct psfontmap *SearchPSFontMap(char* fontname, entry->line = pos; /* skip <something and quoted entries */ while(pos < end && (*pos=='<' || *pos=='"')) { - if (*pos=='<') + if (*pos=='<') while(pos < end && *pos!=' ' && *pos!='\t') pos++; - else + else while(pos < end && *pos!='"') pos++; while(pos < end && (*pos==' ' || *pos=='\t')) pos++; } @@ -200,52 +194,52 @@ static void ReadPSFontMap(struct psfontmap *entry) { char *pos,*end,*psname; int nameno = 0; - - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\n PSFONTMAP: %s ",entry->tfmname)); + + DEBUG_PRINT(DEBUG_FT,("\n PSFONTMAP: %s ",entry->tfmname)); pos=entry->line; end=entry->end; - while(pos < end) { + while(pos < end) { if (*pos=='<') { /* filename follows */ pos++; if (pos<end && *pos=='<') { /* <<download.font */ pos++; entry->psfile = newword((char**)&pos,end); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<%s ",entry->psfile)); + DEBUG_PRINT(DEBUG_FT,("<%s ",entry->psfile)); } else if (pos<end && *pos=='[') { /* <[encoding.file */ pos++; entry->encname = newword((char**)&pos,end); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); + DEBUG_PRINT(DEBUG_FT,("<[%s ",entry->encname)); } else { /* <some.file */ - char* word =newword((char**)&pos,end); + char* word =newword((char**)&pos,end); if (strncmp(word+strlen(word)-4,".enc",4)==0) {/* <some.enc */ entry->encname=word; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); - } else { /* <font */ + DEBUG_PRINT(DEBUG_FT,("<[%s ",entry->encname)); + } else { /* <font */ entry->psfile=word; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<%s ",entry->psfile)); + DEBUG_PRINT(DEBUG_FT,("<%s ",entry->psfile)); } } } else if (*pos=='"') { /* PS code: reencoding/tranformation exists */ char *word; double cxx=1.0,cxy=0.0; pos++; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\"")); + DEBUG_PRINT(DEBUG_FT,("\"")); while(pos < end && *pos!='"') { word=newword((char**)&pos,end); while(pos < end && (*pos==' ' || *pos=='\t')) pos++; if (pos+10<end && strncmp(pos,"ExtendFont",10)==0) { cxx=strtod(word,NULL); pos+=10; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("%f ExtendFont ",cxx)); + DEBUG_PRINT(DEBUG_FT,("%f ExtendFont ",cxx)); } else if (pos+9<end && strncmp(pos,"SlantFont",9)==0) { pos+=9; cxy=strtod(word,NULL); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("%f SlantFont ",cxy)); + DEBUG_PRINT(DEBUG_FT,("%f SlantFont ",cxy)); } else if (pos+12<end && strncmp(pos,"ReEncodeFont",12)==0) { pos+=12; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("%s ReEncodeFont ",word)); + DEBUG_PRINT(DEBUG_FT,("%s ReEncodeFont ",word)); } else { - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("(?:%s) ",word)); + DEBUG_PRINT(DEBUG_FT,("(?:%s) ",word)); } free(word); } @@ -256,14 +250,7 @@ static void ReadPSFontMap(struct psfontmap *entry) entry->ft_transform.yx=0; entry->ft_transform.yy=0x10000; #endif -#ifdef HAVE_LIBT1 - entry->t1_transformp=&(entry->t1_transform); - entry->t1_transform.cxx=cxx; - entry->t1_transform.cxy=cxy; - entry->t1_transform.cyx=0.0; - entry->t1_transform.cyy=1.0; -#endif - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\" ")); + DEBUG_PRINT(DEBUG_FT,("\" ")); pos++; } else { /* bare word */ switch (++nameno) { @@ -273,12 +260,12 @@ static void ReadPSFontMap(struct psfontmap *entry) break; case 2: /* second word is psname, NOT psfile */ psname = newword((char**)&pos,end); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("(%s) ",psname)); + DEBUG_PRINT(DEBUG_FT,("(%s) ",psname)); free(psname); break; case 3: /* third word is encoding */ entry->encname = newword((char**)&pos,end); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); + DEBUG_PRINT(DEBUG_FT,("<[%s ",entry->encname)); break; default: while(pos<end && *pos!=' ' && *pos!='\t') pos++; @@ -287,13 +274,13 @@ static void ReadPSFontMap(struct psfontmap *entry) } while(pos < end && (*pos==' ' || *pos=='\t')) pos++; } - if (entry->psfile==NULL) { + if (entry->psfile==NULL) { /* No psfile-name given, use tfmname */ entry->psfile=copyword(entry->tfmname); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),(" <%s ",entry->psfile)); + DEBUG_PRINT(DEBUG_FT,(" <%s ",entry->psfile)); } - if (entry->encname!=NULL - && (entry->encoding=FindEncoding(entry->encname))==NULL) + if (entry->encname!=NULL + && (entry->encoding=FindEncoding(entry->encname))==NULL) Warning("unable to load font encoding '%s' for %s", entry->encname,entry->tfmname); } @@ -303,7 +290,7 @@ struct psfontmap* FindPSFontMap(char* fontname) { struct psfontmap *entry; static struct filemmap* search_mmap_p=&psfont_mmap; - + entry=psfontmap; while(entry!=NULL && strcmp(entry->tfmname,fontname)!=0) entry=entry->next; @@ -331,9 +318,9 @@ struct psfontmap* FindPSFontMap(char* fontname) } #endif } - if (entry!=NULL && entry->psfile==NULL) + if (entry!=NULL && entry->psfile==NULL) ReadPSFontMap(entry); - if (entry!=NULL && entry->encname!=NULL && entry->encoding==NULL) + if (entry!=NULL && entry->encname!=NULL && entry->encoding==NULL) /* Encoding given but it cannot be found. Unusable font */ return(NULL); return(entry); diff --git a/Build/source/texk/dvipng/dvipng-1.14/ft.c b/Build/source/texk/dvipng/dvipng-1.15/ft.c index fdb8a89489c..9609b10a10e 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/ft.c +++ b/Build/source/texk/dvipng/dvipng-1.15/ft.c @@ -30,6 +30,7 @@ void LoadFT(int32_t c, struct char_entry * ptr) FT_UInt glyph_i; int i,j,k; unsigned char* bit; + static bool hintwarning=false; DEBUG_PRINT(DEBUG_FT,("\n LOAD FT CHAR\t%d (%d)",c,ptr->tfmw)); if (currentfont->psfontmap!=NULL @@ -45,12 +46,17 @@ void LoadFT(int32_t c, struct char_entry * ptr) } else glyph_i = FT_Get_Char_Index( currentfont->face, c ); if (FT_Load_Glyph( currentfont->face, glyph_i, - FT_LOAD_RENDER | FT_LOAD_TARGET_LIGHT ) - /* On some configurations (with FreeType <= 2.1.7) the above - fails, while the below works */ - && FT_Load_Glyph( currentfont->face, glyph_i, - FT_LOAD_RENDER | FT_LOAD_NO_HINTING )) - Fatal("cannot load FT char %d",c); + FT_LOAD_RENDER | FT_LOAD_TARGET_LIGHT )) { + /* On some configurations (with FreeType <= 2.1.7) the above + fails, while the below works */ + if (!hintwarning) { + hintwarning=true; + Warning("the used FreeType does not have target_light hinting"); + } + if (FT_Load_Glyph( currentfont->face, glyph_i, + FT_LOAD_RENDER | FT_LOAD_NO_HINTING )) + Fatal("cannot load FT char %d",c); + } ptr->xOffset = -currentfont->face->glyph->bitmap_left*shrinkfactor; ptr->yOffset = (currentfont->face->glyph->bitmap_top-1)*shrinkfactor; bitmap=currentfont->face->glyph->bitmap; diff --git a/Build/source/texk/dvipng/dvipng-1.14/install.texi b/Build/source/texk/dvipng/dvipng-1.15/install.texi index c58f9af6013..c9928a1ba7e 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/install.texi +++ b/Build/source/texk/dvipng/dvipng-1.15/install.texi @@ -1,5 +1,5 @@ @c install.texi -@c +@c @c Part of the dvipng distribution @include macros.texi @@ -9,15 +9,15 @@ @end ifset @c ----------------------- Installing dvipng should be simple: merely @code{./configure}, -@code{make}, and @code{make install}. +@code{make}, and @code{make install}. @ifclear rawfile @menu -* Prerequisites:: -* Configure:: -* Build/install:: +* Prerequisites:: +* Configure:: +* Build/install:: * Installation outside the texmf tree:: -* Advice for non-privileged users:: +* Advice for non-privileged users:: @end menu @end ifclear @@ -57,15 +57,6 @@ resolutions without cluttering the disk with lots of bitmapped fonts. Finally, it will enable subfont support in dvipng. That is, if you want to render CJK-@LaTeX{} characters, you must have FreeType 2 installed. -@item The font-rendering library T1lib - -An alternative to FreeType 2 is T1lib, but this will enable only -PostScript fonts in dvipng and will not include subfont support. Also -here, you can render images at different (and unusual) resolutions -without cluttering the disk with lots of bitmapped fonts. If both -FreeType 2 and T1lib are present, FreeType will be internally -preferred by dvipng but T1lib can be chosen at runtime. - @item libpng and libz To be able to compress and write PNG files to disk, dvipng (or really @@ -74,7 +65,7 @@ any modern system, if not, download them and install them. @item The @code{texinfo} package -This is needed for building the documentation. +This is needed for building the documentation. @end itemize @node Configure @@ -150,7 +141,7 @@ Once @file{configure} has been run, simply enter make @end example -@noindent +@noindent at the prompt to compile the C code, and build the documentation files. To install the files into the locations chosen earlier, type @@ -158,7 +149,7 @@ To install the files into the locations chosen earlier, type make install @end example -@noindent +@noindent You may need special privileges to install, e.g., if you are installing into system directories. @@ -199,5 +190,5 @@ This program is released under the GNU Lesser General Public License version 3, see the COPYING file in the dvipng distribution or @url{http://www.gnu.org/licenses/}. -Copyright @copyright{} 2002-2009 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2015 Jan-@AA{}ke Larsson @end ifset diff --git a/Build/source/texk/dvipng/dvipng-1.14/macros.texi b/Build/source/texk/dvipng/dvipng-1.15/macros.texi index 3c90a59eb15..3c90a59eb15 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/macros.texi +++ b/Build/source/texk/dvipng/dvipng-1.15/macros.texi diff --git a/Build/source/texk/dvipng/dvipng-1.14/miktex.h b/Build/source/texk/dvipng/dvipng-1.15/miktex.h index c949cd1aff6..f609a69a4db 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/miktex.h +++ b/Build/source/texk/dvipng/dvipng-1.15/miktex.h @@ -18,7 +18,7 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2008 Jan-Åke Larsson + Copyright (C) 2002-2015 Jan-Åke Larsson ************************************************************************/ @@ -124,9 +124,6 @@ /* Define to 1 if you have the `png' library (-lpng). */ #define HAVE_LIBPNG 1 -/* Define to 1 if you have the `t1' library (-lt1). */ -#undef HAVE_LIBT1 - /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ @@ -144,7 +141,7 @@ #undef HAVE_MMAP /* Define to 1 if you have the `munmap' function. */ -#undef HAVE_MUNMAP +#undef HAVE_MUNMAP /* Define to 1 if you have the <png.h> header file. */ #define HAVE_PNG_H 1 @@ -194,9 +191,6 @@ /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H -/* Define to 1 if you have the <t1lib.h> header file. */ -#undef HAVE_T1LIB_H - /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H diff --git a/Build/source/texk/dvipng/dvipng-1.14/miktex.mak b/Build/source/texk/dvipng/dvipng-1.15/miktex.mak index b291ba67207..b291ba67207 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/miktex.mak +++ b/Build/source/texk/dvipng/dvipng-1.15/miktex.mak diff --git a/Build/source/texk/dvipng/dvipng-1.14/misc.c b/Build/source/texk/dvipng/dvipng-1.15/misc.c index d13dfcd3a76..ab2ce94f30e 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/misc.c +++ b/Build/source/texk/dvipng/dvipng-1.15/misc.c @@ -18,7 +18,7 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2010 Jan-Åke Larsson + Copyright (C) 2002-2015 Jan-Åke Larsson ************************************************************************/ @@ -82,7 +82,7 @@ bool DecodeArgs(int argc, char ** argv) Message(BE_NONQUIET,"This is %s",programname); if (strcmp(base,PACKAGE_NAME)!=0) Message(BE_NONQUIET," (%s)", PACKAGE_NAME); - Message(BE_NONQUIET," %s Copyright 2002-2010 Jan-Ake Larsson\n", + Message(BE_NONQUIET," %s Copyright 2002-2015 Jan-Ake Larsson\n", PACKAGE_VERSION); for (i=1; i<argc; i++) { @@ -96,7 +96,7 @@ bool DecodeArgs(int argc, char ** argv) switch (c) { case 'd': /* selects Debug output */ if (*p>'9' && *p!='-') { - if (strncmp(p,"vinum",5)==0) { + if (strncmp(p,"vinum",5)==0) { if (p[5] != '0') { option_flags |= DVI_PAGENUM; Message(PARSE_STDIN,"DVI page number output on\n",p); @@ -105,7 +105,7 @@ bool DecodeArgs(int argc, char ** argv) Message(PARSE_STDIN,"DVI page number output off\n"); } break; - } else if (strncmp(p,"epth",4)==0) { /* Depth reporting */ + } else if (strncmp(p,"epth",4)==0) { /* Depth reporting */ if (p[4] != '0') { option_flags |= REPORT_DEPTH; Message(PARSE_STDIN,"Depth reporting on\n",p); @@ -116,14 +116,14 @@ bool DecodeArgs(int argc, char ** argv) break; } goto DEFAULT; - } else { + } else { #ifdef DEBUG if (*p == 0 && argv[i+1]) p = argv[i+1]; debug = atoi(p); if (debug > 0) { if (p == argv[i+1]) i++; - } else + } else debug = DEBUG_DEFAULT; Message(PARSE_STDIN,"Debug output enabled\n"); #ifdef HAVE_LIBKPATHSEA @@ -149,7 +149,7 @@ bool DecodeArgs(int argc, char ** argv) makeTexPK = (*p == '0'); #ifdef HAVE_LIBKPATHSEA kpse_set_program_enabled (kpse_pk_format, makeTexPK, kpse_src_cmdline); -#endif +#endif if (makeTexPK) Message(PARSE_STDIN,"MakeTeXPK enabled\n"); else @@ -167,7 +167,7 @@ bool DecodeArgs(int argc, char ** argv) case 'h': if (strcmp(p,"elp") == 0 ) { break; - } else if (strncmp(p,"eight",5) == 0 ) { /* Height reporting */ + } else if (strncmp(p,"eight",5) == 0 ) { /* Height reporting */ if (p[5] != '0') { option_flags |= REPORT_HEIGHT; Message(PARSE_STDIN,"Height reporting on\n",p); @@ -185,7 +185,7 @@ bool DecodeArgs(int argc, char ** argv) Message(PARSE_STDIN,"Offset: (%d,%d)\n",x_offset_def,y_offset_def); break ; case 'e': - if (strncmp(p,"xpand-bbox",10) == 0 ) { + if (strncmp(p,"xpand-bbox",10) == 0 ) { if (p[10] != '0') { option_flags |= EXPAND_BBOX; Message(PARSE_STDIN,"BBox expansion on\n",p); @@ -216,28 +216,16 @@ bool DecodeArgs(int argc, char ** argv) case 't': /* specify paper format, only for cropmarks */ #ifdef HAVE_GDIMAGECREATETRUECOLOR /* Truecolor */ - if (strncmp(p,"ruecolor",8)==0) { + if (strncmp(p,"ruecolor",8)==0) { if (p[8] != '0') { - option_flags |= FORCE_TRUECOLOR; + option_flags |= FORCE_TRUECOLOR; Message(PARSE_STDIN,"Truecolor mode on\n",p); - } else { - option_flags &= ~FORCE_TRUECOLOR; + } else { + option_flags &= ~FORCE_TRUECOLOR; Message(PARSE_STDIN,"Truecolor mode off\n"); } - } else -#endif -#ifdef HAVE_LIBT1 - if ( strncmp(p,"1lib",4) == 0 ) { /* -t1lib activation */ - if (p[4] != '0') { - option_flags |= USE_LIBT1; - Message(PARSE_STDIN,"t1lib rendering on\n",p); - } else { - option_flags &= ~USE_LIBT1; - Message(PARSE_STDIN,"t1lib rendering off\n"); - } - } else + } else #endif - { /* cropmarks not implemented yet */ if (*p == 0 && argv[i+1]) p = argv[++i] ; @@ -271,16 +259,16 @@ bool DecodeArgs(int argc, char ** argv) p++; if (*p == 0 && argv[i+1]) p = argv[++i] ; - if (strncmp(p,"Transparent",11) == 0 ) + if (strncmp(p,"Transparent",11) == 0 ) option_flags |= BG_TRANSPARENT_ALPHA; - else if (strncmp(p,"transparent",11) == 0 ) + else if (strncmp(p,"transparent",11) == 0 ) option_flags |= BG_TRANSPARENT; else background(p); - if (option_flags & BG_TRANSPARENT) + if (option_flags & BG_TRANSPARENT) Message(PARSE_STDIN,"Transp. background (fallback rgb %d,%d,%d)\n", cstack[0].red,cstack[0].green,cstack[0].blue); - else + else Message(PARSE_STDIN,"Background: rgb %d,%d,%d\n", cstack[0].red,cstack[0].green,cstack[0].blue); break; @@ -318,7 +306,7 @@ bool DecodeArgs(int argc, char ** argv) bordercolor.red, bordercolor.green, bordercolor.blue); } break; - } + } goto DEFAULT; case 'f': if ( *p == 'g' ) { /* -fg foreground color */ @@ -334,7 +322,7 @@ bool DecodeArgs(int argc, char ** argv) if (p[7] != '0') { option_flags |= USE_FREETYPE; Message(PARSE_STDIN,"FreeType rendering on\n",p); - } else { + } else { option_flags &= ~USE_FREETYPE; Message(PARSE_STDIN,"FreeType rendering off\n"); } @@ -352,7 +340,7 @@ bool DecodeArgs(int argc, char ** argv) if (*p == 0 && argv[i+1]) p = argv[++i] ; number = atoi(p); - if (number < 1 || number > 1000000) + if (number < 1 || number > 1000000) Warning("Bad magnification parameter (-x or -y), ignored"); else { usermag=number; @@ -361,7 +349,7 @@ bool DecodeArgs(int argc, char ** argv) } break ; case 'g' : - if (strncmp(p,"amma",4)==0) { /* --gamma correction */ + if (strncmp(p,"amma",4)==0) { /* --gamma correction */ double gamma=0.0; p+=4; @@ -377,7 +365,7 @@ bool DecodeArgs(int argc, char ** argv) Message(PARSE_STDIN,"Gamma value is %s\n", gamma); break; #ifdef HAVE_GDIMAGEGIF - } else if (strncmp(p,"if",2)==0) { /* --gif output */ + } else if (strncmp(p,"if",2)==0) { /* --gif output */ option_flags |= GIF_OUTPUT; Message(PARSE_STDIN,"GIF output\n"); break; @@ -393,10 +381,10 @@ bool DecodeArgs(int argc, char ** argv) Message(PARSE_STDIN,"Page list: %s\n",p); if (ParsePages(p)) Fatal("bad page list specifier (-pp)"); - } else if (strncmp(p,"ng",2)==0) { /* --png output */ + } else if (strncmp(p,"ng",2)==0) { /* --png output */ option_flags &= ~GIF_OUTPUT; Message(PARSE_STDIN,"PNG output\n"); - } else if (strncmp(p,"icky",4)==0) { + } else if (strncmp(p,"icky",4)==0) { if (p[4] != '0') { option_flags |= MODE_PICKY; Message(PARSE_STDIN,"No images output for pages with warnings\n",p); @@ -404,7 +392,7 @@ bool DecodeArgs(int argc, char ** argv) option_flags &= ~MODE_PICKY; Message(PARSE_STDIN,"Images output even for pages with warnings\n"); } - } else if (strncmp(p,"alette",6)==0) { + } else if (strncmp(p,"alette",6)==0) { if (p[6] != '0') { option_flags |= FORCE_PALETTE; Message(PARSE_STDIN,"Forcing 256-color PNG output\n",p); @@ -431,7 +419,7 @@ bool DecodeArgs(int argc, char ** argv) } break ; case 's' : - if (strncmp(p,"trict",5)==0) { + if (strncmp(p,"trict",5)==0) { if (p[5] != '0') { option_flags |= MODE_STRICT; Message(PARSE_STDIN,"Warnings are fatal\n",p); @@ -443,7 +431,7 @@ bool DecodeArgs(int argc, char ** argv) goto DEFAULT; break ; case 'n' : - if (strncmp(p,"oghostscript",12)==0) { + if (strncmp(p,"oghostscript",12)==0) { if (p[12] != '0') { option_flags |= NO_GHOSTSCRIPT; Message(PARSE_STDIN,"No GhostScript calls\n",p); @@ -451,7 +439,7 @@ bool DecodeArgs(int argc, char ** argv) option_flags &= ~NO_GHOSTSCRIPT; Message(PARSE_STDIN,"GhostScript calls made\n"); } - } else if (strncmp(p,"ogssafer",8)==0) { + } else if (strncmp(p,"ogssafer",8)==0) { if (p[8] != '0') { option_flags |= NO_GSSAFER; Message(PARSE_STDIN,"GhostScript calls does not use -dSAFER\n",p); @@ -459,7 +447,7 @@ bool DecodeArgs(int argc, char ** argv) option_flags &= ~NO_GSSAFER; Message(PARSE_STDIN,"GhostScript calls use -dSAFER\n"); } - } else if (strncmp(p,"ogs",3)==0) { + } else if (strncmp(p,"ogs",3)==0) { if (p[3] != '0') { option_flags |= NO_GHOSTSCRIPT; Message(PARSE_STDIN,"No GhostScript calls\n",p); @@ -467,7 +455,7 @@ bool DecodeArgs(int argc, char ** argv) option_flags &= ~NO_GHOSTSCRIPT; Message(PARSE_STDIN,"GhostScript calls made\n"); } - } else if (strncmp(p,"orawps",6)==0) { + } else if (strncmp(p,"orawps",6)==0) { if (p[6] != '0') { option_flags |= NO_RAW_PS; Message(PARSE_STDIN,"Conversion of raw PostScript will not be attempted\n",p); @@ -488,7 +476,7 @@ bool DecodeArgs(int argc, char ** argv) if (*p == '=') { abspage=true; p++ ; - } + } if ((*p>='0'&&*p<='9') || (*p=='-' && *(p+1)>='0' && *(p+1)<='9')) { lastpage = atoi(p); LastPage(lastpage,abspage); @@ -530,22 +518,19 @@ bool DecodeArgs(int argc, char ** argv) Warning("the Freetype library seems unusable"); else { FT_Int amajor, aminor, apatch; - + FT_Library_Version( libfreetype, &amajor, &aminor, &apatch ); printf("Using libft %d.%d.%d\n",amajor, aminor, apatch); - FT_Done_FreeType(libfreetype); + FT_Done_FreeType(libfreetype); } # endif #endif -#ifdef HAVE_LIBT1 - printf("Using t1lib %s\n", T1_GetLibIdent()); -#endif - puts ("Copyright (C) 2002-2010 Jan-Ake Larsson.\n\ + puts ("Copyright (C) 2002-2015 Jan-Ake Larsson.\n\ There is NO warranty. You may redistribute this software\n\ under the terms of the GNU Lesser General Public License\n\ version 3, see the COPYING file in the dvipng distribution\n\ or <http://www.gnu.org/licenses/>."); - exit (EXIT_SUCCESS); + exit (EXIT_SUCCESS); } if (*p != '0') option_flags |= BE_NONQUIET | BE_VERBOSE; @@ -574,7 +559,7 @@ or <http://www.gnu.org/licenses/>."); } break; case 'w': - if (strncmp(p,"idth",4) == 0 ) { /* Width reporting */ + if (strncmp(p,"idth",4) == 0 ) { /* Width reporting */ if (p[4] != '0') { option_flags |= REPORT_WIDTH; Message(PARSE_STDIN,"Width reporting on\n",p); @@ -609,9 +594,9 @@ or <http://www.gnu.org/licenses/>."); } } if (dviname != NULL) { - if (dvi != NULL && dvi->filep != NULL) + if (dvi != NULL && dvi->filep != NULL) DVIClose(dvi); - dvi=DVIOpen(dviname,outname); + dvi=DVIOpen(dviname,outname); } if (dvi==NULL) { @@ -657,18 +642,15 @@ or <http://www.gnu.org/licenses/>."); fprintf(stdout," --png Output PNG images (dvipng default)\n"); #endif fprintf(stdout," --strict When a warning occurs, exit\n"); -#ifdef HAVE_LIBT1 - fprintf(stdout," --t1lib* T1lib font rendering (default on)\n"); -#endif #ifdef HAVE_GDIMAGECREATETRUECOLOR fprintf(stdout," --truecolor* Truecolor output\n"); #endif - fprintf(stdout," -Q # Quality (T1lib and PK subsampling)\n"); + fprintf(stdout," -Q # Quality (PK subsampling)\n"); fprintf(stdout," --width* Output the image width on stdout\n"); #ifdef HAVE_GDIMAGEPNGEX fprintf(stdout," -z # PNG compression level\n"); #endif - + fprintf(stdout,"\n # = number f = file s = string * = suffix, '0' to turn off\n"); fprintf(stdout," c = comma-separated dimension pair (e.g., 3.2in,-32.1cm)\n\n"); /*#ifdef HAVE_LIBKPATHSEA @@ -682,7 +664,7 @@ or <http://www.gnu.org/licenses/>."); exit(EXIT_SUCCESS); } } - if ((option_flags & PARSE_STDIN) == 0 && (!ppused)) + if ((option_flags & PARSE_STDIN) == 0 && (!ppused)) ParsePages("-"); return((option_flags & PARSE_STDIN) != 0); } @@ -694,7 +676,7 @@ void DecodeString(char *string) int strc=1; strv[0]=NULL; /* No program name */ - while (*string==' ' || *string=='\t' || *string=='\r' || *string=='\n') + while (*string==' ' || *string=='\t' || *string=='\r' || *string=='\n') string++; while (*string!='\0') { strv[strc++]=string; @@ -706,12 +688,12 @@ void DecodeString(char *string) } else { /* String delimiter found , so search for next */ strv[strc-1]=++string; - while (*string!='\'' && *string!='\0') + while (*string!='\'' && *string!='\0') string++; } if (*string!='\0') *string++='\0'; - while (*string==' ' || *string=='\t' || *string=='\r' || *string=='\n') + while (*string==' ' || *string=='\t' || *string=='\r' || *string=='\n') string++; } if (strc>1) /* Nonempty */ @@ -723,7 +705,7 @@ void DecodeString(char *string) uint32_t UNumRead(unsigned char* current, register int n) { uint32_t x = (unsigned char) *(current)++; /* number being constructed */ - while(--n) + while(--n) x = (x << 8) | *(current)++; return(x); } @@ -749,7 +731,7 @@ void Fatal (const char *fmt, ...) fprintf(stderr, "\n"); fprintf(stderr, "%s: Fatal error, ", programname); vfprintf(stderr, fmt, args); - + fprintf(stderr, "\n\n"); va_end(args); @@ -757,11 +739,7 @@ void Fatal (const char *fmt, ...) #ifdef HAVE_FT2 if (libfreetype) (void) FT_Done_FreeType(libfreetype); /* at this point, ignore error */ -#endif -#ifdef HAVE_LIBT1 - if (libt1) - (void) T1_CloseLib(); /* at this point, ignore error */ -#endif +#endif exit(EXIT_FATAL); } @@ -824,8 +802,7 @@ bool MmapFile (char *filename,struct filemmap *fmmap) return(true); } # else /* HAVE_MMAP */ - fmmap->data = malloc(fmmap->size); - if (fmmap->data == NULL) { + if ((fmmap->data = malloc(fmmap->size+1)) == NULL) { Warning("cannot malloc space for <%s>",filename); close(fmmap->fd); return(true); @@ -840,7 +817,7 @@ bool MmapFile (char *filename,struct filemmap *fmmap) close(fmmap->fd); # endif /* HAVE_MMAP */ #else /* WIN32 */ - fmmap->hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, 0, + fmmap->hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, 0); if (fmmap->hFile == INVALID_HANDLE_VALUE) { Warning("cannot open file <%s>", filename); diff --git a/Build/source/texk/dvipng/dvipng-1.14/papersiz.c b/Build/source/texk/dvipng/dvipng-1.15/papersiz.c index 6f5e99794d2..6f5e99794d2 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/papersiz.c +++ b/Build/source/texk/dvipng/dvipng-1.15/papersiz.c diff --git a/Build/source/texk/dvipng/dvipng-1.14/pk.c b/Build/source/texk/dvipng/dvipng-1.15/pk.c index 0806bc778e0..2691e402d3c 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/pk.c +++ b/Build/source/texk/dvipng/dvipng-1.15/pk.c @@ -62,7 +62,7 @@ static uint32_t pk_packed_num(unsigned char** pos) } else if (i <= (int)dyn_f) { return ((uint32_t)i); } else if (i < 14) { - return ((i-(uint32_t)dyn_f - 1) * 16 + (uint32_t)getnyb(pos) + return ((i-(uint32_t)dyn_f - 1) * 16 + (uint32_t)getnyb(pos) + dyn_f + 1); } else { if (i == 14) { @@ -83,7 +83,7 @@ static unsigned char* skip_specials(unsigned char* pos) switch (*pos++) { case 243: i = *pos++; - case 242: + case 242: i = 256 * i + *pos++; case 241: i = 256 * i + *pos++; @@ -92,9 +92,9 @@ static unsigned char* skip_specials(unsigned char* pos) DEBUG_PRINT(DEBUG_PK,("\n PK SPECIAL\t'%.*s' ",(int)i,pos)); pos += i; break; - case 244: + case 244: #ifdef DEBUG - { + { uint32_t c; c=UNumRead(pos,4); DEBUG_PRINT(DEBUG_PK,("\n PK SPECIAL\t%d",c)); @@ -102,14 +102,14 @@ static unsigned char* skip_specials(unsigned char* pos) #endif pos += 4; break; - case 245: + case 245: break; case 246: DEBUG_PRINT(DEBUG_PK,("\n PK\tNOP ")); break; case 247: case 248: case 249: case 250: case 251: case 252: case 253: case 254: - case 255: + case 255: Fatal("unexpected PK flagbyte %d", (int)*pos); } } @@ -152,7 +152,7 @@ void LoadPK(int32_t c, register struct char_entry * ptr) ptr->tfmw = (dviunits) ((int64_t) ptr->tfmw * currentfont->s / 0x100000 ); DEBUG_PRINT(DEBUG_PK,(" (%d)",ptr->tfmw)); - + width = UNumRead(pos, n); height = UNumRead(pos+=n, n); DEBUG_PRINT(DEBUG_PK,(" %dx%d",width,height)); @@ -160,7 +160,7 @@ void LoadPK(int32_t c, register struct char_entry * ptr) if (width > 0x7fff || height > 0x7fff) Fatal("character %d too large in file %s", c, currentfont->name); - /* + /* * Hotspot issues: Shrinking to the topleft corner rather than the hotspot will displace glyphs a fraction of a pixel. We deal with this in as follows: The glyph is shrunk to its hotspot by @@ -169,7 +169,7 @@ void LoadPK(int32_t c, register struct char_entry * ptr) will then act as shrinking to the hotspot. This may enlarge the bitmap somewhat, of course. (Also remember that the below calculation of i/j_offset is in integer arithmetics.) - + There will still be a displacement from rounding the dvi position, but vertically it will be equal for all glyphs on a line, so we displace a whole line vertically by fractions of a @@ -189,7 +189,7 @@ void LoadPK(int32_t c, register struct char_entry * ptr) ptr->yOffset = yoffset+j_offset; DEBUG_PRINT(DEBUG_PK,(" (%dx%d)",width,height)); - /* + /* Extra marginal so that we do not crop the image when shrinking. */ shrunk_width = (width + shrinkfactor - 1) / shrinkfactor; @@ -197,8 +197,9 @@ void LoadPK(int32_t c, register struct char_entry * ptr) ptr->w = shrunk_width; ptr->h = shrunk_height; pos+=n; - buffer = calloc(shrunk_width*shrunk_height* - shrinkfactor*shrinkfactor,sizeof(char)); + if ((buffer = calloc(shrunk_width*shrunk_height* + shrinkfactor*shrinkfactor,sizeof(char)))==NULL) + Fatal("cannot allocate space for pk buffer"); DEBUG_PRINT(DEBUG_GLYPH,("\nDRAW GLYPH %d\n", (int)c)); /* Raster char */ if (dyn_f == 14) { /* get raster by bits */ @@ -228,25 +229,25 @@ void LoadPK(int32_t c, register struct char_entry * ptr) count = pk_packed_num(&pos); while (count > 0) { if (i+count < width) { - if (paint_switch) + if (paint_switch) for(k=0;k<count;k++) { buffer[k+i+j*width]=1; DEBUG_PRINT(DEBUG_GLYPH,("*")); } #ifdef DEBUG - else for(k=0;k<count;k++) + else for(k=0;k<count;k++) DEBUG_PRINT(DEBUG_GLYPH,(" ")); #endif i += count; count = 0; } else { - if (paint_switch) + if (paint_switch) for(k=i;k<width;k++) { buffer[k+j*width]=1; DEBUG_PRINT(DEBUG_GLYPH,("#")); } #ifdef DEBUG - else for(k=i;k<width;k++) + else for(k=i;k<width;k++) DEBUG_PRINT(DEBUG_GLYPH,(" ")); #endif DEBUG_PRINT(DEBUG_GLYPH,("|\n")); @@ -272,7 +273,7 @@ void LoadPK(int32_t c, register struct char_entry * ptr) paint_switch = 1 - paint_switch; } if (i>i_offset) - Fatal("wrong number of bits stored: char. %c, font %s", + Fatal("wrong number of bits stored: char. %c, font %s", (char)c, currentfont->name); if (j>height) Fatal("bad PK file %s, too many bits", currentfont->name); @@ -284,8 +285,8 @@ void LoadPK(int32_t c, register struct char_entry * ptr) */ if ((ptr->data = calloc(shrunk_width*shrunk_height,sizeof(char))) == NULL) Fatal("unable to malloc image space for char %c", (char)c); - for (j = 0; j < (int) height; j++) { - for (i = 0; i < (int) width; i++) { + for (j = 0; j < (int) height; j++) { + for (i = 0; i < (int) width; i++) { /* if (((i % shrinkfactor) == 0) && ((j % shrinkfactor) == 0)) ptr->data[i/shrinkfactor+j/shrinkfactor*shrunk_width] = buffer[i+j*width]; @@ -293,15 +294,15 @@ void LoadPK(int32_t c, register struct char_entry * ptr) ptr->data[i/shrinkfactor+j/shrinkfactor*shrunk_width] += buffer[i+j*width]; } - } - for (j = 0; j < shrunk_height; j++) { - for (i = 0; i < shrunk_width; i++) { + } + for (j = 0; j < shrunk_height; j++) { + for (i = 0; i < shrunk_width; i++) { ptr->data[i+j*shrunk_width] = ptr->data[i+j*shrunk_width] *255/shrinkfactor/shrinkfactor; DEBUG_PRINT(DEBUG_GLYPH,("%3u ",ptr->data[i+j*shrunk_width])); } DEBUG_PRINT(DEBUG_GLYPH,("|\n")); - } + } free(buffer); } @@ -317,11 +318,11 @@ void InitPK(struct font_entry * tfontp) if (MmapFile(tfontp->name,&(tfontp->fmmap))) Fatal("font file %s unusable", tfontp->name); position=(unsigned char*)tfontp->fmmap.data; - if (tfontp->fmmap.size < 2 || tfontp->fmmap.size < 3+*(position+2)+16) + if (tfontp->fmmap.size < 2 || tfontp->fmmap.size < 3+*(position+2)+16) Fatal("PK file %s ends prematurely",tfontp->name); - if (*position++ != PK_PRE) + if (*position++ != PK_PRE) Fatal("unknown font format in file %s",tfontp->name); - if (*position++ != PK_ID) + if (*position++ != PK_ID) Fatal( "wrong version %d of PK file %s (should be 89)", (int)*(position-1),tfontp->name); DEBUG_PRINT(DEBUG_PK,("\n PK_PRE:\t'%.*s'",(int)*position, position+1)); @@ -330,7 +331,7 @@ void InitPK(struct font_entry * tfontp) tfontp->designsize = UNumRead(position, 4); DEBUG_PRINT(DEBUG_PK,(" %d", tfontp->designsize)); tfontp->type = FONT_TYPE_PK; - + c = UNumRead(position+4, 4); DEBUG_PRINT(DEBUG_PK,(" %d", c)); CheckChecksum (tfontp->c, c, tfontp->name); @@ -353,7 +354,7 @@ void InitPK(struct font_entry * tfontp) (long)position - (long)tfontp->fmmap.data, *position)); #endif if ((tcharptr = malloc(sizeof(struct char_entry))) == NULL) - Fatal("cannot malloc space for char_entry"); + Fatal("cannot allocate space for char_entry"); tcharptr->flag_byte = *position; tcharptr->data = NULL; tcharptr->tfmw = 0; diff --git a/Build/source/texk/dvipng/dvipng-1.14/ppagelist.c b/Build/source/texk/dvipng/dvipng-1.15/ppagelist.c index b7467a98539..b7467a98539 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/ppagelist.c +++ b/Build/source/texk/dvipng/dvipng-1.15/ppagelist.c diff --git a/Build/source/texk/dvipng/dvipng-1.14/readme.texi b/Build/source/texk/dvipng/dvipng-1.15/readme.texi index 378333376ae..32faa64c02b 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/readme.texi +++ b/Build/source/texk/dvipng/dvipng-1.15/readme.texi @@ -12,7 +12,7 @@ @c ----------------------- This program makes PNG and/or GIF graphics from DVI files as obtained -from @TeX{} and its relatives. +from @TeX{} and its relatives. If GIF support is enabled, GIF output is chosen by using the @samp{dvigif} binary or with the @samp{--gif} option. @@ -24,7 +24,7 @@ as is possible. The target audience is people who need to generate and regenerate many images again and again. The primary target is the @previewlatex{} (X)Emacs package, a package to preview formulas from within (X)Emacs. Yes, you get to see your formulas in the (X)Emacs -buffer, see @url{http://www.gnu.org/software/auctex/preview-latex.html}. +buffer, see @url{http://www.gnu.org/software/auctex/preview-latex.html}. Another example is WeBWorK, an internet-based method for delivering homework problems to students over the internet, giving students @@ -47,28 +47,28 @@ and WYSIWYG editors like LyX. The benefits of @samp{dvipng}/@samp{dvigif} include @itemize @bullet -@item +@item Speed. It is a very fast bitmap-rendering code for DVI files, which makes it suitable for generating large amounts of images on-the-fly, as needed in @previewlatex{}, WeBWorK and others. -@item +@item It does not read the postamble, so it can be started before @TeX{} finishes. There is a @samp{--follow} switch that makes dvipng wait at end-of-file for further output, unless it finds the POST marker that indicates the end of the DVI. -@item +@item Interactive query of options. dvipng can read options interactively through stdin, and all options are usable. It is even possible to change the input file through this interface. -@item +@item Supports PK, VF, PostScript Type1, and TrueType fonts, subfonts (i.e., as used in CJK-@LaTeX{}), color specials, and inclusion of PostScript, PNG, JPEG or GIF images. -@item +@item and more... @end itemize @@ -105,7 +105,7 @@ The dvipng package is available at Savannah, the GNU project site. Since dvipng is not part of the GNU project, although released under the GNU GPL, the web address is @url{http://savannah.nongnu.org/projects/dvipng}. Instructions for -anonymous CVS access can be found at +anonymous CVS access can be found at @url{http://savannah.nongnu.org/cvs/?group=dvipng}. @section Contacts @@ -127,7 +127,7 @@ This program is released under the GNU Lesser General Public License version 3, see the COPYING file in the dvipng distribution or @url{http://www.gnu.org/licenses/}. -Copyright @copyright{} 2002-2009 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2014 Jan-@AA{}ke Larsson @section Todo @@ -139,18 +139,15 @@ Use gs interpreter library for speed and possibly for functionality. Add more color models for xcolor compatibility @item -Fix T1lib and PK rendering so it is on par with Freetype. - -@item Enable a named pipe as DVI -@item +@item Further speed improvements. -@item +@item Other output specials and source specials. -@item +@item Clean internal structures. Overhaul file handling. @item diff --git a/Build/source/texk/dvipng/dvipng-1.14/set.c b/Build/source/texk/dvipng/dvipng-1.15/set.c index af4e4ebdfaa..9f3ce99b05a 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/set.c +++ b/Build/source/texk/dvipng/dvipng-1.15/set.c @@ -18,7 +18,7 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2010 Jan-Åke Larsson + Copyright (C) 2002-2015 Jan-Åke Larsson ************************************************************************/ @@ -26,8 +26,8 @@ #include <math.h> #ifndef HAVE_GDIMAGECREATETRUECOLOR -#define gdImageColorAllocateAlpha(i,r,g,b,a) gdImageColorAllocate(i,r,g,b) -#define gdImageColorResolveAlpha(i,r,g,b,a) gdImageColorResolve(i,r,g,b) +#define gdImageColorAllocateAlpha(i,r,g,b,a) gdImageColorAllocate(i,r,g,b) +#define gdImageColorResolveAlpha(i,r,g,b,a) gdImageColorResolve(i,r,g,b) #define gdImageAlpha(i,c) 0 #define gdAlphaMax 127 #endif @@ -35,36 +35,38 @@ #define gdImagePngEx(i,f,z) gdImagePng(i,f) #endif -/* Persistent color cache. Index is ink thickness, +/* Persistent color cache. Index is ink thickness, 0=no ink, 127=total coverage */ static int ColorCache[gdAlphaMax+1]; void CreateImage(pixels x_width,pixels y_width) { - if (page_imagep) + if (page_imagep) gdImageDestroy(page_imagep); if (x_width <= 0) x_width=1; if (y_width <= 0) y_width=1; #ifdef HAVE_GDIMAGECREATETRUECOLOR /* GIFs are 256-color */ if ((option_flags & FORCE_TRUECOLOR - || page_flags & PAGE_TRUECOLOR) + || page_flags & PAGE_TRUECOLOR) && ~option_flags & GIF_OUTPUT - && ~option_flags & FORCE_PALETTE) + && ~option_flags & FORCE_PALETTE) page_imagep=gdImageCreateTrueColor(x_width,y_width); else #endif page_imagep=gdImageCreate(x_width,y_width); /* Set bg color. GIFs cannot handle an alpha channel, resort to transparent color index, set in WriteImage */ - ColorCache[0] + if (!page_imagep) + Fatal("cannot allocate GD image for DVI"); + ColorCache[0] = gdImageColorAllocateAlpha(page_imagep, cstack[0].red, cstack[0].green, cstack[0].blue, - (option_flags & BG_TRANSPARENT_ALPHA + (option_flags & BG_TRANSPARENT_ALPHA && ~option_flags & GIF_OUTPUT) ? 127 : 0); - ColorCache[gdAlphaMax]=-1; + ColorCache[gdAlphaMax]=-1; #ifdef HAVE_GDIMAGECREATETRUECOLOR /* Alpha blending in libgd is only performed for truecolor images. We need it for palette images also. Turn libgd alpha blending off @@ -73,9 +75,9 @@ void CreateImage(pixels x_width,pixels y_width) gdImageAlphaBlending(page_imagep, 0); if (option_flags & BG_TRANSPARENT_ALPHA) gdImageSaveAlpha(page_imagep, 1); - if (page_imagep->trueColor) + if (page_imagep->trueColor) /* Truecolor: there is no background color index, fill image instead. */ - gdImageFilledRectangle(page_imagep, 0, 0, + gdImageFilledRectangle(page_imagep, 0, 0, x_width-1, y_width-1, ColorCache[0]); #endif } @@ -88,7 +90,7 @@ static void ChangeColor(gdImagePtr imagep,int x1,int y1, int x,y; for( y=y1; y<=y2; y++) { for( x=x1; x<=x2; x++) { - if (gdImageGetPixel(imagep, x, y)==color1) + if (gdImageGetPixel(imagep, x, y)==color1) gdImageSetPixel(imagep, x, y, color2); } } @@ -111,7 +113,7 @@ void WriteImage(char *pngname, int pagenum) x_width=gdImageSX(page_imagep); y_width=gdImageSY(page_imagep); - + /* Set ANOTHER bg color, transparent this time */ /* No semi-transparency here, given the motivation for this code * (box cursor visibility in Emacs) */ @@ -119,13 +121,13 @@ void WriteImage(char *pngname, int pagenum) Transparent = gdImageColorAllocate(page_imagep, bordercolor.red, bordercolor.green, - bordercolor.blue); + bordercolor.blue); else Transparent = gdImageColorAllocate(page_imagep, gdImageRed(page_imagep,ColorCache[0]), gdImageGreen(page_imagep,ColorCache[0]), - gdImageBlue(page_imagep,ColorCache[0])); - gdImageColorTransparent(page_imagep,Transparent); + gdImageBlue(page_imagep,ColorCache[0])); + gdImageColorTransparent(page_imagep,Transparent); ChangeColor(page_imagep,0,0,x_width-1,borderwidth-1, ColorCache[0],Transparent); ChangeColor(page_imagep,0,0,borderwidth-1,y_width-1, @@ -139,11 +141,12 @@ void WriteImage(char *pngname, int pagenum) if ((pos=strchr(pngname,'%')) != NULL) { if (strchr(++pos,'%')) Fatal("too many %%s in output file name"); - if (*pos == 'd' + if (*pos == 'd' || (*pos=='0' && pos[1]>='1' && pos[1]<='9' && pos[2]=='d')) { - /* %d -> pagenumber, so add 9 string positions + /* %d -> pagenumber, so add 9 string positions since pagenumber max +-2^31 or +-2*10^9 */ - freeme = malloc(strlen(pngname)+9); + if ((freeme = malloc(strlen(pngname)+9))==NULL) + Fatal("cannot allocate memory for output file name"); sprintf(freeme,pngname,pagenum); pngname = freeme; } else { @@ -151,7 +154,7 @@ void WriteImage(char *pngname, int pagenum) } } #ifdef HAVE_GDIMAGEGIF - if (option_flags & GIF_OUTPUT && (pos=strrchr(pngname,'.')) != NULL + if (option_flags & GIF_OUTPUT && (pos=strrchr(pngname,'.')) != NULL && strcmp(pos,".png")==0) { *(pos+1)='g'; *(pos+2)='i'; @@ -161,7 +164,7 @@ void WriteImage(char *pngname, int pagenum) if ((outfp = fopen(pngname,"wb")) == NULL) Fatal("cannot open output file %s",pngname); #ifdef HAVE_GDIMAGEGIF - if (option_flags & GIF_OUTPUT) + if (option_flags & GIF_OUTPUT) gdImageGif(page_imagep,outfp); else #endif @@ -192,7 +195,7 @@ static int gammatable[]= void Gamma(double gamma) { int i=0; - + while (i<=gdAlphaMax) { gammatable[i]=gdAlphaMax- (int)(pow((gdAlphaMax-i)/((double)gdAlphaMax),gamma)*gdAlphaMax); @@ -214,7 +217,7 @@ dviunits SetGlyph(struct char_entry *ptr, int32_t hh,int32_t vv) /* Initialize persistent color cache. Perhaps this should be in color.c? */ pixelcolor=gdImageColorResolve(page_imagep, - cstack[csp].red, + cstack[csp].red, cstack[csp].green, cstack[csp].blue); if (ColorCache[gdAlphaMax]!=pixelcolor) { @@ -269,7 +272,7 @@ dviunits SetRule(dviunits a, dviunits b, subpixels hh,subpixels vv) if ((height>0) && (width>0)) { /* This code produces too dark rules. But what the hell. Grey * rules look fuzzy. */ - Color = gdImageColorResolve(page_imagep, + Color = gdImageColorResolve(page_imagep, cstack[csp].red, cstack[csp].green, cstack[csp].blue); diff --git a/Build/source/texk/dvipng/dvipng-1.14/sfd.c b/Build/source/texk/dvipng/dvipng-1.15/sfd.c index 92fae01d960..5c059e9add9 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/sfd.c +++ b/Build/source/texk/dvipng/dvipng-1.15/sfd.c @@ -25,13 +25,13 @@ #include "dvipng.h" struct subfont* subfontp=NULL; -static struct subfont* ReadSubfont(char* sfdname, char *infix) +static struct subfont* ReadSubfont(char* sfdname, char *infix) { char *pos,*max,*sfdfile=NULL; struct subfont* sfdp=NULL; struct filemmap fmmap; boolean mmapfailed; - + /* OK, find subfont and look for correct infix */ #ifdef HAVE_KPSE_ENC_FORMATS sfdfile=kpse_find_file(sfdname,kpse_sfd_format,false); @@ -52,7 +52,7 @@ static struct subfont* ReadSubfont(char* sfdname, char *infix) while(pos<max && *pos!='\r' && *pos!='\n') pos++; while(pos<max && (*pos==' ' || *pos=='\r' || *pos=='\n' || *pos=='\t')) pos++; } - while(pos+strlen(infix)<max + while(pos+strlen(infix)<max && (strncmp(pos,infix,strlen(infix))!=0 || (pos[strlen(infix)]!=' ' && pos[strlen(infix)]!='\t'))) { /* skip lines, taking line continuation into account */ @@ -71,7 +71,7 @@ static struct subfont* ReadSubfont(char* sfdname, char *infix) if ((sfdp = calloc(sizeof(struct subfont)+strlen(sfdname)+1 +strlen(infix)+1,1))==NULL) { - Warning("cannot alloc space for subfont",sfdname); + Warning("cannot allocate memory for subfont",sfdname); UnMmapFile(&fmmap); return(NULL); } @@ -84,7 +84,7 @@ static struct subfont* ReadSubfont(char* sfdname, char *infix) number=strtol(pos,&pos,0); while(pos<max && (*pos==' ' || *pos=='\t')) pos++; switch(*pos) { - case ':': + case ':': codepoint=number; pos++; break; @@ -92,14 +92,14 @@ static struct subfont* ReadSubfont(char* sfdname, char *infix) range=strtol(pos+1,&pos,0); while(codepoint<256 && number<range) { sfdp->charindex[codepoint]=number; - DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT MAP %d %d",codepoint,number)); + DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT MAP %d %d",codepoint,number)); number++; codepoint++; } default: if (codepoint<256) sfdp->charindex[codepoint]=number; - DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT MAP %d %d",codepoint,number)); + DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT MAP %d %d",codepoint,number)); } while(pos<max && (*pos==' ' || *pos=='\t')) pos++; /* take line continuation into account */ @@ -113,7 +113,7 @@ static struct subfont* ReadSubfont(char* sfdname, char *infix) return (sfdp); } -struct psfontmap* FindSubFont(struct psfontmap* entry, char* fontname) +struct psfontmap* FindSubFont(struct psfontmap* entry, char* fontname) { struct subfont *temp=subfontp; char *sfdspec=entry->tfmname,*sfdwant=fontname, @@ -124,7 +124,7 @@ struct psfontmap* FindSubFont(struct psfontmap* entry, char* fontname) sfdwant++; } /* Find delimiter */ - if (*sfdspec!='@') + if (*sfdspec!='@') return(NULL); sfdspec++; postfix=sfdspec; @@ -133,7 +133,8 @@ struct psfontmap* FindSubFont(struct psfontmap* entry, char* fontname) if (*postfix!='@') return(NULL); /* Extract subfont name */ - sfdname=malloc(postfix-sfdspec+1); + if ((sfdname=malloc(postfix-sfdspec+1))==NULL) + Fatal("cannot allocate memory for subfont name"); strncpy(sfdname,sfdspec,postfix-sfdspec); sfdname[postfix-sfdspec]='\0'; /* Check postfix */ @@ -141,12 +142,13 @@ struct psfontmap* FindSubFont(struct psfontmap* entry, char* fontname) if (strcmp(sfdwant+strlen(sfdwant)-strlen(postfix),postfix)!=0) return(NULL); /* Extract infix */ - infix=malloc(strlen(sfdwant)-strlen(postfix)+1); + if ((infix=malloc(strlen(sfdwant)-strlen(postfix)+1))==NULL) + Fatal("cannot allocate memory for subfont infix"); strncpy(infix,sfdwant,strlen(sfdwant)-strlen(postfix)); infix[strlen(sfdwant)-strlen(postfix)]='\0'; - DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT %s %s %s",fontname,sfdname,infix)); + DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT %s %s %s",fontname,sfdname,infix)); /* Find subfont */ - while(temp!=NULL + while(temp!=NULL && (strcmp(sfdname,temp->name)!=0 || strcmp(infix,temp->infix)!=0)) temp=temp->next; if (temp==NULL) { @@ -176,4 +178,3 @@ void ClearSubfont(void) temp=subfontp; } } - diff --git a/Build/source/texk/dvipng/dvipng-1.14/special.c b/Build/source/texk/dvipng/dvipng-1.15/special.c index 9d5ef1b06e8..d685b1365c5 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/special.c +++ b/Build/source/texk/dvipng/dvipng-1.15/special.c @@ -18,7 +18,7 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2010 Jan-Åke Larsson + Copyright (C) 2002-2015 Jan-Åke Larsson ************************************************************************/ @@ -35,7 +35,7 @@ #define SKIPSPACES(s) while(s && *s==' ' && *s!='\0') s++ -/* PostScript can come as a string (headers and raw specials) or +/* PostScript can come as a string (headers and raw specials) or a memory-mapped file (headers and included EPS figures). */ struct pscode { @@ -124,7 +124,7 @@ static void writepscode(FILE* psstream,struct pscode* pscodep) DEBUG_PRINT(DEBUG_GS,("\n PS FILE:\t%s",pscodep->filename)); position=(unsigned char*)pscodep->fmmap.data; - while(position + while(position < (unsigned char*)pscodep->fmmap.data + pscodep->fmmap.size) { putc(*position,psstream); position++; @@ -148,7 +148,7 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut #define READ_END 0 #define WRITE_END 1 FILE *psstream=NULL, *pngstream=NULL; - char resolution[STRSIZE]; + char resolution[STRSIZE]; /* char devicesize[STRSIZE]; */ gdImagePtr psimage=NULL; #ifndef MIKTEX @@ -175,23 +175,23 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut /* Future extension for \rotatebox status=sprintf(devicesize, "-g%dx%d", //(int)((sin(atan(1.0))+1)* - (urx - llx)*hresolution/72,//), + (urx - llx)*hresolution/72,//), //(int)((sin(atan(1.0))+1)* (ury - lly)*vresolution/72);//); */ DEBUG_PRINT(DEBUG_GS, ("\n GS CALL:\t%s %s %s %s %s %s %s %s %s %s %s",/* %s", */ GS_PATH, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", + "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - (option_flags & NO_GSSAFER) ? "-": "-dSAFER", + (option_flags & NO_GSSAFER) ? "-": "-dSAFER", (option_flags & NO_GSSAFER) ? "": "- ")); #ifndef MIKTEX if (pipe(pspipe) || pipe(pngpipe)) return(NULL); #ifndef WIN32 /* We have fork: execute gs in child */ pid = fork(); - if (pid == 0) { /* Child, execute gs. */ + if (pid == 0) { /* Child, execute gs. */ close(pspipe[WRITE_END]); dup2(pspipe[READ_END], STDIN_FILENO); close(pspipe[READ_END]); @@ -199,25 +199,25 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut dup2(pngpipe[WRITE_END], STDOUT_FILENO); close(pngpipe[WRITE_END]); execlp(GS_PATH, GS_PATH, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", + "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - (option_flags & NO_GSSAFER) ? "-": "-dSAFER", + (option_flags & NO_GSSAFER) ? "-": "-dSAFER", (option_flags & NO_GSSAFER) ? NULL: "-", NULL); _exit (EXIT_FAILURE); } #else /* WIN32 */ /* No fork but spawn: execute gs in present process environment. - Save fileno's, attach pipes to this process' stdin and stdout. */ + Save fileno's, attach pipes to this process' stdin and stdout. */ savestdin = _dup(fileno(stdin)); _dup2(pspipe[READ_END], fileno(stdin)); savestdout = _dup(fileno(stdout)); _dup2(pngpipe[WRITE_END], fileno(stdout)); if ((hchild= (HANDLE)_spawnlp(_P_NOWAIT, GS_PATH, GS_PATH, device, resolution, - "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", + "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - (option_flags & NO_GSSAFER) ? "-": "-dSAFER", + (option_flags & NO_GSSAFER) ? "-": "-dSAFER", (option_flags & NO_GSSAFER) ? NULL : "-", NULL))==0) return NULL; #endif /* WIN32 */ @@ -225,16 +225,16 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut close(pngpipe[WRITE_END]); #else /* MIKTEX */ /* No fork but miktex_start_process3: execute gs using that. - Attach file descriptors to that process' stdin and stdout. */ + Attach file descriptors to that process' stdin and stdout. */ if (! miktex_find_miktex_executable("mgs.exe", szGsPath)) { Warning("Ghostscript could not be found"); return(NULL); } snprintf(szCommandLine,2048,"\"%s\" %s %s %s %s %s %s %s %s %s %s",/* %s",*/ szGsPath, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", + "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - (option_flags & NO_GSSAFER) ? "-": "-dSAFER", + (option_flags & NO_GSSAFER) ? "-": "-dSAFER", (option_flags & NO_GSSAFER) ? "": "-"); if (! miktex_start_process_3(szCommandLine, &pi, INVALID_HANDLE_VALUE, &hPsStream, &hPngStream, &hStdErr, 0)) { @@ -246,7 +246,7 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut pngpipe[READ_END] = _open_osfhandle((intptr_t)hPngStream, _O_RDONLY); #endif /* MIKTEX */ if (pspipe[WRITE_END] >= 0) { - if ((psstream=fdopen(pspipe[WRITE_END],"wb")) == NULL) + if ((psstream=fdopen(pspipe[WRITE_END],"wb")) == NULL) close(pspipe[WRITE_END]); else { writepscode(psstream,psheaderp); @@ -267,7 +267,7 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut } } if (pngpipe[READ_END] >= 0) { - if((pngstream=fdopen(pngpipe[READ_END],"rb")) == NULL) + if((pngstream=fdopen(pngpipe[READ_END],"rb")) == NULL) close(pngpipe[READ_END]); else { psimage = gdImageCreateFromPng(pngstream); @@ -309,7 +309,7 @@ rescale(gdImagePtr psimage, int pngwidth, int pngheight) gdImagePtr scaledimage=psimage; /* Rescale unless correct size */ if (psimage!=NULL - && gdImageSX(psimage)!=pngwidth + && gdImageSX(psimage)!=pngwidth && gdImageSY(psimage)!=pngheight) { DEBUG_PRINT(DEBUG_DVI, ("\n RESCALE INCLUDED BITMAP \t(%d,%d) -> (%d,%d)", @@ -344,7 +344,7 @@ static void newpsheader(const char* special) { newpsheader("header=special.pro"); } if (strcmp(special+strlen(special)-4,".xcp")==0 - && strncmp(special,"header=",7)==0) + && strncmp(special,"header=",7)==0) InitXColorPrologue(special+7); if (strncmp(special,"! /pgfH",7)==0) newpsheader("! TeXDict begin"); @@ -377,16 +377,23 @@ static void newpsheader(const char* special) { /**************************** SetSpecial ***************************/ /*********************************************************************/ -void SetSpecial(char * special, int32_t hh, int32_t vv) +void SetSpecial(char *start, char *end, int32_t hh, int32_t vv) /* interpret a \special command, made up of keyword=value pairs, * or !header or ps:raw_PostScript */ { + char *buffer,*special; + + if ((buffer=malloc(end-start+1))==NULL) + Fatal("Cannot allocate space for special"); + special=memcpy(buffer,start,end-start); + special[end-start]='\0'; DEBUG_PRINT(DEBUG_DVI,(" '%s'",special)); SKIPSPACES(special); /********************** Color specials ***********************/ if (strncmp(special,"background ",11)==0) { background(special+11); + free(buffer); return; } if (strncmp(special,"color ",6)==0) { @@ -397,9 +404,10 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) } else { if (strcmp(special,"pop")==0) popcolor(); - else + else resetcolorstack(special); } + free(buffer); return; } @@ -427,7 +435,7 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) *special='\0'; special++; } - + /* Retrieve parameters */ SKIPSPACES(special); while(special && *special) { @@ -448,7 +456,7 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) while (*special && *special!=' ') special++; SKIPSPACES(special); } - + /* Calculate resolution, and use our base resolution as a fallback. */ /* The factor 10 is magic, the dvips graphicx driver needs this. */ hresolution = ((dpi*rwi+urx-llx-1)/(urx - llx)+9)/10; @@ -456,18 +464,18 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) if (vresolution==0) vresolution = hresolution; if (hresolution==0) hresolution = vresolution; if (hresolution==0) hresolution = vresolution = dpi; - + /* Convert from postscript 72 dpi resolution to our given resolution */ pngwidth = (dpi*rwi+719)/720; /* +719: round up */ pngheight = (dpi*rhi+719)/720; - if (pngwidth==0) + if (pngwidth==0) pngwidth = ((dpi*rhi*(urx-llx)+ury-lly-1)/(ury-lly)+719)/720; - if (pngheight==0) + if (pngheight==0) pngheight = ((dpi*rwi*(ury-lly)+urx-llx-1)/(urx-llx)+719)/720; if (pngheight==0) { pngwidth = (dpi*(urx-llx)+71)/72; pngheight = (dpi*(ury-lly)+71)/72; - } + } if (page_imagep != NULL) { /* Draw into image */ struct pscode image; gdImagePtr psimage=NULL; @@ -481,8 +489,9 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) Warning("Image file %s unusable, image will be left blank", image.filename); page_flags |= PAGE_GAVE_WARN; + free(buffer); return; - } + } Message(BE_NONQUIET," <%s",psname); switch ((unsigned char)*image.fmmap.data) { case 0x89: /* PNG magic: "\211PNG\r\n\032\n" */ @@ -539,7 +548,7 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) DEBUG_PRINT((DEBUG_DVI | DEBUG_GS), ("\n GS RENDER \t%s -> pngalpha ",image.filename)); if (!clip) { - /* Render across the whole image */ + /* Render across the whole image */ tllx=llx-(hh+1)*72/hresolution; tlly=lly-(gdImageSY(page_imagep)-vv-1)*72/vresolution; turx=llx+(gdImageSX(page_imagep)-hh)*72/hresolution; @@ -552,8 +561,8 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) DEBUG_PRINT((DEBUG_DVI | DEBUG_GS),(", CLIPPED TO BBOX")); #endif } - psimage = ps2png(&image, "-sDEVICE=pngalpha", - hresolution, vresolution, + psimage = ps2png(&image, "-sDEVICE=pngalpha", + hresolution, vresolution, tllx, tlly, turx, tury, 255,255,255); if (psimage==NULL) @@ -566,7 +575,7 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) DEBUG_PRINT((DEBUG_DVI | DEBUG_GS), ("\n GS RENDER \t%s -> png16m", image.filename)); psimage = ps2png(&image, "-sDEVICE=png16m", - hresolution, vresolution, + hresolution, vresolution, llx, lly, urx, ury, cstack[0].red,cstack[0].green,cstack[0].blue); clip=true; @@ -595,7 +604,7 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) Warning("Using libgd < 2.0.12, opaque image inclusion"); page_flags |= PAGE_GAVE_WARN; #endif - gdImageCopy(page_imagep, psimage, + gdImageCopy(page_imagep, psimage, hh, vv-gdImageSY(psimage)+1, 0,0, gdImageSX(psimage),gdImageSY(psimage)); @@ -606,7 +615,7 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) } else { Warning("Unable to load %s, image will be left blank",image.filename); page_flags |= PAGE_GAVE_WARN; - } + } free(image.filename); Message(BE_NONQUIET,">"); } else { /* Don't draw */ @@ -620,50 +629,55 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) max(x_max,hh+pngwidth); max(y_max,vv+1); } + free(buffer); return; } /******************* Raw PostScript ********************/ - if (strncmp(special,"!/preview@version(",18)==0) { + if (strncmp(special,"!/preview@version(",18)==0) { int length=0; special+=18; - while (special[length]!='\0' && special[length]!=')') + while (special[length]!='\0' && special[length]!=')') length++; - if (page_imagep==NULL) + if (page_imagep==NULL) Message(BE_NONQUIET," (preview-latex version %.*s)",length,special); + free(buffer); return; } /* preview-latex' tightpage option */ - if (strncmp(special,"!/preview@tightpage",19)==0) { + if (strncmp(special,"!/preview@tightpage",19)==0) { special+=19; SKIPSPACES(special); if (strncmp(special,"true",4)==0) { - if (page_imagep==NULL) + if (page_imagep==NULL) Message(BE_NONQUIET," (preview-latex tightpage option detected, will use its bounding box)"); dvi->flags |= DVI_PREVIEW_LATEX_TIGHTPAGE; } + free(buffer); return; } - if (strncmp(special,"!userdict",9)==0 + if (strncmp(special,"!userdict",9)==0 && strstr(special+10,"7{currentfile token not{stop}if 65781.76 div")!=NULL) { - if (page_imagep==NULL && ~dvi->flags & DVI_PREVIEW_LATEX_TIGHTPAGE) + if (page_imagep==NULL && ~dvi->flags & DVI_PREVIEW_LATEX_TIGHTPAGE) Message(BE_NONQUIET," (preview-latex <= 0.9.1 tightpage option detected, will use its bounding box)"); dvi->flags |= DVI_PREVIEW_LATEX_TIGHTPAGE; + free(buffer); return; } /* preview-latex' dvips bop-hook redefinition */ - if (strncmp(special,"!userdict",9)==0 + if (strncmp(special,"!userdict",9)==0 && strstr(special+10,"preview-bop-")!=NULL) { dvi->flags |= DVI_PREVIEW_BOP_HOOK; - if (page_imagep==NULL) + if (page_imagep==NULL) Message(BE_VERBOSE," (preview-latex beginning-of-page-hook detected)"); + free(buffer); return; } - if (dvi->flags & DVI_PREVIEW_BOP_HOOK && ~page_flags & PAGE_PREVIEW_BOP + if (dvi->flags & DVI_PREVIEW_BOP_HOOK && ~page_flags & PAGE_PREVIEW_BOP && strncmp(special,"ps::",4)==0) { /* Hokay, decode bounding box */ dviunits adj_llx,adj_lly,adj_urx,adj_ury,ht,dp,wd; @@ -676,21 +690,22 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) wd = strtol(special,&special,10); page_flags |= PAGE_PREVIEW_BOP; if (wd>0) { - x_offset_tightpage = + x_offset_tightpage = (-adj_llx+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; x_width_tightpage = x_offset_tightpage +(wd+adj_urx+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; } else { - x_offset_tightpage = + x_offset_tightpage = (-wd+adj_urx+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; x_width_tightpage = x_offset_tightpage +(-adj_llx+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; } /* y-offset = height - 1 */ - y_offset_tightpage = + y_offset_tightpage = (((ht>0)?ht:0)+adj_ury+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor-1; y_width_tightpage = y_offset_tightpage+1 +(((dp>0)?dp:0)-adj_lly+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; + free(buffer); return; } @@ -698,7 +713,8 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) if (option_flags & NO_RAW_PS) { Warning("Raw PostScript rendering disallowed by --norawps" ); page_flags |= PAGE_GAVE_WARN; - return; + free(buffer); + return; } if (page_imagep != NULL) { /* Draw into image */ static struct pscode *pscodep=NULL; @@ -708,8 +724,8 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) gdImagePtr psimage=NULL; char *txt; const char *specialend=special+strlen(special); - const char *newspecial=NULL; - + const char *newspecial=NULL; + /* hyperref non-rendering PostScript specials. */ if (strcmp(specialend-11,"pdfmark end")==0 || strcmp(specialend-7,"H.A end")==0 @@ -719,9 +735,10 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) || strcmp(specialend-7,"H.S end")==0 || strcmp(specialend-7,"H.V end")==0 || strncmp(special,"ps:SDict begin /product",23)==0) - if (pscodep==NULL) + if (pscodep==NULL) { + free(buffer); return; - else + } else newspecial=""; /* pgf PostScript specials. */ else if (strcmp(special,"ps:: pgfo")==0) @@ -763,6 +780,7 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) Fatal("cannot allocate space for raw PostScript special"); strcpy(txt,newspecial); PSCodeInit(tmp,txt); + free(buffer); return; } DEBUG_PRINT(DEBUG_DVI,("\n LAST PS SPECIAL ")); @@ -781,9 +799,9 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) libgd 2.0.12 upwards */ #ifdef HAVE_GDIMAGEPNGEX if (page_imagep->trueColor) { - /* Render across the whole image */ - psimage = ps2png(pscodep, "-sDEVICE=pngalpha", - dpi,dpi, + /* Render across the whole image */ + psimage = ps2png(pscodep, "-sDEVICE=pngalpha", + dpi,dpi, -(hh+1)*72/dpi, -(gdImageSY(page_imagep)-vv-1)*72/dpi, (gdImageSX(page_imagep)-hh)*72/dpi, @@ -791,7 +809,7 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) 255,255,255); if (psimage!=NULL) { gdImageAlphaBlending(page_imagep,1); - gdImageCopy(page_imagep, psimage, + gdImageCopy(page_imagep, psimage, 0,0,0,0, gdImageSX(psimage),gdImageSY(psimage)); gdImageAlphaBlending(page_imagep,0); @@ -814,21 +832,24 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) pscodep=NULL; if (newspecial != NULL) free(special); - if (psimage==NULL) + if (psimage==NULL) page_flags |= PAGE_GAVE_WARN; Message(BE_NONQUIET,">"); } else { /* Don't draw */ page_flags |= PAGE_TRUECOLOR; } + free(buffer); return; } if (strncmp(special,"papersize=",10)==0) { /* papersize spec, ignored */ + free(buffer); return; } if (special[0]=='!' || strncmp(special,"header=",7)==0) { /* PS header */ newpsheader(special); + free(buffer); return; } @@ -836,6 +857,7 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) if ( page_imagep != NULL ) Message(BE_NONQUIET," at (%ld,%ld) source \\special{%s}", hh, vv, special); + free(buffer); return; } if ( page_imagep != NULL ) { @@ -843,5 +865,5 @@ void SetSpecial(char * special, int32_t hh, int32_t vv) hh, vv, special); page_flags |= PAGE_GAVE_WARN; } + free(buffer); } - diff --git a/Build/source/texk/dvipng/dvipng-1.14/test_dvipng.tex b/Build/source/texk/dvipng/dvipng-1.15/test_dvipng.tex index 34814776070..34814776070 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/test_dvipng.tex +++ b/Build/source/texk/dvipng/dvipng-1.15/test_dvipng.tex diff --git a/Build/source/texk/dvipng/dvipng-1.14/tfm.c b/Build/source/texk/dvipng/dvipng-1.15/tfm.c index 178460166d4..045ffd2de2e 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/tfm.c +++ b/Build/source/texk/dvipng/dvipng-1.15/tfm.c @@ -27,8 +27,8 @@ bool ReadTFM(struct font_entry * tfontp, char* tfmname) { struct filemmap fmmap; - struct char_entry *tcharptr; - unsigned char *position; + struct char_entry *tcharptr; + unsigned char *position; int lh,bc,ec,nw, c; dviunits* width; @@ -41,40 +41,43 @@ bool ReadTFM(struct font_entry * tfontp, char* tfmname) ec = UNumRead(position+6,2); nw = UNumRead(position+8,2); DEBUG_PRINT(DEBUG_TFM,(" %d %d %d %d",lh,bc,ec,nw)); - width=malloc(nw*sizeof(dviunits)); - c=0; - position=position+24+(lh+ec-bc+1)*4; - while( c < nw ) { - width[c] = SNumRead(position,4); - c++; - position += 4; - } - - /* Read char widths */ - c=bc; - position=(unsigned char*)fmmap.data+24+lh*4; - while(c <= ec) { + if (nw>0) { + if ((width=malloc(nw*sizeof(dviunits)))==NULL) + Fatal("cannot allocate memory for TFM widths"); + c=0; + position=position+24+(lh+ec-bc+1)*4; + while( c < nw ) { + width[c] = SNumRead(position,4); + c++; + position += 4; + } + /* Read char widths */ + c=bc; + position=(unsigned char*)fmmap.data+24+lh*4; + while(c <= ec) { #ifdef _WIN64 - DEBUG_PRINT(DEBUG_TFM,("\n@%I64d TFM METRICS:\t", - (__int64)position - (__int64)fmmap.data)); + DEBUG_PRINT(DEBUG_TFM,("\n@%I64d TFM METRICS:\t", + (__int64)position - (__int64)fmmap.data)); #else - DEBUG_PRINT(DEBUG_TFM,("\n@%ld TFM METRICS:\t", - (long)position - (long)fmmap.data)); + DEBUG_PRINT(DEBUG_TFM,("\n@%ld TFM METRICS:\t", + (long)position - (long)fmmap.data)); #endif - tcharptr=xmalloc(sizeof(struct char_entry)); - tcharptr->data=NULL; - tcharptr->tfmw=width[*position]; - DEBUG_PRINT(DEBUG_TFM,("%d [%d] %d",c,*position,tcharptr->tfmw)); - tcharptr->tfmw = (dviunits) - ((int64_t) tcharptr->tfmw * tfontp->s / (1 << 20)); - DEBUG_PRINT(DEBUG_TFM,(" (%d)",tcharptr->tfmw)); - if (c >= NFNTCHARS) /* Only positive for now */ - Fatal("tfm file %s exceeds char numbering limit",tfmname); - tfontp->chr[c] = tcharptr; - c++; - position += 4; + if ((tcharptr=malloc(sizeof(struct char_entry)))==NULL) + Fatal("cannot allocate memory for TFM char entry"); + tcharptr->data=NULL; + tcharptr->tfmw=width[*position]; + DEBUG_PRINT(DEBUG_TFM,("%d [%d] %d",c,*position,tcharptr->tfmw)); + tcharptr->tfmw = (dviunits) + ((int64_t) tcharptr->tfmw * tfontp->s / (1 << 20)); + DEBUG_PRINT(DEBUG_TFM,(" (%d)",tcharptr->tfmw)); + if (c >= NFNTCHARS) /* Only positive for now */ + Fatal("tfm file %s exceeds char numbering limit",tfmname); + tfontp->chr[c] = tcharptr; + c++; + position += 4; + } + free(width); } - free(width); UnMmapFile(&fmmap); return(true); } diff --git a/Build/source/texk/dvipng/dvipng-1.14/vf.c b/Build/source/texk/dvipng/dvipng-1.15/vf.c index 9f66e5fcf62..164ae4b4934 100644 --- a/Build/source/texk/dvipng/dvipng-1.14/vf.c +++ b/Build/source/texk/dvipng/dvipng-1.15/vf.c @@ -18,7 +18,7 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. - Copyright (C) 2002-2010 Jan-Åke Larsson + Copyright (C) 2002-2015 Jan-Åke Larsson ************************************************************************/ @@ -27,7 +27,7 @@ #define VF_ID 202 #define LONG_CHAR 242 -int32_t SetVF(struct char_entry* ptr) +int32_t SetVF(struct char_entry* ptr) { struct font_entry* currentvf; unsigned char *command,*end; @@ -40,7 +40,7 @@ int32_t SetVF(struct char_entry* ptr) DEBUG_PRINT(DEBUG_DVI,("\n VF MACRO:\t%s ", dvi_commands[*command])); DrawCommand(command,currentvf); command += CommandLength(command); - } + } EndVFMacro(); currentfont=currentvf; return(ptr->tfmw); @@ -52,21 +52,21 @@ void InitVF(struct font_entry * tfontp) { unsigned char* position; int length; - struct char_entry *tcharptr; + struct char_entry *tcharptr; uint32_t c=0; struct font_num *tfontnump; /* temporary font_num pointer */ - + DEBUG_PRINT((DEBUG_DVI|DEBUG_VF),("\n OPEN FONT:\t'%s'", tfontp->name)); Message(BE_VERBOSE,"<%s>", tfontp->name); if (MmapFile(tfontp->name,&(tfontp->fmmap))) Fatal("font file %s unusable", tfontp->name); position=(unsigned char*)tfontp->fmmap.data; - if (*(position) != PRE) + if (*(position) != PRE) Fatal("unknown font format in file %s",tfontp->name); - if (*(position+1) != VF_ID) + if (*(position+1) != VF_ID) Fatal( "wrong version %d of vf file %s (should be 202)", (int)*(position+1),tfontp->name); - DEBUG_PRINT(DEBUG_VF,("\n VF_PRE:\t'%.*s'", + DEBUG_PRINT(DEBUG_VF,("\n VF_PRE:\t'%.*s'", (int)*(position+2), position+3)); position = position+3 + *(position+2); c=UNumRead(position, 4); @@ -80,15 +80,15 @@ void InitVF(struct font_entry * tfontp) position += 8; while(*position >= FNT_DEF1 && *position <= FNT_DEF4) { #ifdef _WIN64 - DEBUG_PRINT(DEBUG_VF,("\n @%I64d VF:\t%s", - (__int64)position - (__int64)tfontp->fmmap.data, + DEBUG_PRINT(DEBUG_VF,("\n @%I64d VF:\t%s", + (__int64)position - (__int64)tfontp->fmmap.data, dvi_commands[*position])); #else - DEBUG_PRINT(DEBUG_VF,("\n @%ld VF:\t%s", - (long)position - (long)tfontp->fmmap.data, + DEBUG_PRINT(DEBUG_VF,("\n @%ld VF:\t%s", + (long)position - (long)tfontp->fmmap.data, dvi_commands[*position])); #endif - FontDef(position,tfontp); + FontDef(position,tfontp); length = dvi_commandlength[*position]; position += length + *(position + length-1) + *(position+length-2); } @@ -98,17 +98,17 @@ void InitVF(struct font_entry * tfontp) tfontnump = tfontnump->next; } tfontp->defaultfont=tfontnump->k; - /* Read char definitions */ while(*position < FNT_DEF1) { #ifdef _WIN64 - DEBUG_PRINT(DEBUG_VF,("\n@%I64d VF CHAR:\t", + DEBUG_PRINT(DEBUG_VF,("\n@%I64d VF CHAR:\t", (__int64)position - (__int64)tfontp->fmmap.data)); #else - DEBUG_PRINT(DEBUG_VF,("\n@%ld VF CHAR:\t", + DEBUG_PRINT(DEBUG_VF,("\n@%ld VF CHAR:\t", (long)position - (long)tfontp->fmmap.data)); #endif - tcharptr=xmalloc(sizeof(struct char_entry)); + if ((tcharptr=malloc(sizeof(struct char_entry)))==NULL) + Fatal("cannot allocate memory for VF char entry"); switch (*position) { case LONG_CHAR: tcharptr->length = UNumRead(position+1,4); @@ -123,7 +123,7 @@ void InitVF(struct font_entry * tfontp) position += 5; } DEBUG_PRINT(DEBUG_VF,("%d %d %d",tcharptr->length,c,tcharptr->tfmw)); - tcharptr->tfmw = (int32_t) + tcharptr->tfmw = (int32_t) ((int64_t) tcharptr->tfmw * tfontp->s / (1 << 20)); DEBUG_PRINT(DEBUG_VF,(" (%d)",tcharptr->tfmw)); if (c >= NFNTCHARS) /* Only positive for now */ diff --git a/Build/source/texk/dvipng/version.ac b/Build/source/texk/dvipng/version.ac index 0c066332108..f72db0a314b 100644 --- a/Build/source/texk/dvipng/version.ac +++ b/Build/source/texk/dvipng/version.ac @@ -1,5 +1,5 @@ dnl -dnl Copyright (C) 2013 Peter Breitenlohner <tex-live@tug.org> +dnl Copyright (C) 2013-2015 Peter Breitenlohner <tex-live@tug.org> dnl dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, @@ -8,4 +8,4 @@ dnl dnl -------------------------------------------------------- dnl dnl m4-include this file to define the current dvipng version -m4_define([dvipng_version], [1.14]) +m4_define([dvipng_version], [1.15]) |