From 669b28cebeb55e7a6a5c3edce969ba478672efcc Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sun, 7 Jan 2007 00:15:52 +0000 Subject: Support for getting ligature information from AFM files, which was the whole point of the glyph renumbering. [originally from svn r7066] --- 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"); -- cgit v1.1