From a3d1f02334358b40e123062bf127dc317f79af1e Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 18 May 2013 11:01:52 +0000 Subject: 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 --- Build/source/texk/web2c/xetexdir/XeTeX_ext.c | 9 +++++---- 1 file 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; } -- cgit v1.2.3