diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2014-03-14 21:23:32 +0000 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2014-03-14 21:23:32 +0000 |
commit | 0af7dc6b7a6b59b735efb25e93dd4e62be2126d5 (patch) | |
tree | c08c1b55d7ae0793a37a9e621a1adebb740f12c8 /Build/source/texk/web2c/xetexdir/XeTeXFontInst.h | |
parent | 97f7834d79c2ef1a3a7a3d0ed038881a2fb1f459 (diff) |
Sync XeTeX
git-svn-id: svn://tug.org/texlive/trunk@33175 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/xetexdir/XeTeXFontInst.h')
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeXFontInst.h | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h b/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h index 119f42808a9..49e0cbe58d9 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h +++ b/Build/source/texk/web2c/xetexdir/XeTeXFontInst.h @@ -35,8 +35,8 @@ authorization from the copyright holders. * * created on: 2005-10-22 * created by: Jonathan Kew - * - * originally based on PortableFontInstance.h from ICU + * + * originally based on PortableFontInstance.h from ICU */ @@ -57,72 +57,72 @@ 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 fUnitsPerEM; + float fPointSize; + float fAscent; + float fDescent; + float fCapHeight; + float fXHeight; + float fItalicAngle; - bool fVertical; // false = horizontal, true = vertical + bool fVertical; // false = horizontal, true = vertical - char *fFilename; // actually holds [filename:index], as used in xetex + char *fFilename; // actually holds [filename:index], as used in xetex - FT_Face ftFace; - hb_font_t* hbFont; - const char *fMath; + FT_Face ftFace; + hb_font_t* hbFont; + const char *fMath; public: - XeTeXFontInst(float pointSize, int &status); - XeTeXFontInst(const char* filename, int index, float pointSize, int &status); + XeTeXFontInst(float pointSize, int &status); + XeTeXFontInst(const char* filename, int index, float pointSize, int &status); + + virtual ~XeTeXFontInst(); - virtual ~XeTeXFontInst(); + void initialize(const char* pathname, int index, int &status); - void initialize(const char* pathname, int index, int &status); + const void *getFontTable(OTTag tableTag) const; + const void *getFontTable(FT_Sfnt_Tag tableTag) const; + const char *getMathTable(); - const void *getFontTable(OTTag tableTag) const; - const void *getFontTable(FT_Sfnt_Tag tableTag) const; - const char *getMathTable(); + const char *getFilename() const { return fFilename; } + hb_font_t *getHbFont() const { return hbFont; } + void setLayoutDirVertical(bool vertical); + bool getLayoutDirVertical() const { return fVertical; }; - const char *getFilename() const { return fFilename; } - hb_font_t *getHbFont() const { return hbFont; } - void setLayoutDirVertical(bool vertical); - bool getLayoutDirVertical() const { return fVertical; }; + 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 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; } + GlyphID mapCharToGlyph(UChar32 ch) const; + GlyphID mapGlyphToIndex(const char* glyphName) const; - GlyphID mapCharToGlyph(UChar32 ch) const; - GlyphID mapGlyphToIndex(const char* glyphName) const; + uint16_t getNumGlyphs() const; - uint16_t getNumGlyphs() const; + void getGlyphBounds(GlyphID glyph, GlyphBBox* bbox); - void getGlyphBounds(GlyphID glyph, GlyphBBox* bbox); + float getGlyphWidth(GlyphID glyph); + void getGlyphHeightDepth(GlyphID glyph, float *ht, float* dp); + void getGlyphSidebearings(GlyphID glyph, float* lsb, float* rsb); + float getGlyphItalCorr(GlyphID glyph); - float getGlyphWidth(GlyphID glyph); - void getGlyphHeightDepth(GlyphID glyph, float *ht, float* dp); - void getGlyphSidebearings(GlyphID glyph, float* lsb, float* rsb); - float getGlyphItalCorr(GlyphID glyph); + const char* getGlyphName(GlyphID gid, int& nameLen); - const char* getGlyphName(GlyphID gid, int& nameLen); - - UChar32 getFirstCharCode(); - UChar32 getLastCharCode(); + UChar32 getFirstCharCode(); + UChar32 getLastCharCode(); - float unitsToPoints(float units) const - { - return (units * fPointSize) / (float) fUnitsPerEM; - } + float unitsToPoints(float units) const + { + return (units * fPointSize) / (float) fUnitsPerEM; + } - float pointsToUnits(float points) const - { - return (points * (float) fUnitsPerEM) / fPointSize; - } + float pointsToUnits(float points) const + { + return (points * (float) fUnitsPerEM) / fPointSize; + } }; #endif |