summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-05-18 11:01:52 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2013-05-18 11:01:52 +0000
commita3d1f02334358b40e123062bf127dc317f79af1e (patch)
tree17fbf80fc6caae6e113ff631471096e6d8c4a38f /Build/source
parentbf115811366548fbac5e92987a6e703466266b97 (diff)
Fix selection of multiple alternates
XeTeX pre-0.9999 started counting from zero, so ssty=0 means first; ssty=1 second etc, but new code accounted only for 0 case, now we handle other values correctly. git-svn-id: svn://tug.org/texlive/trunk@30549 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeX_ext.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
index cc27215426c..be439173db2 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
+++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
@@ -994,10 +994,11 @@ loadOTfont(PlatformFontRef fontRef, XeTeXFont font, Fixed scaled_size, const cha
features[nFeatures].tag = tag;
features[nFeatures].start = 0;
features[nFeatures].end = (unsigned int) -1;
- if (param == 0)
- features[nFeatures].value = 1;
- else
- features[nFeatures].value = param;
+ // for backward compatibility with pre-0.9999 where feature
+ // indices started from 0
+ if (param >= 0)
+ param++;
+ features[nFeatures].value = param;
nFeatures++;
goto next_option;
}