* [fontloader] crash in font-otf.lua / actions["reorganize glyph anchors"]
@ 2014-12-14 15:23 Philipp Gesang
2014-12-22 16:36 ` Philipp Gesang
0 siblings, 1 reply; 2+ messages in thread
From: Philipp Gesang @ 2014-12-14 15:23 UTC (permalink / raw)
To: ConTeXt ML
[-- Attachment #1.1.1: Type: text/plain, Size: 511 bytes --]
Hi Hans,
this bug was reported a while ago by user Thérèse on
tex.stackexchange.com [1]. The font “Eadui.ttf” [2] causes the
fontloader to access a nil value because the “Anchor-1” table is
sparse (nil at index 3). Test file for Context:
https://bitbucket.org/phg/lua-la-tex-tests/src/tip/cnt-eadui.tex
Patch attached, though I suspect it covers only the symptoms.
Philipp
[1] http://tex.stackexchange.com/q/195481/14066
[2] Download at http://openfontlibrary.org/font/eadui
[-- Attachment #1.1.2: font-otf.lua_reorganize_glyphs.patch --]
[-- Type: text/x-diff, Size: 836 bytes --]
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index 302d8ea..de392a9 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -2010,7 +2010,11 @@ actions["reorganize glyph anchors"] = function(data,filename,raw) -- when we rep
for tag, specification in next, data do
for i=1,#specification do
local si = specification[i]
- specification[i] = { si.x or 0, si.y or 0 }
+ if si then
+ specification[i] = { si.x or 0, si.y or 0 }
+ else
+ specification[i] = { }
+ end
end
end
else
[-- Attachment #1.2: Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-22 16:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-14 15:23 [fontloader] crash in font-otf.lua / actions["reorganize glyph anchors"] Philipp Gesang
2014-12-22 16:36 ` Philipp Gesang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).