summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp
diff options
context:
space:
mode:
authorJonathan Kew <jfkthame@googlemail.com>2006-12-06 17:29:15 +0000
committerJonathan Kew <jfkthame@googlemail.com>2006-12-06 17:29:15 +0000
commite908059c852606dc94864e34c963f682da27e67b (patch)
tree627f62320c0c51fd1125ae98b2bf3e2c84ca9f1c /Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp
parent62dfc6d9588e7c3aa6a85b06b53479697b272243 (diff)
xetex updates for version 0.996
git-svn-id: svn://tug.org/texlive/trunk@2602 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp')
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp b/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp
index c598b9c96a1..fc21a6837a0 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp
+++ b/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp
@@ -71,6 +71,8 @@ XeTeXFontInst::XeTeXFontInst(float pointSize, LEErrorCode &status)
, fNumGlyphsInited(false)
, fVertical(false)
, fFilename(NULL)
+ , fFirstCharCode(-1)
+ , fLastCharCode(-1)
{
// the concrete subclass is responsible to call initialize()
}
@@ -296,3 +298,37 @@ XeTeXFontInst::mapGlyphToIndex(const char* glyphName) const
else
return 0;
}
+
+const char*
+XeTeXFontInst::getGlyphName(LEGlyphID gid, int& nameLen)
+{
+ le_uint32 len;
+ const char *p = (const char*)readFontTable(LE_POST_TABLE_TAG, len);
+ if (p != NULL) {
+ return getGlyphNamePtr(p, len, gid, &nameLen);
+ }
+}
+
+LEUnicode32
+XeTeXFontInst::getFirstCharCode()
+{
+ if (fFirstCharCode == -1) {
+ int ch = 0;
+ while (mapCharToGlyph(ch) == 0 && ch < 0x10ffff)
+ ++ch;
+ fFirstCharCode = ch;
+ }
+ return fFirstCharCode;
+}
+
+LEUnicode32
+XeTeXFontInst::getLastCharCode()
+{
+ if (fLastCharCode == -1) {
+ int ch = 0x10ffff;
+ while (mapCharToGlyph(ch) == 0 && ch > 0)
+ --ch;
+ fLastCharCode = ch;
+ }
+ return fLastCharCode;
+}