27 struct FT_LibraryRec_;
29 struct FT_CharMapRec_;
33 typedef struct FT_LibraryRec_* FT_Library;
34 typedef struct FT_FaceRec_* FT_Face;
35 typedef struct FT_CharMapRec_* FT_CharMap;
36 typedef struct FT_GlyphRec_* FT_Glyph;
37 typedef struct FT_Matrix_ FT_Matrix;
38 typedef struct FT_Bitmap_ FT_Bitmap;
39 typedef signed long FT_Pos;
41 struct FT_Vector_ { FT_Pos
x,
y; };
42 struct FT_BBox_ { FT_Pos xMin, yMin, xMax, yMax; };
44 typedef struct FT_Vector_ FT_Vector;
45 typedef struct FT_BBox_ FT_BBox;
52 class TMathTextRenderer;
59 friend class TMathTextRenderer;
75 enum { kTTMaxFonts = 32, kMaxGlyphs = 1024 };
79 static FT_CharMap fgCharMap[kTTMaxFonts];
83 static char *fgFontName[kTTMaxFonts];
84 static FT_Face fgFace[kTTMaxFonts];
98 static void LayoutGlyphs();
99 static void PrepareString(
const char *
string);
100 static void PrepareString(
const wchar_t *
string);
101 static void SetRotationMatrix(
Float_t angle);
108 static void Cleanup();
109 static Int_t GetAscent();
110 static const FT_BBox &GetBox();
112 static Bool_t GetHinting();
113 static Bool_t GetKerning();
114 static Int_t GetNumGlyphs();
115 static FT_Matrix *GetRotMatrix();
116 static Bool_t GetSmoothing();
117 static Int_t GetWidth();
118 static void SetHinting(
Bool_t state);
119 static void SetKerning(
Bool_t state);
120 static void SetSmoothing(
Bool_t state);
122 static void GetTextExtent(
UInt_t &w,
UInt_t &h,
wchar_t *text);
123 static void GetTextAdvance(
UInt_t &
a,
char *text);
127 static Bool_t IsInitialized();
FT_Vector fPos
position of glyph origin
static FT_Matrix * fgRotMatrix
rotation matrix
static Int_t fgFontCount
number of fonts loaded
FT_Glyph fImage
glyph image
Interface to the freetype 2 library.
This class is the basic interface to the Win32 graphics system.
UInt_t fIndex
glyph index in face
Interface to low level X11 (Xlib).
static Int_t fgAscent
string ascent, used to compute Y alignment
#define ClassDef(name, id)
void Init(TClassEdit::TInterpreterLookupHelper *helper)
static FT_BBox fgCBox
string control box
static Int_t fgTBlankW
trailing blanks width
static Int_t fgCurFontIdx
current font index
static FT_Library fgLibrary
FreeType font library.
static Bool_t fgKerning
use kerning (true by default)
static Bool_t fgInit
true if the Init has been called
TTF helper class containing glyphs description.
static Bool_t fgHinting
use hinting (true by default)
static Int_t fgSymbItaFontIdx
Symbol italic font index.
static Bool_t fgSmoothing
use anti-aliasing (true when >8 planes, false otherwise)
static Int_t fgNumGlyphs
number of glyphs in the string
static Int_t fgWidth
string width, used to compute X alignment