summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp')
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp b/Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp
index c690c683c8c..4625fa84362 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp
+++ b/Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp
@@ -49,7 +49,7 @@ extern "C" {
#include "LESwaps.h"
-int getMathConstant(LEFontInstance* fontInst, mathConstantIndex whichConstant)
+static SInt16 getMathConstant(LEFontInstance* fontInst, mathConstantIndex whichConstant)
{
const char* table = (const char*)fontInst->getFontTable(kMATHTableTag);
if (table == NULL)
@@ -80,7 +80,10 @@ getotmathconstant(int f, int n)
if (fontarea[f] == OTGR_FONT_FLAG) {
XeTeXFontInst* font = (XeTeXFontInst*)getFont((XeTeXLayoutEngine)fontlayoutengine[f]);
- rval = X2Fix(getMathConstant(font, (mathConstantIndex)n) * Fix2X(fontsize[f]) / font->getUnitsPerEM());
+ rval = getMathConstant(font, (mathConstantIndex)n);
+ /* scale according to font size, except the ones that are percentages */
+ if (n > scriptScriptPercentScaleDown && n < radicalDegreeBottomRaisePercent)
+ rval = X2Fix(rval * Fix2X(fontsize[f]) / font->getUnitsPerEM());
}
return rval;
}
@@ -194,7 +197,7 @@ getnativemathexparam(int f, int n)
}
int
-getotmathvariant(int f, int g, int v, int* adv, int horiz)
+getotmathvariant(int f, int g, int v, integer* adv, int horiz)
{
int rval = g;
*adv = -1;