summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2014-08-16 10:06:31 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2014-08-16 10:06:31 +0000
commitcf417274d82f73f673cc9295d58e5f5190973edb (patch)
tree66429e222ddb03216c3b8b96d7354bd84d6a010b /Build/source/texk/web2c/xetexdir/XeTeXFontInst.h
parent5142e474120bd1dbb6b95524a28bb653ca73b139 (diff)
Update XeTeX
git-svn-id: svn://tug.org/texlive/trunk@34946 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/xetexdir/XeTeXFontInst.h')
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeXFontInst.h51
1 files changed, 28 insertions, 23 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h b/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h
index 49e0cbe58d9..82d431f433b 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h
+++ b/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h
@@ -57,21 +57,22 @@ authorization from the copyright holders.
class XeTeXFontInst
{
protected:
- unsigned short fUnitsPerEM;
- float fPointSize;
- float fAscent;
- float fDescent;
- float fCapHeight;
- float fXHeight;
- float fItalicAngle;
+ unsigned short m_unitsPerEM;
+ float m_pointSize;
+ float m_ascent;
+ float m_descent;
+ float m_capHeight;
+ float m_xHeight;
+ float m_italicAngle;
- bool fVertical; // false = horizontal, true = vertical
+ bool m_vertical; // false = horizontal, true = vertical
- char *fFilename; // actually holds [filename:index], as used in xetex
+ char *m_filename; // font filename
+ uint32_t m_index; // face index
- FT_Face ftFace;
- hb_font_t* hbFont;
- const char *fMath;
+ FT_Face m_ftFace;
+ hb_font_t* m_hbFont;
+ const char *m_math;
public:
XeTeXFontInst(float pointSize, int &status);
@@ -85,17 +86,21 @@ public:
const void *getFontTable(FT_Sfnt_Tag tableTag) const;
const char *getMathTable();
- const char *getFilename() const { return fFilename; }
- hb_font_t *getHbFont() const { return hbFont; }
+ const char *getFilename(uint32_t* index) const
+ {
+ *index = m_index;
+ return m_filename;
+ }
+ hb_font_t *getHbFont() const { return m_hbFont; }
void setLayoutDirVertical(bool vertical);
- bool getLayoutDirVertical() const { return fVertical; };
+ bool getLayoutDirVertical() const { return m_vertical; };
- float getPointSize() const { return fPointSize; };
- float getAscent() const { return fAscent; }
- float getDescent() const { return fDescent; }
- float getCapHeight() const { return fCapHeight; }
- float getXHeight() const { return fXHeight; }
- float getItalicAngle() const { return fItalicAngle; }
+ float getPointSize() const { return m_pointSize; };
+ float getAscent() const { return m_ascent; }
+ float getDescent() const { return m_descent; }
+ float getCapHeight() const { return m_capHeight; }
+ float getXHeight() const { return m_xHeight; }
+ float getItalicAngle() const { return m_italicAngle; }
GlyphID mapCharToGlyph(UChar32 ch) const;
GlyphID mapGlyphToIndex(const char* glyphName) const;
@@ -116,12 +121,12 @@ public:
float unitsToPoints(float units) const
{
- return (units * fPointSize) / (float) fUnitsPerEM;
+ return (units * m_pointSize) / (float) m_unitsPerEM;
}
float pointsToUnits(float points) const
{
- return (points * (float) fUnitsPerEM) / fPointSize;
+ return (points * (float) m_unitsPerEM) / m_pointSize;
}
};