summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/pdftexdir/mapfile.c
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-04-13 02:17:33 +0000
committerKarl Berry <karl@freefriends.org>2017-04-13 02:17:33 +0000
commit3ddc435153bf1510c537a803b80e9588699c71f0 (patch)
tree34f61e75131149c2a3c2fa6b8ebc67259ed32e4b /Build/source/texk/web2c/pdftexdir/mapfile.c
parenteb6357e35b9141b1cfd6648b5cc7a4f8e1fd54d3 (diff)
revert type3+encoding+unicode patch, unfortunately; more mapline checks
git-svn-id: svn://tug.org/texlive/trunk@43773 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/mapfile.c')
-rw-r--r--Build/source/texk/web2c/pdftexdir/mapfile.c46
1 files changed, 17 insertions, 29 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/mapfile.c b/Build/source/texk/web2c/pdftexdir/mapfile.c
index 733fce9ba87..6ae1bc1e78f 100644
--- a/Build/source/texk/web2c/pdftexdir/mapfile.c
+++ b/Build/source/texk/web2c/pdftexdir/mapfile.c
@@ -288,19 +288,12 @@ static int check_fm_entry(fm_entry * fm, boolean warn)
/* do not set variable |a| as this entry will still be accepted */
}
- /* if for non-Type3 font both ps_name and font file are missing,
- drop this entry */
- if (!is_type3(fm) && fm->ps_name == NULL && !is_fontfile(fm)) {
+ /* if both ps_name and font file are missing, drop this entry */
+ if (fm->ps_name == NULL && !is_fontfile(fm)) {
if (warn)
pdftex_warn
("invalid entry for `%s': both ps_name and font file missing",
- fm->tfm_name);
- a += 1;
- } else if (is_type3(fm) && fm->encname == NULL) {
- if (warn)
- pdftex_warn
- ("invalid entry for `%s': encoding file for type3 missing",
- fm->tfm_name);
+ fm->tfm_name ? fm->tfm_name : "");
a += 1;
}
@@ -309,7 +302,7 @@ static int check_fm_entry(fm_entry * fm, boolean warn)
if (warn)
pdftex_warn
("invalid entry for `%s': only subsetted TrueType font can be reencoded",
- fm->tfm_name);
+ fm->tfm_name ? fm->tfm_name : "");
a += 2;
}
@@ -319,7 +312,7 @@ static int check_fm_entry(fm_entry * fm, boolean warn)
if (warn)
pdftex_warn
("invalid entry for `%s': SlantFont/ExtendFont can be used only with embedded Type1 fonts",
- fm->tfm_name);
+ fm->tfm_name ? fm->tfm_name : "");
a += 4;
}
@@ -328,14 +321,16 @@ static int check_fm_entry(fm_entry * fm, boolean warn)
if (warn)
pdftex_warn
("invalid entry for `%s': too big value of SlantFont (%g)",
- fm->tfm_name, fm->slant / 1000.0);
+ fm->tfm_name ? fm->tfm_name : "",
+ fm->slant ? fm->slant / 1000.0 : 0);
a += 8;
}
if (abs(fm->extend) > 2000) {
if (warn)
pdftex_warn
("invalid entry for `%s': too big value of ExtendFont (%g)",
- fm->tfm_name, fm->extend / 1000.0);
+ fm->tfm_name ? fm->tfm_name : "",
+ fm->extend ? fm->extend / 1000.0 : 0);
a += 16;
}
@@ -345,7 +340,7 @@ static int check_fm_entry(fm_entry * fm, boolean warn)
if (warn)
pdftex_warn
("invalid entry for `%s': PidEid can be used only with subsetted non-reencoded TrueType fonts",
- fm->tfm_name);
+ fm->tfm_name ? fm->tfm_name : "");
a += 32;
}
@@ -544,17 +539,15 @@ static void fm_scan_line(void)
set_opentype(fm);
else
set_type1(fm);
- } else {
- if (is_std_t1font(fm)) {
- set_type1(fm); /* assume a builtin font is Type1 */
- } else {
- set_type3(fm); /* otherwise font is Type3 */
- }
- }
- if (check_fm_entry(fm, true) != 0)
+ } else
+ set_type1(fm); /* assume a builtin font is Type1 */
+
+ /* If the input is devious, check_fm_entry may not recognize a
+ problem. Check that we have a tfm_name in any case. */
+ if (check_fm_entry(fm, true) != 0 || ! fm->tfm_name)
goto bad_line;
/*
- Until here the map line has been completely scanned without errors;
+ If we get here, the map line has been completely scanned without errors;
fm points to a valid, freshly filled-out fm_entry structure.
Now follows the actual work of registering/deleting.
*/
@@ -634,11 +627,6 @@ boolean hasfmentry(internalfontnumber f)
return pdffontmap[f] != (fmentryptr) dummy_fm_entry();
}
-boolean isscalable(internalfontnumber f)
-{
- return hasfmentry(f) && (!is_type3((fm_entry *)pdffontmap[f]));
-}
-
/* check whether a map entry is valid for font replacement */
static boolean fm_valid_for_font_replacement(fm_entry * fm)