diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2007-01-07 00:15:52 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2007-01-07 00:15:52 +0000 |
| commit | 669b28cebeb55e7a6a5c3edce969ba478672efcc (patch) | |
| tree | da819fe184eaccb2f920ea005330f0c427af1515 | |
| parent | fb816f82ea8a90a1e92557dcc699cbcfe53f236c (diff) | |
| download | halibut-669b28cebeb55e7a6a5c3edce969ba478672efcc.zip halibut-669b28cebeb55e7a6a5c3edce969ba478672efcc.tar.gz halibut-669b28cebeb55e7a6a5c3edce969ba478672efcc.tar.bz2 halibut-669b28cebeb55e7a6a5c3edce969ba478672efcc.tar.xz | |
Support for getting ligature information from AFM files, which was the
whole point of the glyph renumbering.
[originally from svn r7066]
| -rw-r--r-- | in_afm.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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"); |