From f305bb496368b3e6c556c84f85d76e22014640c3 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Mon, 17 Mar 2014 10:41:29 +0000 Subject: Sync with XeTeX git-svn-id: svn://tug.org/texlive/trunk@33202 c570f23f-e606-0410-a88d-b1316a301751 --- .../texk/web2c/xetexdir/XeTeXLayoutInterface.cpp | 58 +++++++--------------- 1 file changed, 18 insertions(+), 40 deletions(-) (limited to 'Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp') 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; } -- cgit v1.2.3