summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/xetexdir/XeTeXFontInst_FT2.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_FT2.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_FT2.cpp')
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeXFontInst_FT2.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXFontInst_FT2.cpp b/Build/source/texk/web2c/xetexdir/XeTeXFontInst_FT2.cpp
index cc56442be24..9b909057259 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeXFontInst_FT2.cpp
+++ b/Build/source/texk/web2c/xetexdir/XeTeXFontInst_FT2.cpp
@@ -232,3 +232,48 @@ XeTeXFontInst_FT2::getKernPair(LEGlyphID leftGlyph, LEGlyphID rightGlyph, LEPoin
else
kern.fX = kern.fY = 0;
}
+
+const char*
+XeTeXFontInst_FT2::getGlyphName(LEGlyphID gid, int& nameLen)
+{
+ if (!fFreeTypeOnly)
+ return XeTeXFontInst::getGlyphName(gid, nameLen);
+ else if (FT_HAS_GLYPH_NAMES(face)) {
+ static char buffer[256];
+ FT_Get_Glyph_Name(face, gid, buffer, 256);
+ nameLen = strlen(buffer);
+ return &buffer[0];
+ }
+ else {
+ nameLen = 0;
+ return NULL;
+ }
+}
+
+LEUnicode32
+XeTeXFontInst_FT2::getFirstCharCode()
+{
+ if (!fFreeTypeOnly)
+ return XeTeXFontInst::getFirstCharCode();
+ else {
+ FT_UInt gindex;
+ return FT_Get_First_Char(face, &gindex);
+ }
+}
+
+LEUnicode32
+XeTeXFontInst_FT2::getLastCharCode()
+{
+ if (!fFreeTypeOnly)
+ return XeTeXFontInst::getLastCharCode();
+ else {
+ FT_UInt gindex;
+ LEUnicode32 ch = FT_Get_First_Char(face, &gindex);
+ LEUnicode32 prev = ch;
+ while (gindex != 0) {
+ prev = ch;
+ ch = FT_Get_Next_Char(face, ch, &gindex);
+ }
+ return prev;
+ }
+}