diff options
Diffstat (limited to 'Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp')
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp | 58 |
1 files changed, 18 insertions, 40 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp b/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp index dc1d1067f3e..c3e3b7d1b5d 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp +++ b/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp @@ -56,13 +56,6 @@ extern "C" { #endif #include "XeTeXFontMgr.h" -typedef void* voidptr; - -extern "C" { - extern voidptr* fontlayoutengine; - extern integer* fontarea; -} - struct XeTeXLayoutEngine_rec { XeTeXFontInst* font; @@ -1017,43 +1010,28 @@ findNextGraphiteBreak(void) } bool -usingGraphite(int font) -{ - bool ret = false; - if (fontarea[font] == OTGR_FONT_FLAG) { - XeTeXLayoutEngine engine = (XeTeXLayoutEngine)fontlayoutengine[font]; - if (engine->shaper != NULL && (strcmp("graphite2", engine->shaper) == 0)) { - ret = true; - } - } - - return ret; +usingGraphite(XeTeXLayoutEngine engine) +{ + if (engine->shaper != NULL && (strcmp("graphite2", engine->shaper) == 0)) + return true; + else + return false; } bool -usingOpenType(int font) -{ - bool ret = false; - if (fontarea[font] == OTGR_FONT_FLAG) { - XeTeXLayoutEngine engine = (XeTeXLayoutEngine)fontlayoutengine[font]; - if (engine->shaper == NULL || (strcmp("ot", engine->shaper) == 0)) { - ret = true; - } - } - - return ret; +usingOpenType(XeTeXLayoutEngine engine) +{ + if (engine->shaper == NULL || (strcmp("ot", engine->shaper) == 0)) + return true; + else + return false; } bool -isOpenTypeMathFont(int font) -{ - bool ret = false; - if (fontarea[font] == OTGR_FONT_FLAG) { - XeTeXLayoutEngine engine = (XeTeXLayoutEngine)fontlayoutengine[font]; - if (engine->font->getMathTable() != NULL) { - ret = true; - } - } - - return ret; +isOpenTypeMathFont(XeTeXLayoutEngine engine) +{ + if (engine->font->getMathTable() != NULL) + return true; + else + return false; } |