summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2007-01-07 00:15:52 +0000
committerBen Harris <bjh21@bjh21.me.uk>2007-01-07 00:15:52 +0000
commit669b28cebeb55e7a6a5c3edce969ba478672efcc (patch)
treeda819fe184eaccb2f920ea005330f0c427af1515
parentfb816f82ea8a90a1e92557dcc699cbcfe53f236c (diff)
downloadhalibut-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.c22
1 files changed, 22 insertions, 0 deletions
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");