pdftex[790] branches/stable/tests/06-pkmap: in map files, allow
commits+karl at tug.org
commits+karl at tug.org
Tue Jan 2 01:12:05 CET 2018
Revision: 790
http://tug.org/svn/pdftex?view=revision&revision=790
Author: karl
Date: 2018-01-02 01:12:04 +0100 (Tue, 02 Jan 2018)
Log Message:
-----------
in map files, allow encoding files for bitmap font lines
Modified Paths:
--------------
branches/stable/doc/manual/ChangeLog
branches/stable/doc/manual/pdftex-t.tex
branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog
branches/stable/source/src/texk/web2c/pdftexdir/mapfile.c
branches/stable/source/src/texk/web2c/pdftexdir/pdftex.defines
branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web
branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h
branches/stable/source/src/texk/web2c/pdftexdir/ptexmac.h
branches/stable/source/src/texk/web2c/pdftexdir/writefont.c
branches/stable/source/src/texk/web2c/pdftexdir/writet3.c
branches/stable/tests/06-pkmap/Makefile
branches/stable/tests/06-pkmap/prepatch.pdf
branches/stable/tests/06-pkmap/test-pkmap.tex
Added Paths:
-----------
branches/stable/tests/06-pkmap/cmr10.360pk
Property Changed:
----------------
branches/stable/tests/06-pkmap/
Modified: branches/stable/doc/manual/ChangeLog
===================================================================
--- branches/stable/doc/manual/ChangeLog 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/doc/manual/ChangeLog 2018-01-02 00:12:04 UTC (rev 790)
@@ -1,3 +1,7 @@
+2018-01-01 Karl Berry <karl at freefriends.org>
+
+ * pdftex-t.tex (encodingfile): supported for Type 3 fonts.
+
2017-12-14 Karl Berry <karl at freefriends.org>
* pdftex-t.tex (\pdfinfo): describe [+-]HH'mm' time zone
Modified: branches/stable/doc/manual/pdftex-t.tex
===================================================================
--- branches/stable/doc/manual/pdftex-t.tex 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/doc/manual/pdftex-t.tex 2018-01-02 00:12:04 UTC (rev 790)
@@ -1428,15 +1428,13 @@
\section{Setting up fonts}
-\PDFTEX\ can work with Type~1 and TrueType fonts (and to some extent also
-with OpenType fonts). Font files should be available and embedded for all
-fonts used in the document. It is possible to use \METAFONT||generated
-fonts in \PDFTEX\ --- but it is strongly recommended not to use these
-fonts if an equivalent is available in Type~1 or TrueType format, if
-only because bitmap Type~3 fonts render very poorly in (older versions
-of) Adobe Reader. Given the free availability of Type~1 versions of all
-the Computer Modern fonts, and the ability to use standard \POSTSCRIPT\
-fonts, there is rarely a need to use bitmap fonts in \PDFTEX.
+\PDFTEX\ can work with Type~1 and TrueType fonts (and to some extent
+also with OpenType fonts). Font files should be available and embedded
+for all fonts used in the generated PDF. It is possible to use
+\METAFONT||generated fonts in \PDFTEX\ --- but it is strongly
+recommended not to use these fonts if an equivalent is available in
+Type~1 or TrueType format, if only because bitmap Type~3 fonts render
+poorly under enlargement.
%***********************************************************************
@@ -1608,6 +1606,22 @@
built||in encoding. In general this option is highly recommended, and it
is {\em required} when subsetting a TrueType font.
+Starting with version 1.40.19, an encoding file can also be specified
+for bitmap \PK\ fonts. In this case, it assigns the glyph names from the
+given encoding vector, which can be used with the
+\type{\pdfglyphtounicode} primitive (q.v.). For example:
+
+\starttyping
+\pdfglyphtounicode{ffi}{0066 0066 0069} % normally: \input glyphtounicode
+\pdfgentounicode=1
+\pdfmapline{cmb10 <7t.enc}
+\font\cmb=cmb10 \cmb ffi
+\stoptyping
+
+The result is a \PDF\ file with a correctly-labeled \type{/ffi}
+character instead of the numeric character position in the
+\type{cmb10.tfm} (decimal 14).
+
\stopdescription
\startdescription {fontfile}
@@ -2983,7 +2997,7 @@
\Something{general text}}}
The first argument is the name of a glyph, the second is a string of Unicode
-numeric values denoting characters. For instance:
+numeric values denoting characters, separated by spaces. For instance:
\starttyping
\pdfgentounicode=1
Modified: branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog 2018-01-02 00:12:04 UTC (rev 790)
@@ -1,3 +1,36 @@
+2018-01-01 Pali Roh\'ar <pali.rohar at gmail.com>
+
+ Patch 1: explicitly detect bitmap PK font in fm_scan_line,
+ instead of the implicit check of ps_name and ff_name being NULL.
+ * ptexmac.h (F_PK, set_pk, unset_pk, is_pk): new macros.
+ * writefont.c (dopdffont): call writet3 if is_pk.
+ * mapfile.c (fm_scan_line): call set_pk if no fontfile
+ and no ps_name on encoding line.
+
+ Patch 2: Always embed bitmap fonts with different sizes
+ separately, even if it has a fontmap entry; i.e., no geometric
+ scaling in the generated PDF.
+ * pdftex.defines (isscalable),
+ * ptexlib.h (isscalable),
+ * mapfile.c (isscalable): new fn.
+ * pdftex.web: call isscalable instead of hasfmentry
+ in all cases except @<Output fonts definition@>.
+
+ Patch 3: Allow .enc files for bitmap PK fonts.
+ * ptexlib.h (writet3): take additional fm_entry* parameter.
+ * writefont.c (dopdffont): change call.
+ * writet3.c (writet3): change definition;
+ write_tounicode and encoding vector if we can.
+ (remove_duplicate_glyph_names): new fn.
+
+ Patch 4: Additional checks for PK fonts in map file.
+ * mapfile.c (check_fm_entry):
+
+ ChangeLog entry, some comments, error messages written or tweaked
+ by Karl Berry; all substantive code by Pali. Patch posted at
+ https://mailman.ntg.nl/pipermail/ntg-pdftex/2017-August/004183.html.
+ See test-pkmap.tex for more references and some tests.
+
2017-12-16 Hironori Kitagawa <h_kitagawa2001 at yahoo.co.jp>
* pdftex.web (compare_strings): Fix \pdfstrcmp error message
Modified: branches/stable/source/src/texk/web2c/pdftexdir/mapfile.c
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/mapfile.c 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/source/src/texk/web2c/pdftexdir/mapfile.c 2018-01-02 00:12:04 UTC (rev 790)
@@ -1,6 +1,7 @@
/* mapfile.c: handling of map files/lines
-Copyright 1996-2017 Han The Thanh, <thanh at pdftex.org>
+Copyright 1996-2018 Han The Thanh, <thanh at pdftex.org>
+
This file is part of pdfTeX.
pdfTeX is free software; you can redistribute it and/or modify
@@ -346,6 +347,27 @@
a += 32;
}
+ /* font file for bitmap PK fonts is determinated by kpse and depends
+ on current font size; writet3.c ignores font file for bitmap PK fonts */
+ if (is_fontfile(fm) && is_pk(fm)) {
+ if (warn)
+ pdftex_warn
+ ("invalid entry for `%s': "
+ "FontFile cannot be specified for bitmap PK font: %s",
+ fm->tfm_name, fm_fontfile(fm));
+ a += 64;
+ }
+
+ /* ps name cannot be stored into PDF file for PDF Type3 fonts */
+ if (fm->ps_name != NULL && is_pk(fm)) {
+ if (warn)
+ pdftex_warn
+ ("invalid entry for `%s': "
+ "PsName cannot be specified for bitmap PK font: %s",
+ fm->tfm_name, fm->ps_name);
+ a += 128;
+ }
+
return a;
}
@@ -543,6 +565,9 @@
set_opentype(fm);
else
set_type1(fm);
+ } else if (fm->ps_name == NULL) {
+ set_pk(fm); /* font without ps_name and without fontfile,
+ it can be only bitmap PK font */
} else
set_type1(fm); /* assume a builtin font is Type1 */
@@ -629,6 +654,11 @@
return pdffontmap[f] != (fmentryptr) dummy_fm_entry();
}
+boolean isscalable(internalfontnumber f)
+{
+ return hasfmentry(f) && (!is_pk((fm_entry *)pdffontmap[f]));
+}
+
/* check whether a map entry is valid for font replacement */
static boolean fm_valid_for_font_replacement(fm_entry * fm)
Modified: branches/stable/source/src/texk/web2c/pdftexdir/pdftex.defines
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/pdftex.defines 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/source/src/texk/web2c/pdftexdir/pdftex.defines 2018-01-02 00:12:04 UTC (rev 790)
@@ -1,5 +1,5 @@
-{
-Copyright 1996-2017 Han The Thanh, <thanh at pdftex.org>
+{ pdftex.defines: Web2C pseudo-Pascal identifiers for pdfTeX.
+Copyright 1996-2018 Han The Thanh, <thanh at pdftex.org>
This file is part of pdfTeX.
@@ -38,6 +38,7 @@
{ functions from mapfile.c }
@define function hasfmentry();
+ at define function isscalable();
@define procedure checkextfm();
@define procedure pdfmapfile();
@define procedure pdfmapline();
Modified: branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web 2018-01-02 00:12:04 UTC (rev 790)
@@ -1,4 +1,4 @@
-% Copyright 1996-2017 Han Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh,
+% Copyright 1996-2018 Han Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh,
% <thanh@@pdftex.org>
% This file is part of pdfTeX.
@@ -15784,7 +15784,7 @@
s: integer;
begin
w := char_width(f)(char_info(f)(c));
- if hasfmentry(f) then begin
+ if isscalable(f) then begin
if pdf_cur_Tm_a = 0 then begin
call_func(divide_scaled(w, pdf_font_size[f], 4));
pdf_delta_h := pdf_delta_h + scaled_out;
@@ -15995,7 +15995,7 @@
{if |f| is auto expanded then ensure the base font is initialized}
if pdf_font_auto_expand[f] and (pdf_font_blink[f] <> null_font) then begin
b := pdf_font_blink[f];
- if not hasfmentry(b) then
+ if not isscalable(b) then
pdf_error("font expansion", "auto expansion is only possible with scalable fonts");
if not font_used[b] then
pdf_init_font(b);
@@ -16006,11 +16006,11 @@
here: 1) |f| and |k| have the same tfm name (so they have been loaded at
different sizes, eg 'cmr10' and 'cmr10 at 11pt'); 2) |f| has been auto
expanded from |k|}
- if hasfmentry(f) then begin
+ if isscalable(f) then begin
i := head_tab[obj_type_font];
while i <> 0 do begin
k := obj_info(i);
- if hasfmentry(k) and
+ if isscalable(k) and
(pdf_font_map[k] = pdf_font_map[f]) and
(str_eq_str(font_name[k], font_name[f]) or
(pdf_font_auto_expand[f] and
Modified: branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h 2018-01-02 00:12:04 UTC (rev 790)
@@ -1,5 +1,5 @@
-/*
-Copyright 1996-2017 Han The Thanh, <thanh at pdftex.org>
+/* ptexlib.h: macros for pdfTeX library code.
+Copyright 1996-2018 Han The Thanh, <thanh at pdftex.org>
This file is part of pdfTeX.
@@ -168,6 +168,7 @@
/* mapfile.c */
extern boolean hasfmentry(internalfontnumber);
+extern boolean isscalable(internalfontnumber);
extern void fm_free(void);
extern void fm_read_info(void);
extern ff_entry *check_ff_exist(char *, boolean);
@@ -307,7 +308,7 @@
extern void t1_free(void);
/* writet3.c */
-extern void writet3(int, internalfontnumber);
+extern void writet3(fm_entry *, int, internalfontnumber);
extern scaled getpkcharwidth(internalfontnumber, scaled);
/* writettf.c */
Modified: branches/stable/source/src/texk/web2c/pdftexdir/ptexmac.h
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/ptexmac.h 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/source/src/texk/web2c/pdftexdir/ptexmac.h 2018-01-02 00:12:04 UTC (rev 790)
@@ -1,5 +1,5 @@
-/*
-Copyright 1996-2017 Han The Thanh, <thanh at pdftex.org>
+/* ptexmac.h: common macros for pdfTeX.
+Copyright 1996-2018 Han The Thanh, <thanh at pdftex.org>
This file is part of pdfTeX.
@@ -155,6 +155,7 @@
# define F_TYPE1 0x10
# define F_TRUETYPE 0x20
# define F_OTF 0x40
+# define F_PK 0x80
# define set_included(fm) ((fm)->type |= F_INCLUDED)
# define set_subsetted(fm) ((fm)->type |= F_SUBSETTED)
@@ -163,6 +164,7 @@
# define set_type1(fm) ((fm)->type |= F_TYPE1)
# define set_truetype(fm) ((fm)->type |= F_TRUETYPE)
# define set_opentype(fm) ((fm)->type |= F_OTF)
+# define set_pk(fm) ((fm)->type |= F_PK)
# define unset_included(fm) ((fm)->type &= ~F_INCLUDED)
# define unset_subsetted(fm) ((fm)->type &= ~F_SUBSETTED)
@@ -171,6 +173,7 @@
# define unset_type1(fm) ((fm)->type &= ~F_TYPE1)
# define unset_truetype(fm) ((fm)->type &= ~F_TRUETYPE)
# define unset_opentype(fm) ((fm)->type &= ~F_OTF)
+# define unset_pk(fm) ((fm)->type &= ~F_PK)
# define is_included(fm) (((fm)->type & F_INCLUDED) != 0)
# define is_subsetted(fm) (((fm)->type & F_SUBSETTED) != 0)
@@ -179,6 +182,7 @@
# define is_type1(fm) (((fm)->type & F_TYPE1) != 0)
# define is_truetype(fm) (((fm)->type & F_TRUETYPE) != 0)
# define is_opentype(fm) (((fm)->type & F_OTF) != 0)
+# define is_pk(fm) (((fm)->type & F_PK) != 0)
# define fm_slant(fm) (fm)->slant
# define fm_extend(fm) (fm)->extend
Modified: branches/stable/source/src/texk/web2c/pdftexdir/writefont.c
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/writefont.c 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/source/src/texk/web2c/pdftexdir/writefont.c 2018-01-02 00:12:04 UTC (rev 790)
@@ -1,5 +1,5 @@
-/*
-Copyright 1996-2017 Han The Thanh, <thanh at pdftex.org>
+/* writefont.c: font descriptors and writing Type 1 fonts.
+Copyright 1996-2018 Han The Thanh, <thanh at pdftex.org>
This file is part of pdfTeX.
@@ -666,8 +666,8 @@
{
fm_entry *fm;
fm = hasfmentry(f) ? (fm_entry *) pdffontmap[f] : NULL;
- if (fm == NULL || (fm->ps_name == NULL && fm->ff_name == NULL))
- writet3(font_objnum, f);
+ if (fm == NULL || is_pk(fm))
+ writet3(fm, font_objnum, f);
else
create_fontdictionary(fm, font_objnum, f);
}
Modified: branches/stable/source/src/texk/web2c/pdftexdir/writet3.c
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/writet3.c 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/source/src/texk/web2c/pdftexdir/writet3.c 2018-01-02 00:12:04 UTC (rev 790)
@@ -1,5 +1,5 @@
-/*
-Copyright 1996-2017 Han The Thanh, <thanh at pdftex.org>
+/* writet3.c: write a Type 3 (bitmap PK) font.
+Copyright 1996-2018 Han The Thanh, <thanh at pdftex.org>
This file is part of pdfTeX.
@@ -254,8 +254,35 @@
return true;
}
-void writet3(int objnum, internalfontnumber f)
+/* We must remove duplicate glyph names since the duplicates render the
+ output invalid. We give a warning, since this should only happen with
+ ill-defined .enc files that should get fixed. */
+static void remove_duplicate_glyph_names(char **g, const char *encname)
{
+ struct avl_table *gl_tree;
+ char *aa;
+ int i;
+ gl_tree = avl_create(comp_string_entry, NULL, &avl_xallocator);
+ assert(gl_tree != NULL);
+ for (i = 0; i < 256; i++) {
+ if (g[i] == notdef)
+ continue;
+ aa = (char *) avl_find(gl_tree, g[i]);
+ if (aa == NULL) {
+ aa = (char *) avl_probe(gl_tree, g[i]);
+ assert(aa != NULL);
+ } else {
+ pdftex_warn("%s: duplicate glyph name at position %d: %s",
+ encname, i, g[i]);
+ xfree(g[i]);
+ g[i] = (char *) notdef;
+ }
+ }
+ avl_destroy(gl_tree, NULL);
+}
+
+void writet3(fm_entry * fm, int objnum, internalfontnumber f)
+{
static char t3_font_scale_str[] = "\\pdffontscale";
int i;
integer wptr, eptr, cptr;
@@ -262,6 +289,9 @@
int first_char, last_char;
integer pk_font_scale;
boolean is_notdef;
+ fe_entry *fe;
+ char **glyph_names;
+ integer tounicode_objnum;
t3_glyph_num = 0;
t3_image_used = false;
for (i = 0; i < 256; i++) {
@@ -268,6 +298,10 @@
t3_char_procs[i] = 0;
t3_char_widths[i] = 0;
}
+ fe = fm && fm->encname ? get_fe_entry(fm->encname) : NULL;
+ glyph_names = fe ? fe->glyph_names : NULL;
+ if (glyph_names)
+ remove_duplicate_glyph_names(glyph_names, fm->encname);
packfilename(fontname[f], getnullstr(), maketexstring(".pgc"));
cur_file_name = makecstring(makenamestring());
is_pk_font = false;
@@ -298,6 +332,11 @@
if (pdfcharmarked(f, i))
break;
last_char = i;
+ /* write ToUnicode entry if we can */
+ if (fixedgentounicode > 0 && !pdffontnobuiltintounicode[f] && fe != NULL)
+ tounicode_objnum = write_tounicode(glyph_names, fm->tfm_name, fe->name);
+ else
+ tounicode_objnum = 0;
pdfbegindict(objnum, 1); /* Type 3 font dictionary */
pdf_puts("/Type /Font\n/Subtype /Type3\n");
pdf_printf("/Name /F%i\n", (int) f);
@@ -326,6 +365,8 @@
cptr = pdfnewobjnum();
pdf_printf("/Widths %i 0 R\n/Encoding %i 0 R\n/CharProcs %i 0 R\n",
(int) wptr, (int) eptr, (int) cptr);
+ if (tounicode_objnum != 0)
+ pdf_printf("/ToUnicode %i 0 R\n", (int) tounicode_objnum);
pdfenddict();
pdfbeginobj(wptr, 1); /* chars width array */
pdf_puts("[");
@@ -344,7 +385,12 @@
pdf_printf("/%s", notdef);
is_notdef = true;
} else {
- pdf_printf("/a%i", first_char);
+ if (glyph_names
+ && glyph_names[first_char]
+ && glyph_names[first_char] != notdef)
+ pdf_printf("/%s", glyph_names[first_char]);
+ else
+ pdf_printf("/a%i", first_char);
is_notdef = false;
}
for (i = first_char + 1; i <= last_char; i++) {
@@ -358,7 +404,10 @@
pdf_printf(" %i", i);
is_notdef = false;
}
- pdf_printf("/a%i", i);
+ if (glyph_names && glyph_names[i] && glyph_names[i] != notdef)
+ pdf_printf("/%s", glyph_names[i]);
+ else
+ pdf_printf("/a%i", i);
}
}
pdf_puts("]\n");
@@ -366,7 +415,12 @@
pdfbegindict(cptr, 1); /* CharProcs dictionary */
for (i = first_char; i <= last_char; i++)
if (t3_char_procs[i] != 0)
- pdf_printf("/a%i %i 0 R\n", (int) i, (int) t3_char_procs[i]);
+ if (glyph_names && glyph_names[i] && glyph_names[i] != notdef)
+ pdf_printf("/%s %i 0 R\n", glyph_names[i],
+ (int) t3_char_procs[i]);
+ else
+ pdf_printf("/a%i %i 0 R\n", (int) i,
+ (int) t3_char_procs[i]);
pdfenddict();
t3_close();
tex_printf(">");
Index: branches/stable/tests/06-pkmap
===================================================================
--- branches/stable/tests/06-pkmap 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/tests/06-pkmap 2018-01-02 00:12:04 UTC (rev 790)
Property changes on: branches/stable/tests/06-pkmap
___________________________________________________________________
Modified: svn:ignore
## -1 +1 ##
-test-pkenc.pdf
+test-pkmap.pdf
Modified: branches/stable/tests/06-pkmap/Makefile
===================================================================
--- branches/stable/tests/06-pkmap/Makefile 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/tests/06-pkmap/Makefile 2018-01-02 00:12:04 UTC (rev 790)
@@ -5,20 +5,26 @@
default: test-pkmap
-test-pkenc: # cmr10.3600pk - not used
+test-pkmap: cmr10.360pk cmr10.72pk cmb10.72pk
$(prog) test-pkmap.tex
+ grep -q /ffi test-pkmap.pdf # should end up with this encoded char
+ grep -a ToUnicode test-pkmap.pdf
#
-# should work when and if patch is applied:
-# grep -q /ffi test-pkenc.pdf # should end up with this encoded char
-# grep -a ToUnicode test-pkenc.pdf
-#
# dev convenience:
# pdffonts test-big.pdf
# pdftotext test-big.pdf -
-cmr10.3600pk:
- mf-nowin '\mode:=ljfour;mag:=6;input cmr10'
- gftopk cmr10.3600gf
+cmr10.360pk:
+ mf-nowin '\mode:=ljfour; mag:=0.6; input cmr10'
+ gftopk cmr10.360gf
+cmr10.72pk:
+ mf-nowin '\mode:=mactrue; input cmr10'
+ gftopk cmr10.72gf
+
+cmb10.72pk:
+ mf-nowin '\mode:=mactrue; input cmb10'
+ gftopk cmb10.72gf
+
clean:
$(clean)
Added: branches/stable/tests/06-pkmap/cmr10.360pk
===================================================================
(Binary files differ)
Index: branches/stable/tests/06-pkmap/cmr10.360pk
===================================================================
--- branches/stable/tests/06-pkmap/cmr10.360pk 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/tests/06-pkmap/cmr10.360pk 2018-01-02 00:12:04 UTC (rev 790)
Property changes on: branches/stable/tests/06-pkmap/cmr10.360pk
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: branches/stable/tests/06-pkmap/prepatch.pdf
===================================================================
(Binary files differ)
Modified: branches/stable/tests/06-pkmap/test-pkmap.tex
===================================================================
--- branches/stable/tests/06-pkmap/test-pkmap.tex 2018-01-01 23:12:21 UTC (rev 789)
+++ branches/stable/tests/06-pkmap/test-pkmap.tex 2018-01-02 00:12:04 UTC (rev 790)
@@ -3,21 +3,23 @@
% Test map files with bitmap (i.e., Type 3) fonts.
% A thread starting here:
-% http://tug.org/pipermail/pdftex/2016-July/009064.html
-% and continuing here (and more):
-% http://tug.org/pipermail/pdftex/2016-August/009065.html
-% discusses a patch for supporting an encoding file with Type 3.
-% The patch has not yet been installed.
+% https://tug.org/pipermail/pdftex/2016-July/009064.html
+% and continuing on:
+% https://tug.org/pipermail/pdftex/2016-August/009065.html
+% https://mailman.ntg.nl/pipermail/ntg-pdftex/2017-August/004183.html
+% https://mailman.ntg.nl/pipermail/ntg-pdftex/2017-December/004189.html
+% discusses a patch for supporting an encoding file with Type 3 fnts.
%
% For comparison, the PDF made before the patch was applied is saved
% here as prepatch.pdf.
%
-% The default PK resolution is 72, so we made cmb10.72pk in this directory.
-% (mf-nowin '\mode:=mactrue; input cmb10' && gftopk cmb10.72gf)
-% (mf-nowin '\mode:=mactrue; input cmr10' && gftopk cmr10.72gf)
-%
+% The default PK resolution is 72, so we made cmb10.72pk et al. in this
+% directory; see the Makefile.
+
+% basic typesetting:
\pdfoutput=1 \catcode`\{=1 \catcode`\}=2
\hsize=6pc \parfillskip=0pt plus1fil \vsize=6in \lineskip=1pc
+\pdftrailerid{}
\pdfcompresslevel=0 \pdfobjcompresslevel=0
\pdfglyphtounicode{ffi}{0066 0066 0069} %no need for all: \input glyphtounicode
@@ -26,12 +28,11 @@
\pdfmapline{cmr10}% type3 map without encoding - no ToUnicode, no /ffi.
\font\cmr=cmr10 \noindent \cmr ffi
-% if we install the patch.
-%\pdfmapline{cmb10 <7t.enc}% type3 map with encoding
-%\font\cmb=cmb10 \noindent \cmb ffi
+\pdfmapline{cmb10 <7t.enc}% type3 map with encoding
+\font\cmb=cmb10 \noindent \cmb ffi
-% geometrically-scaled tfm: the Type 3 should be scaled (resulting in
-% blocky blown-up bits), instead of using a separately-generated
+% scaled tfm of previously defined tfm: the Type 3 should not be
+% geometrically scaled, but instead should use a separately-generated
% cmr10.360pk (50*72/10).
\font\big = cmr10 at 50pt \big big
\end
More information about the pdftex-commits
mailing list