25 struct FT_LibraryRec_;
27 struct FT_CharMapRec_;
31 typedef struct FT_LibraryRec_* FT_Library;
32 typedef struct FT_FaceRec_* FT_Face;
33 typedef struct FT_CharMapRec_* FT_CharMap;
34 typedef struct FT_GlyphRec_* FT_Glyph;
35 typedef struct FT_Matrix_ FT_Matrix;
36 typedef struct FT_Bitmap_ FT_Bitmap;
37 typedef signed long FT_Pos;
39 struct FT_Vector_ { FT_Pos
x,
y; };
40 struct FT_BBox_ { FT_Pos xMin, yMin, xMax, yMax; };
42 typedef struct FT_Vector_ FT_Vector;
43 typedef struct FT_BBox_ FT_BBox;
50 class TMathTextRenderer;
57 friend class TMathTextRenderer;
73 enum { kTTMaxFonts = 32, kMaxGlyphs = 1024 };
77 static FT_CharMap fgCharMap[kTTMaxFonts];
81 static char *fgFontName[kTTMaxFonts];
82 static FT_Face fgFace[kTTMaxFonts];
96 static void LayoutGlyphs();
97 static void PrepareString(
const char *
string);
98 static void PrepareString(
const wchar_t *
string);
99 static void SetRotationMatrix(
Float_t angle);
106 static void Cleanup();
107 static Int_t GetAscent();
108 static const FT_BBox &GetBox();
110 static Bool_t GetHinting();
111 static Bool_t GetKerning();
112 static Int_t GetNumGlyphs();
113 static FT_Matrix *GetRotMatrix();
114 static Bool_t GetSmoothing();
115 static Int_t GetWidth();
116 static void SetHinting(
Bool_t state);
117 static void SetKerning(
Bool_t state);
118 static void SetSmoothing(
Bool_t state);
120 static void GetTextExtent(
UInt_t &w,
UInt_t &h,
wchar_t *text);
121 static void GetTextAdvance(
UInt_t &
a,
char *text);
125 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)
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