summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/font
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/font')
-rw-r--r--Build/source/texk/web2c/luatexdir/font/luafont.c8
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writecff.c1
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writetype2.c1
3 files changed, 10 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/font/luafont.c b/Build/source/texk/web2c/luatexdir/font/luafont.c
index 7cb03521d4e..62edb175812 100644
--- a/Build/source/texk/web2c/luatexdir/font/luafont.c
+++ b/Build/source/texk/web2c/luatexdir/font/luafont.c
@@ -950,8 +950,16 @@ static void read_char_packets(lua_State * L, int *l_fonts, charinfo * co, intern
lua_rawgeti(L, -2, 2);
if (lua_istable(L, -1)) {
lua_getglobal(L, "img");
+ /*tex Just in case one accidentely wipes |img|: */
+ if (lua_type(L,-1) != LUA_TTABLE) {
+ normal_error("vf command","no img table found");
+ }
lua_pushstring(L, "new");
lua_gettable(L, -2);
+ /*tex or the |new| entry: */
+ if (lua_type(L,-1) != LUA_TFUNCTION) {
+ normal_error("vf command","no img.new function found");
+ }
lua_insert(L, -3);
lua_pop(L, 1);
lua_call(L, 1, 1);
diff --git a/Build/source/texk/web2c/luatexdir/font/writecff.c b/Build/source/texk/web2c/luatexdir/font/writecff.c
index 2d0b16b085d..31a49bae01d 100644
--- a/Build/source/texk/web2c/luatexdir/font/writecff.c
+++ b/Build/source/texk/web2c/luatexdir/font/writecff.c
@@ -2975,6 +2975,7 @@ void write_cid_cff(PDF pdf, cff_font * cffont, fd_entry * fd)
size_t l = (last_cid / 8) + 1;
char *stream = xmalloc(l);
memset(stream, 0, l);
+ stream[0] |= 1 << 7; /*tex Force |.notdef| into the map. */
for (cid = 1; cid <= (long) last_cid; cid++) {
if (CIDToGIDMap[2 * cid] || CIDToGIDMap[2 * cid + 1]) {
stream[(cid / 8)] |= (1 << (7 - (cid % 8)));
diff --git a/Build/source/texk/web2c/luatexdir/font/writetype2.c b/Build/source/texk/web2c/luatexdir/font/writetype2.c
index b8a74609007..49193579b7e 100644
--- a/Build/source/texk/web2c/luatexdir/font/writetype2.c
+++ b/Build/source/texk/web2c/luatexdir/font/writetype2.c
@@ -334,6 +334,7 @@ boolean make_tt_subset(PDF pdf, fd_entry * fd, unsigned char *buff, int buflen)
size_t l = (last_cid / 8) + 1;
char *stream = xmalloc(l);
memset(stream, 0, l);
+ stream[0] |= 1 << 7; /*tex Force |.notdef| into the map. */
for (cid = 1; cid <= (long) last_cid; cid++) {
if (used_chars[cid]) {
stream[(cid / 8)] |= (1 << (7 - (cid % 8)));