Logo Search packages:      
Sourcecode: yudit version File versions

SFontTTF Class Reference

#include <SFontTTF.h>

Inheritance diagram for SFontTTF:

SFontLookup

List of all members.


Detailed Description

Author:
: Gaspar Sinai <gsinai@yudit.org>
Version:
: 2000-04-23 This is the abstract widget toolkit font package

Definition at line 54 of file SFontTTF.h.


Public Types

enum  SHardWire {
  SS_NONE = 0, SS_MSLVT, SS_NOJAMO, SS_INDIC,
  SS_JAMO, SS_DEVANAGARI, SS_BENGALI, SS_GURMUKHI,
  SS_GUJARATI, SS_ORIYA, SS_TAMIL, SS_TELUGU,
  SS_KANNADA, SS_MALAYALAM, SS_SINHALA, SS_THAI,
  SS_LAO, SS_TIBETAN
}

Public Member Functions

double ascent (const SS_Matrix2D &matrix)
bool attach (SS_GlyphIndex base, SS_GlyphIndex mark, int where, int *x, int *y)
 try to attach mark to base.
double descent (const SS_Matrix2D &matrix)
bool draw (SCanvas *canvas, const SS_Matrix2D &matrix, SS_UCS4 uch)
SS_GlyphIndex findGlyph (SS_UCS4 in, bool ownjoiners=true)
double gap (const SS_Matrix2D &matrix)
void getBaseOffsets (const SS_Matrix2D &m, SS_UCS4 mark, double *offx, double *offy)
unsigned int getGlyphClass (SS_GlyphIndex in)
SS_GlyphIndex gindex (SS_UCS4 in)
 Find the glyph index for the character.
bool gpos (const char *script, const char *feature, const SS_GlyphIndex *in, int *x, int *y)
 Get the releative position of glyphs.
unsigned int gsub (const char *script, const char *feature, const SS_GlyphIndex *in, unsigned int in_size, unsigned int *start, SS_GlyphIndex *out, unsigned int *out_size, bool *is_contextual)
 Perform a glyph/ligature substitution.
int gwidth (SS_GlyphIndex in)
 Get the width of the unscaled glyph.
bool isLeftAligned (SS_UCS4 uch) const
 Try to make a fuzzy guess if we need to align the diacritics to the left or to the right. left aligned marks will be rendered this way: x----basewith----x x-markwidth-x right aligned marks will be rendered this way: x----basewith----x x-markwidth-x There are no docs available that this is the right way to do. This is purely guesswork - most fonts will have negative bearing for an overhang.
bool isOK ()
double scale ()
 SFontTTF (const SFile &file, const SString &encoding)
double width (const SS_Matrix2D &matrix)
bool width (const SS_Matrix2D &matrix, SS_UCS4 uch, double *width_)

Static Public Member Functions

static void setBase (SS_UCS4 base)

Protected Member Functions

bool checkTables ()
bool doContextSubstitutions (SS_GlyphIndex *ino, unsigned int inlen, unsigned int *olen, const char *script, const char *feature)
void drawGlyph (SCanvas *canvas, const SS_Matrix2D &matrix, SS_GlyphIndex glyphno)
bool findGlyphs (SS_UCS4 in, SV_GlyphIndex *out)
bool findJamoGlyphs (const SS_UCS4 *in, unsigned int len, SV_GlyphIndex *out)
bool findSouthIndicGlyphs (const SString &key, unsigned int scriptcode, const char *script, const SS_UCS4 *chars, unsigned int liglen, SV_GlyphIndex *out)
bool getBBOX (SS_GlyphIndex glyphno, int *xMin, int *yMin, int *xMax, int *yMax) const
 Get the raw (unscaled) bounding box.
bool getContours (SS_GlyphIndex glyphno, SH_Vector *xc, SH_Vector *yc)
 Get the contour points.
int getGlyphWidth (SS_GlyphIndex glyph)
int getLeftSideBearing (SS_GlyphIndex glyphno) const
 Find out raw, unscaled left-side bearing. is th glyph.
void getName (long id, const char *str, int len)
unsigned int getOTFLigature (const char *script, const char *feature, const SS_GlyphIndex *chars, unsigned int liglen, SS_GlyphIndex *out, unsigned int substtype=4)
unsigned int getOTFLigatures (SS_GlyphIndex *ino, unsigned int len, const char *script, const char *feature, SS_GlyphIndex halant, SS_GlyphIndex reord, bool *base)
void getOTFMarkToBase (SS_GlyphIndex baseGlyph, SS_GlyphIndex markGlyph, int *ix, int *iy)
void getOTFMarkToMark (SS_GlyphIndex baseGlyph, SS_GlyphIndex markGlyph, int *ix, int *iy)
bool getPositions (int feature, const SS_GlyphIndex *gv, unsigned int gvsize, const char *_feature, const char *_script, int *xpos, int *ypos)
int getWidth (SS_GlyphIndex glyphno)
 Find out raw, unscaled width of glyph. is th glyph.
bool hasOTFLigatures ()
bool init ()
bool processName ()
bool storeMarkPositions (const SString &key, const SS_GlyphIndex *gv, unsigned int liglen)
SS_GlyphIndex substituteOTFGlyph (const char *feature, SS_GlyphIndex g)
double widthGlyph (const SS_Matrix2D &m, SS_GlyphIndex glyphno)

Protected Attributes

SS_UCS4 baseCharacter
SS_GlyphIndex baseGlyph
int baseWidth
bool broken
SProperties char2Glyphs
SBinHashtable< int > char2Width
double charAscent
double charDescent
SUniMap charEncoder
unsigned int charEncoderTable
double charWidth
SS_GlyphIndex defaultGlyph
SFile file
SString fontencoding
SHardWire hardWire
SFileImage image
bool isFixedPitch
double italicAngle
double lineGap
int longOffsets
SBinHashtable< int > mark2Base
SHashtable< SV_INTmark2BaseList
SString name
SProperties names
bool ok
double scaleFactor
SBinHashtable< void * > tables
double underlinePosition
double underlineThickness

Static Protected Attributes

static SS_UCS4 setBaseCharacter = 0

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index