From 584ae07283a077abf2f5f7a1b693e5f97c399115 Mon Sep 17 00:00:00 2001 From: ben Date: Sun, 7 Jan 2007 00:15:52 +0000 Subject: [PATCH] Support for getting ligature information from AFM files, which was the whole point of the glyph renumbering. git-svn-id: svn://svn.tartarus.org/sgt/halibut@7066 cda61777-01e9-0310-a592-d414129be87e --- in_afm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/in_afm.c b/in_afm.c index 69cd1e3..d0b2088 100644 --- a/in_afm.c +++ b/in_afm.c @@ -181,6 +181,28 @@ void read_afm_file(input *in) { goto giveup; } g = glyph_intern(val); + } else if (strcmp(key, "L") == 0) { + glyph succ, lig; + if (!(val = strtok(NULL, " \t")) || + !strcmp(val, ";")) { + error(err_afmval, &in->pos, key, 1); + goto giveup; + } + succ = glyph_intern(val); + if (!(val = strtok(NULL, " \t")) || + !strcmp(val, ";")) { + error(err_afmval, &in->pos, key, 1); + goto giveup; + } + lig = glyph_intern(val); + if (g != NOGLYPH && succ != NOGLYPH && + lig != NOGLYPH) { + ligature *l = snew(ligature); + l->left = g; + l->right = succ; + l->lig = lig; + add234(fi->ligs, l); + } } do { key = strtok(NULL, " \t"); -- 2.11.0