From: ben Date: Sun, 7 Jan 2007 00:15:52 +0000 (+0000) Subject: Support for getting ligature information from AFM files, which was the X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/commitdiff_plain/584ae07283a077abf2f5f7a1b693e5f97c399115?hp=36e8f0f56f85d20f939091301d65c7f4f6889998 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 --- 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");