summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schröder <martin@oneiros.de>2007-01-01 17:20:03 +0000
committerMartin Schröder <martin@oneiros.de>2007-01-01 17:20:03 +0000
commit508fb2acb6235eb461f0f5614e5466b843c33263 (patch)
tree4b43cc875bb66d8d6895a44945d252bde6d0be84
parentc3ef295937d604389c1ce7f325138611b2c7e653 (diff)
pdftex 1.40.0
git-svn-id: svn://tug.org/texlive/trunk@3089 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/pdftexdir/NEWS247
-rw-r--r--Build/source/texk/web2c/pdftexdir/README20
-rw-r--r--Build/source/texk/web2c/pdftexdir/mapfile.c25
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftex.web32
-rw-r--r--Build/source/texk/web2c/pdftexdir/ttf2afm.c2
-rw-r--r--Build/source/texk/web2c/pdftexdir/utils.c6
-rw-r--r--Build/source/texk/web2c/pdftexdir/writeenc.c6
-rw-r--r--Build/source/texk/web2c/pdftexdir/writefont.c11
-rw-r--r--Build/source/texk/web2c/pdftexdir/writettf.c3
9 files changed, 87 insertions, 265 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/NEWS b/Build/source/texk/web2c/pdftexdir/NEWS
index 7e334eba775..04a5e091901 100644
--- a/Build/source/texk/web2c/pdftexdir/NEWS
+++ b/Build/source/texk/web2c/pdftexdir/NEWS
@@ -1,6 +1,6 @@
------------------------------------------------------
-pdfTeX 3.141592-1.40.0-rc4 was released on 2006-12-22
------------------------------------------------------
+-------------------------------------------------
+pdfTeX 3.141592-1.40.0 was released on 2007-01-01
+-------------------------------------------------
- pdfetex (as a separate binary/program) is gone; all extensions are now in
pdftex. The make files still know about the target pdfetex, but it's just a
copy of pdftex
@@ -29,7 +29,34 @@ pdfTeX 3.141592-1.40.0-rc4 was released on 2006-12-22
the libraries actually used, which can be handy when using shared libraries
- rules and their positioning on the page are now inside a qQ group
- New primitives:
- - TODO: pdfTeX can now handle Colorstacks
+ - pdfTeX can now handle colourstacks.
+ - \pdfcolorstackinit
+ A stack is initialized by \pdfcolorstackinit. It expands to the number of
+ the new stack. The common case, the traditinal color stack is already
+ initialized as first stack: \pdfcolorstackinit page direct {0 g 0 G}
+ The keyword "page" means that this stack is page based. At the start of
+ the new page, the current stack value is automatically set.
+ - \pdfcolorstack
+ \pdfcolorstack <stack number> push {<new color>}
+ pushes the current value on the stack and sets the <new color>.
+ \pdfcolorstack <stack number> pop
+ pops and sets the current stack value.
+ \pdfcolorstack <stack number> current
+ sets the current stack value without changing the stack. This is useful
+ for stacks that are initialized without keyword "page". Thus the page
+ start setting can be set manually.
+ \pdfcolorstack <stack number> set {<new color>}
+ The current value is set to <new color>.
+ - Transformation matrices can now be manipulated more cleanly:
+ Currently matrix changes are done and hidden inside \pdfliteral nodes;
+ pdfTeX doesn't parse its contents and does not know the new settings of the
+ transform matrix. Thus the new primitives to save pdfTeX from parsing
+ \pdfliteral contents and to notify pdfTeX about matrix changes to use them
+ in calculating link and anchor positions.
+ - \pdfsetmatrix{<a> <b> <c> <d>}
+ is the equivalent to \pdfliteral{<a> <b> <c> <d> 0 0 cm}
+ - \pdfsave is the equivalent to \pdfliteral{q}
+ - \pdfrestore is the equivalent to \pdfliteral{Q}
- \pdfprimitive\TeX-primitive executes the original \TeX-primitive even if
the command has been redefined since. E.g.
\let\relax\undefined\pdfprimitive\relax
@@ -71,218 +98,6 @@ pdfTeX 3.141592-1.40.0-rc4 was released on 2006-12-22
- bugfix: truetype OS/2 v3 fonts (594)
- bugfix: Type1C (CFF) fonts of embedded pdfs didn't get replaced
- pdfTeX uses libpng 1.2.14
-- changes from rc3:
- various small fixes
-
------------------------------------------------------
-pdfTeX 3.141592-1.40.0-rc3 was released on 2006-12-20
------------------------------------------------------
-- changes from rc2:
- - map file handling:
- - in usual cases the behaviour is the same like in previous version. So if a
- font file is given with '<' or '<<', things should work without problems.
- - changes in odd cases:
- - no font file --> no font descriptor
- - font file given but not included --> will be treated like font file
- missing + a warning
- - minimize the distinction between standard fonts and other type1 fonts: the
- *only* place this makes a difference is that if a font file is missing
- (and the font is used), a warning will be generated for normal fonts but
- not for standard fonts
-
------------------------------------------------------
-pdfTeX 3.141592-1.40.0-rc2 was released on 2006-12-13
------------------------------------------------------
-- changes from rc1:
- - fix \letterspacefont (bug 712)
- - fix problems with unused objects
-
------------------------------------------------------
-pdfTeX 3.141592-1.40.0-rc1 was released on 2006-12-11
------------------------------------------------------
-- changes from last beta:
- - ToUnicode was broken in the latest beta (bug 711)
- - pdftosrc now handles compressed xref tables (PDF 1.5)
- - new primitive \letterspacefont to implement letter-spacing on-the-fly
-
----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-beta-20061206 was released on 2006-12-06
----------------------------------------------------------------
-- bugfix: crash with autokern (663)
-- memory for virtual fonts can now grow dynamically (patch 705)
-- rework the font mechanism (patches 597 and 709)
-- updated libpng to 1.2.14
-
----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-beta-20061108 was released on 2006-11-08
----------------------------------------------------------------
-- bugfix: extra kerning+expansion+ligatures (481)
-- bugfix: extra kerning does not work with ligatures (482)
-- bugfix: extra kerning inhibits extra spacing (483)
-- bugfix: extra kerning inhibits hyphenation (484)
-- bugfix: ttf2afm fails to include characters specified with uniXXXX (565)
-
----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-beta-20061017 was released on 2006-10-17
----------------------------------------------------------------
-- updated patch 580 (ToUnicode entries for Type1 fonts)
-- bugfix: nested links (479)
-- bugfix: conv_toks had some problems (609)
-- bugfix: problems with TrueType fonts (611)
-
----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-beta-20060928 was released on 2006-09-28
----------------------------------------------------------------
-- added patch 603 (Colorstack)
-- added patch 462 (HZ font expansion by text matrix manipulation)
-- updated obsdcompat from openssh 4.4pl1
-- bugfix: \pdfescapestring + \pdfescapename had been broken (605)
-
----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-beta-20060906 was released on 2006-09-06
----------------------------------------------------------------
-- bugfix: \pdfdraftmode could be tricked (600)
-- bugfix: Type1C (CFF) fonts of embedded pdfs didn't get replaced
-
----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-beta-20060822 was released on 2006-08-22
----------------------------------------------------------------
-- new feature: with \pdfdraftmode=1 (or -draftmode) pdfTeX doesn't write an
- output pdf file and doesn't read the content of any image file, thus speeding
- up the run. This is usefull when you know you need another run of pdfTeX e.g.
- just to get all the references right, but don't care for the output of this
- run
-- changed the format of pdfTeX warnings and unified the four(!) functions
- pdfTeX uses for writing out errors and warnings
-- expanded the output of -version to include information about the libraries
- used
-- fixed a bug where -20060811 would loop forever
-- fixed some compilation problems with obsdcompat
-
----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-beta-20060811 was released on 2006-08-11
----------------------------------------------------------------
-- renamed primitives:
- \primitive -> \pdfprimitive
- \ifprimitive -> \ifpdfprimitive
- \ifabsdim -> \ifpdfabsdim
- \ifabsnum -> \ifpdfabsnum
-- new version of \primitive/\ifprimitive (but see above)
-- new dimen: \pdfpxdimen
-- support for jbig2 files
-- new library: obsdcompat, which has improved string functions and allows the
- use of __attribute__
-- update libpng to 1.2.12
-- added JFIF detection patch to writejpg.c (was bug 548)
-- bugfix: truetype OS/2 v3 fonts (594)
-- bugfix: file with only \immediate\pdfobj stream results in garbage (505)
-- bugfix: invalid pdf created if font name contains space (509)
-
----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-beta-20060725 was released on 2006-07-25
----------------------------------------------------------------
-- added patches by Christian Schenk forwarded by Hartmut
-- added patch 421 (popen) from Taco
-- added lots of (void) to writettf* and ttf2afm to silence the compiler
-- removed some unused variables from tounicode.c
-- add new code by Thanh (patch 580)
-- added security patch for xpdf :-(
-- added JFIF detection patch to writejpg.c (bug 548)
-
----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-beta-20060213 was released on 2006-02-13
----------------------------------------------------------------
-- pdftex.web has been improved a bit
-- new patch:
- - 473 \ifabsnum and \ifabsdim
-- the manual has been updated a bit and is again included
-
----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-beta-20060125 was released on 2006-01-25
----------------------------------------------------------------
-- pdfTeX now includes pdfeTeX, i.e. there is no way to make a binary without
- eTeX support. Also the sources of TeX, eTeX and pdfTeX have been merged into
- one file pdftex.web
-- most pdfTeX change files are gone; only one file (pdftex.ch) remains.
-- improved patches:
- - 393 Ensure newline before endstream
-
----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-beta-20060117 was released on 2006-01-17
----------------------------------------------------------------
-- pdfTeX is now pdfeTeX, i.e. there is no way to make a binary without eTeX
- support. Also the sources of TeX, eTeX and pdfTeX have been merged into one
- file pdfetex.web
-- strip trailing zeros in fractions of reals written
-- removed patch 467 \ifindef
-- improved logging of objstreams
-
-----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-alpha-20060111 was released on 2006-01-11
-----------------------------------------------------------------
-- new patches:
- - 466 \primitive and \ifprimitive
- - 467 \ifinedef
-- improved patches:
- - 393 Ensure newline before endstream
-- pdfTeX now sets /ModDate and /Trapped by default (the values can be
- overridden with \pdfinfo)
-- more fixes to remove warnings from -Wall
-
-----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-alpha-20060106 was released on 2006-01-06
-----------------------------------------------------------------
-- many small fixes to remove warnings from -Wall
-- removed some unused variables
-- really fix bug 444
-- add some GCC extensions and use *nprintf instead of *printf where possible
-- fixed a unicode bug in ttf2afm
-
-----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-alpha-20051226 was released on 2005-12-26
-----------------------------------------------------------------
-- improved patches:
- - 453 Object Streams for PDF-1.5
- - take PK resolution from "pk_dpi" parameter in texmf.cnf, if it has not
- been set by the format file or by the user
- - 432 Rules in a PDF qQ group
-- some fixes for Thanhs patch
-- some improvements from -Wall
-- .indent.pro for indent
-
-----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-alpha-20051221 was released on 2005-12-21
-----------------------------------------------------------------
-- has a large patch from Thanh
-- pdflastlink has been fixed
-- remove generated pdf in case of fatal error
-
-----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-alpha-20051208 was released on 2005-12-08
-----------------------------------------------------------------
-- improved patches:
- - 386 grow obj_tab and dest_names arrays dynamically
- - 453 Object Streams for PDF-1.5
- - take PK resolution from "pk_dpi" parameter in texmf.cnf, if it has not
- been set by the format file or by the user
-- write out PDF statistics later to make them correct
-- makefile target pdfetex-all.pdf for a huge file
-
-----------------------------------------------------------------
-pdfTeX 3.141592-1.40.0-alpha-20051205 was released on 2005-12-05
-----------------------------------------------------------------
-- has these patches:
- - 386 grow obj_tab and dest_names arrays dynamically
- - 416 new primitive pdflastlink
- - 427 Character positioning patch
- - 432 Rules in a PDF qQ group
- - 434 Remove queued map item handling
- - 438 \pdfsavepos in DVI mode
- - 443 512 zeros in Type1 fonts not copied anymore
- - 447 Don't write /Encoding for non-reencoded fonts
- - 453 Object Streams for PDF-1.5
- - take PK resolution from "pk_dpi" parameter in texmf.cnf, if it has not
- been set by the format file or by the user
-------------------------------------------------
pdfTeX 3.141592-1.30.6 was released on 2006-02-16
diff --git a/Build/source/texk/web2c/pdftexdir/README b/Build/source/texk/web2c/pdftexdir/README
index e11225a53a1..72ca851d292 100644
--- a/Build/source/texk/web2c/pdftexdir/README
+++ b/Build/source/texk/web2c/pdftexdir/README
@@ -1,16 +1,16 @@
pdfTeX
======
-README for version 3.14159-1.40.0-rc4
-=====================================
+README for version 3.14159-1.40.0
+=================================
-This directory contains the version 1.40.0-rc4 of pdfTeX, an extended
-version of eTeX that can create PDF directly from TeX source files and
-enhance the result of TeX typesetting with the help of PDF. When PDF output
-is not selected, pdfTeX produces normal DVI output, otherwise it produces
-PDF output that looks identical to the DVI output. An important aspect of
-this project is to investigate alternative justification algorithms,
-optionally making use of multiple master fonts.
+This directory contains the version 1.40.0 of pdfTeX, an extended version
+of eTeX that can create PDF directly from TeX source files and enhance the
+result of TeX typesetting with the help of PDF. When PDF output is not
+selected, pdfTeX produces normal DVI output, otherwise it produces PDF
+output that looks identical to the DVI output. An important aspect of this
+project is to investigate alternative justification algorithms, optionally
+making use of multiple master fonts.
pdfTeX is based on the original eTeX sources and Web2c, and has been
successfully compiled on Unix, Win32 and DOS systems. It is still under
@@ -33,7 +33,7 @@ http://www.ntg.nl/mailman/listinfo/ntg-pdftex
LEGAL ISSUES
============
-pdfTeX is copyright (c) 1996-2006 Han The Thanh, <thanh@pdftex.org>
+pdfTeX is copyright (c) 1996-2007 Han The Thanh, <thanh@pdftex.org>
pdfTeX is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
diff --git a/Build/source/texk/web2c/pdftexdir/mapfile.c b/Build/source/texk/web2c/pdftexdir/mapfile.c
index 296eb57e92a..42eeaaaa025 100644
--- a/Build/source/texk/web2c/pdftexdir/mapfile.c
+++ b/Build/source/texk/web2c/pdftexdir/mapfile.c
@@ -18,7 +18,6 @@ along with pdfTeX; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: mapfile.c,v 1.1 2006/12/14 01:21:33 hahe Exp hahe $
-
*/
#include <math.h>
@@ -52,7 +51,7 @@ static const char nontfm[] = "<nontfm>";
#define read_field(r, q, buf) do { \
q = buf; \
- while (*r != ' ' && *r != '\0') \
+ while (*r != ' ' && *r != '<' && *r != '"' && *r != '\0') \
*q++ = *r++; \
*q = '\0'; \
skip (r, ' '); \
@@ -117,7 +116,6 @@ static fm_entry *dummy_fm_entry()
return (fm_entry *) & const_fm_entry;
}
-
/**********************************************************************/
struct avl_table *tfm_tree = NULL;
@@ -430,16 +428,17 @@ static void fm_scan_line()
fm = new_fm_entry();
read_field(r, q, buf);
set_field(tfm_name);
- p = r;
- read_field(r, q, buf);
- if (*buf != '<' && *buf != '"')
+ if (!isdigit(*r)) { /* 2nd field ps_name may not start with a digit */
+ read_field(r, q, buf);
set_field(ps_name);
- else
- r = p; /* unget the field */
- if (isdigit(*r)) { /* font descriptor /Flags given */
- fm->fd_flags = atoi(r);
- while (isdigit(*r))
- r++;
+ }
+ if (isdigit(*r)) { /* font descriptor /Flags given? */
+ for (s = r; isdigit(*s); s++);
+ if (*s == ' ' || *s == '"' || *s == '<' || *s == '\0') { /* not e. g. 8r.enc */
+ fm->fd_flags = atoi(r);
+ while (isdigit(*r))
+ r++;
+ }
}
while (1) { /* loop through "specials", encoding, font file */
skip(r, ' ');
@@ -621,8 +620,8 @@ boolean hasfmentry(internalfontnumber f)
return pdffontmap[f] != (fmentryptr) dummy_fm_entry();
}
-
/* check whether a map entry is valid for font replacement */
+
static boolean fm_valid_for_font_replacement(fm_entry * fm)
{
ff_entry *ff;
diff --git a/Build/source/texk/web2c/pdftexdir/pdftex.web b/Build/source/texk/web2c/pdftexdir/pdftex.web
index 3b78818a181..cb017ce885f 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftex.web
+++ b/Build/source/texk/web2c/pdftexdir/pdftex.web
@@ -287,7 +287,7 @@ known as `\eTeX'.
@#
@d pdftex_version==140 { \.{\\pdftexversion} }
@d pdftex_revision=="0" { \.{\\pdftexrevision} }
-@d pdftex_version_string=='-1.40.0-rc4' {current \pdfTeX\ version}
+@d pdftex_version_string=='-1.40.0' {current \pdfTeX\ version}
@#
@d pdfeTeX_banner=='This is pdfeTeX, Version 3.141592',pdftex_version_string,eTeX_version_string
{printed when \pdfeTeX\ starts}
@@ -32516,21 +32516,23 @@ if fixed_pdfoutput > 0 then begin
end
else begin
@<Finish the PDF file@>;
- wlog_cr;
- wlog_ln('PDF statistics:');
- wlog_ln(' ',obj_ptr:1,' PDF objects out of ',obj_tab_size:1,
- ' (max. ',sup_obj_tab_size:1,')');
- if pdf_os_cntr > 0 then begin
- wlog(' ',((pdf_os_cntr - 1) * pdf_os_max_objs + pdf_os_objidx + 1):1,
- ' compressed objects within ',pdf_os_cntr:1,' object stream');
- if pdf_os_cntr > 1 then
- wlog('s');
- wlog_cr;
+ if log_opened then
+ begin wlog_cr;
+ wlog_ln('PDF statistics:');
+ wlog_ln(' ',obj_ptr:1,' PDF objects out of ',obj_tab_size:1,
+ ' (max. ',sup_obj_tab_size:1,')');
+ if pdf_os_cntr > 0 then begin
+ wlog(' ',((pdf_os_cntr - 1) * pdf_os_max_objs + pdf_os_objidx + 1):1,
+ ' compressed objects within ',pdf_os_cntr:1,' object stream');
+ if pdf_os_cntr > 1 then
+ wlog('s');
+ wlog_cr;
+ end;
+ wlog_ln(' ',pdf_dest_names_ptr:1,' named destinations out of ',dest_names_size:1,
+ ' (max. ',sup_dest_names_size:1,')');
+ wlog_ln(' ',pdf_mem_ptr:1,' words of extra memory for PDF output out of ',pdf_mem_size:1,
+ ' (max. ',sup_pdf_mem_size:1,')');
end;
- wlog_ln(' ',pdf_dest_names_ptr:1,' named destinations out of ',dest_names_size:1,
- ' (max. ',sup_dest_names_size:1,')');
- wlog_ln(' ',pdf_mem_ptr:1,' words of extra memory for PDF output out of ',pdf_mem_size:1,
- ' (max. ',sup_pdf_mem_size:1,')');
end;
end
else begin
diff --git a/Build/source/texk/web2c/pdftexdir/ttf2afm.c b/Build/source/texk/web2c/pdftexdir/ttf2afm.c
index 9d5598576f4..ce7af81553a 100644
--- a/Build/source/texk/web2c/pdftexdir/ttf2afm.c
+++ b/Build/source/texk/web2c/pdftexdir/ttf2afm.c
@@ -1029,7 +1029,7 @@ int main(int argc, char **argv)
cur_file_name = argv[optind];
if (print_cmap) {
bname = xstrdup(xbasename(cur_file_name));
- if ((s = rindex(bname, '.')) != NULL)
+ if ((s = strrchr(bname, '.')) != NULL)
*s = 0;
}
if ((fontfile =
diff --git a/Build/source/texk/web2c/pdftexdir/utils.c b/Build/source/texk/web2c/pdftexdir/utils.c
index 351af9a9045..f2d12e036a5 100644
--- a/Build/source/texk/web2c/pdftexdir/utils.c
+++ b/Build/source/texk/web2c/pdftexdir/utils.c
@@ -1375,6 +1375,12 @@ int newcolorstack(integer s, integer literal_mode, boolean page_start)
colstack_num = colstacks_used++;
colstack = &colstacks[colstack_num];
/* configure the new color stack */
+ colstack->page_stack = NULL;
+ colstack->form_stack = NULL;
+ colstack->page_size = 0;
+ colstack->page_used = 0;
+ colstack->form_size = 0;
+ colstack->form_used = 0;
colstack->literal_mode = literal_mode;
colstack->page_start = page_start;
str = makecstring(s);
diff --git a/Build/source/texk/web2c/pdftexdir/writeenc.c b/Build/source/texk/web2c/pdftexdir/writeenc.c
index 5547e3f7cb0..f4c299479d9 100644
--- a/Build/source/texk/web2c/pdftexdir/writeenc.c
+++ b/Build/source/texk/web2c/pdftexdir/writeenc.c
@@ -18,7 +18,6 @@ along with pdfTeX; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: writeenc.c,v 1.3 2005/12/26 14:20:13 hahe Exp hahe $
-
*/
#include "ptexlib.h"
@@ -75,10 +74,11 @@ void register_fe_entry(fe_entry * fe)
fe_entry *get_fe_entry(char *s)
{
fe_entry *fe;
- if ((fe = lookup_fe_entry(s)) == NULL) {
+ char **gl;
+ if ((fe = lookup_fe_entry(s)) == NULL && (gl = load_enc_file(s)) != NULL) {
fe = new_fe_entry();
fe->name = s;
- fe->glyph_names = load_enc_file(s);
+ fe->glyph_names = gl;
register_fe_entry(fe);
}
return fe;
diff --git a/Build/source/texk/web2c/pdftexdir/writefont.c b/Build/source/texk/web2c/pdftexdir/writefont.c
index 1c2c45088ed..684db2881f6 100644
--- a/Build/source/texk/web2c/pdftexdir/writefont.c
+++ b/Build/source/texk/web2c/pdftexdir/writefont.c
@@ -476,8 +476,7 @@ void write_fontdictionary(fo_entry * fo)
/* write ToUnicode entry if needed */
if (fixedgentounicode > 0 && fo->fd != NULL) {
- if (is_reencoded(fo->fm)) {
- assert(fo->fe != NULL);
+ if (fo->fe != NULL) {
fo->tounicode_objnum =
write_tounicode(fo->fe->glyph_names, fo->fe->name);
} else if (is_type1(fo->fm)) {
@@ -552,9 +551,9 @@ void create_fontdictionary(fm_entry * fm, integer font_objnum,
fo->fm = fm;
fo->fo_objnum = font_objnum;
fo->tex_font = f;
- if (is_reencoded(fo->fm)) {
- fo->fe = get_fe_entry(fo->fm->encname);
- if (is_type1(fo->fm) || is_opentype(fo->fm)) {
+ if (is_reencoded(fo->fm)) { /* at least the map entry tells so */
+ fo->fe = get_fe_entry(fo->fm->encname); /* returns NULL if .enc file couldn't be opened */
+ if (fo->fe != NULL && (is_type1(fo->fm) || is_opentype(fo->fm))) {
if (fo->fe->fe_objnum == 0)
fo->fe->fe_objnum = pdfnewobjnum(); /* then it will be written out */
/* mark encoding pairs used by TeX to optimize encoding vector */
@@ -571,7 +570,7 @@ void create_fontdictionary(fm_entry * fm, integer font_objnum,
create_fontdescriptor(fo, f);
create_charwidth_array(fo, f);
write_charwidth_array(fo);
- if (is_reencoded(fo->fm)) {
+ if (fo->fe != NULL) {
mark_reenc_glyphs(fo, f);
if (!is_type1(fo->fm)) {
/* mark reencoded characters as chars on TeX level */
diff --git a/Build/source/texk/web2c/pdftexdir/writettf.c b/Build/source/texk/web2c/pdftexdir/writettf.c
index 4c33f568434..9de6fd54c6c 100644
--- a/Build/source/texk/web2c/pdftexdir/writettf.c
+++ b/Build/source/texk/web2c/pdftexdir/writettf.c
@@ -325,10 +325,11 @@ do {\
static char *strip_spaces_and_delims(char *s, int l)
{
static char buf[SMALL_BUF_SIZE];
- assert(l >= 0 && l < (int) sizeof(buf));
char *p = buf;
int i;
+ assert(l >= 0 && l < (int) sizeof(buf));
+
for (i = 0; i < l; s++, i++) {
if (*s == '(' || *s == ')' || *s == '<' || *s == '>' ||
*s == '[' || *s == ']' || *s == '{' || *s == '}' ||