summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp
diff options
context:
space:
mode:
authorJonathan Kew <jfkthame@googlemail.com>2008-03-27 09:58:47 +0000
committerJonathan Kew <jfkthame@googlemail.com>2008-03-27 09:58:47 +0000
commit194899d8a5ee8f12d82f140c728e1f9dad6c1d04 (patch)
treebb6b4ec379c4b0d0bd6716c2b0e452d160957085 /Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp
parent8fa331c4a7ed20194a81c2a9c5a9511ca2ab66dd (diff)
merge xetex updates (r.632) - embolden, OT math fontdimens
git-svn-id: svn://tug.org/texlive/trunk@7185 c570f23f-e606-0410-a88d-b1316a301751
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;