TTF Class Reference

#include <TTF.h>

List of all members.

Public Member Functions

 TTF ()
virtual ~TTF ()
 TTF ()
virtual ~TTF ()

Static Public Member Functions

static Short_t CharToUnicode (UInt_t code)
static void LayoutGlyphs ()
static void PrepareString (const char *string)
static void SetRotationMatrix (Float_t angle)
static void Init ()
static void Cleanup ()
static Int_t GetAscent ()
static const FT_BBoxGetBox ()
static TTGlyphGetGlyphs ()
static Bool_t GetHinting ()
static Bool_t GetKerning ()
static Int_t GetNumGlyphs ()
static FT_MatrixGetRotMatrix ()
static Bool_t GetSmoothing ()
static Int_t GetWidth ()
static void SetHinting (Bool_t state)
static void SetKerning (Bool_t state)
static void SetSmoothing (Bool_t state)
static void GetTextExtent (UInt_t &w, UInt_t &h, char *text)
static void GetTextAdvance (UInt_t &a, char *text)
static void SetTextFont (Font_t fontnumber)
static Int_t SetTextFont (const char *fontname, Int_t italic=0)
static void SetTextSize (Float_t textsize)
static Bool_t IsInitialized ()
static void Version (Int_t &major, Int_t &minor, Int_t &patch)
static Short_t CharToUnicode (UInt_t code)
static void LayoutGlyphs ()
static void PrepareString (const char *string)
static void SetRotationMatrix (Float_t angle)
static void Init ()
static void Cleanup ()
static Int_t GetAscent ()
static const FT_BBoxGetBox ()
static TTGlyphGetGlyphs ()
static Bool_t GetHinting ()
static Bool_t GetKerning ()
static Int_t GetNumGlyphs ()
static FT_MatrixGetRotMatrix ()
static Bool_t GetSmoothing ()
static Int_t GetWidth ()
static void SetHinting (Bool_t state)
static void SetKerning (Bool_t state)
static void SetSmoothing (Bool_t state)
static void GetTextExtent (UInt_t &w, UInt_t &h, char *text)
static void GetTextAdvance (UInt_t &a, char *text)
static void SetTextFont (Font_t fontnumber)
static Int_t SetTextFont (const char *fontname, Int_t italic=0)
static void SetTextSize (Float_t textsize)
static Bool_t IsInitialized ()
static void Version (Int_t &major, Int_t &minor, Int_t &patch)

Private Types

enum  
enum  

Static Private Attributes

static Int_t fgAscent
static FT_BBox fgCBox
static FT_CharMap fgCharMap [kTTMaxFonts]
static Int_t fgCurFontIdx
static Int_t fgSymbItaFontIdx
static Int_t fgFontCount
static char * fgFontName [kTTMaxFonts]
static FT_Face fgFace [kTTMaxFonts]
static TTGlyph fgGlyphs [kMaxGlyphs]
static Bool_t fgHinting
static Bool_t fgInit
static Bool_t fgKerning
static FT_Library fgLibrary
static Int_t fgNumGlyphs
static FT_MatrixfgRotMatrix
static Bool_t fgSmoothing
static Int_t fgTBlankW
static Int_t fgWidth
static char * fgFontName [kTTMaxFonts]
static FT_MatrixfgRotMatrix

Friends

class TGX11TTF
class TGWin32


Detailed Description

Definition at line 59 of file TTF.h.


Member Enumeration Documentation

anonymous enum [private]

Definition at line 65 of file TTF.h.

anonymous enum [private]

Definition at line 65 of file TTF.h.


Constructor & Destructor Documentation

TTF::TTF (  )  [inline]

Definition at line 93 of file TTF.h.

virtual TTF::~TTF (  )  [virtual]

TTF::TTF (  )  [inline]

Definition at line 93 of file TTF.h.

virtual TTF::~TTF (  )  [virtual]


Member Function Documentation

Short_t TTF::CharToUnicode ( UInt_t  code  )  [static]

Definition at line 100 of file TTF.cxx.

References FT_FaceRec_::charmaps, FT_CharMapRec_::encoding_id, Error, fgCharMap, fgCurFontIdx, fgFace, fgFontName, FT_Get_Char_Index(), FT_Set_Charmap(), i, n, FT_FaceRec_::num_charmaps, and FT_CharMapRec_::platform_id.

Referenced by G__G__Graf_218_0_1(), G__setup_memfuncTTF(), and PrepareString().

void TTF::LayoutGlyphs (  )  [static]

Definition at line 162 of file TTF.cxx.

References FT_GlyphSlotRec_::advance, fgAscent, fgCBox, fgCurFontIdx, fgFace, fgGlyphs, fgHinting, fgKerning, fgNumGlyphs, fgRotMatrix, fgWidth, TTGlyph::fImage, TTGlyph::fIndex, TTGlyph::fPos, FT_Done_Glyph(), FT_Get_Glyph(), FT_Get_Kerning(), ft_glyph_bbox_pixels, FT_Glyph_Get_CBox(), FT_Glyph_Transform(), ft_kerning_default, ft_kerning_unfitted, FT_LOAD_DEFAULT, FT_Load_Glyph(), FT_LOAD_NO_HINTING, FT_Vector_Transform(), FT_FaceRec_::glyph, TMath::Max(), n, FT_Vector_::x, FT_BBox_::xMax, FT_BBox_::xMin, FT_Vector_::y, FT_BBox_::yMax, and FT_BBox_::yMin.

Referenced by TGX11TTF::DrawText(), TGWin32::DrawText(), TASImage::DrawText(), TASImage::DrawTextTTF(), G__G__Graf_218_0_2(), G__setup_memfuncTTF(), GetTextAdvance(), and GetTextExtent().

void TTF::PrepareString ( const char *  string  )  [static]

Definition at line 232 of file TTF.cxx.

References CharToUnicode(), fgCurFontIdx, fgFace, fgGlyphs, fgHinting, fgNumGlyphs, fgTBlankW, TTGlyph::fIndex, FT_LOAD_DEFAULT, FT_Load_Glyph(), FT_LOAD_NO_HINTING, kMaxGlyphs, and p.

Referenced by TGX11TTF::DrawText(), TASImage::DrawText(), TGWin32::DrawText(), TASImage::DrawTextTTF(), G__G__Graf_218_0_3(), G__setup_memfuncTTF(), GetTextAdvance(), and GetTextExtent().

void TTF::SetRotationMatrix ( Float_t  angle  )  [static]

Definition at line 286 of file TTF.cxx.

References cos(), TMath::Cos(), fgRotMatrix, TMath::Pi(), sin(), TMath::Sin(), FT_Matrix_::xx, FT_Matrix_::xy, FT_Matrix_::yx, and FT_Matrix_::yy.

Referenced by TGX11TTF::DrawText(), TASImage::DrawText(), TGWin32::DrawText(), TASImage::DrawTextTTF(), G__G__Graf_218_0_4(), G__setup_memfuncTTF(), GetTextAdvance(), and GetTextExtent().

void TTF::Init (  )  [static]

Definition at line 66 of file TTF.cxx.

References Error, fgInit, fgLibrary, FT_Init_FreeType(), kTRUE, and SetTextFont().

Referenced by ClassImp(), TGX11TTF::DrawText(), TASImage::DrawText(), TGWin32::DrawText(), TASImage::DrawTextTTF(), G__G__Graf_218_0_6(), G__setup_memfuncTTF(), GetTextAdvance(), GetTextExtent(), TGWin32::OpenDisplay(), SetTextFont(), and SetTextSize().

void TTF::Cleanup (  )  [static]

Definition at line 83 of file TTF.cxx.

References fgFace, fgFontCount, fgFontName, fgInit, fgLibrary, fgRotMatrix, FT_Done_Face(), FT_Done_FreeType(), i, and kFALSE.

Referenced by G__G__Graf_218_0_7(), and G__setup_memfuncTTF().

Int_t TTF::GetAscent (  )  [static]

Definition at line 556 of file TTF.cxx.

References fgAscent.

Referenced by TGWin32::Align(), TASImage::DrawText(), G__G__Graf_218_0_8(), and G__setup_memfuncTTF().

const FT_BBox & TTF::GetBox (  )  [static]

Definition at line 574 of file TTF.cxx.

References fgCBox.

Referenced by TASImage::DrawTextTTF(), G__G__Graf_218_0_9(), G__setup_memfuncTTF(), TText::GetTextAscentDescent(), TGWin32::RenderString(), and TGX11TTF::RenderString().

TTGlyph * TTF::GetGlyphs (  )  [static]

Definition at line 580 of file TTF.cxx.

References fgGlyphs.

Referenced by TASImage::DrawText(), TASImage::DrawTextTTF(), G__G__Graf_218_0_10(), G__setup_memfuncTTF(), and TGWin32::RenderString().

Bool_t TTF::GetHinting (  )  [static]

Definition at line 526 of file TTF.cxx.

References fgHinting.

Referenced by G__G__Graf_218_0_11(), and G__setup_memfuncTTF().

Bool_t TTF::GetKerning (  )  [static]

Definition at line 532 of file TTF.cxx.

References fgKerning.

Referenced by G__G__Graf_218_0_12(), G__setup_memfuncTTF(), and TText::GetTextAdvance().

Int_t TTF::GetNumGlyphs (  )  [static]

Definition at line 562 of file TTF.cxx.

References fgNumGlyphs.

Referenced by TASImage::DrawText(), TASImage::DrawTextTTF(), G__G__Graf_218_0_13(), G__setup_memfuncTTF(), and TGWin32::RenderString().

FT_Matrix * TTF::GetRotMatrix (  )  [static]

Definition at line 568 of file TTF.cxx.

References fgRotMatrix.

Referenced by TGWin32::Align(), TASImage::DrawText(), G__G__Graf_218_0_14(), and G__setup_memfuncTTF().

Bool_t TTF::GetSmoothing (  )  [static]

Definition at line 538 of file TTF.cxx.

References fgSmoothing.

Referenced by TGWin32::DrawImage(), G__G__Graf_218_0_15(), G__setup_memfuncTTF(), and TGWin32::RenderString().

Int_t TTF::GetWidth (  )  [static]

Definition at line 550 of file TTF.cxx.

References fgWidth.

Referenced by TGWin32::Align(), TASImage::DrawText(), G__G__Graf_218_0_16(), G__setup_memfuncTTF(), and GetTextAdvance().

void TTF::SetHinting ( Bool_t  state  )  [static]

Definition at line 270 of file TTF.cxx.

References fgHinting.

Referenced by G__G__Graf_218_0_17(), and G__setup_memfuncTTF().

void TTF::SetKerning ( Bool_t  state  )  [static]

Definition at line 278 of file TTF.cxx.

References fgKerning.

Referenced by G__G__Graf_218_0_18(), G__setup_memfuncTTF(), and TText::GetTextAdvance().

void TTF::SetSmoothing ( Bool_t  state  )  [static]

Definition at line 309 of file TTF.cxx.

References fgSmoothing.

Referenced by G__G__Graf_218_0_19(), G__setup_memfuncTTF(), TGX11TTF::Init(), and TGWin32::OpenDisplay().

void TTF::GetTextExtent ( UInt_t w,
UInt_t h,
char *  text 
) [static]

Definition at line 133 of file TTF.cxx.

References fgCBox, fgInit, fgTBlankW, Init(), LayoutGlyphs(), PrepareString(), SetRotationMatrix(), FT_BBox_::xMax, FT_BBox_::xMin, FT_BBox_::yMax, and FT_BBox_::yMin.

Referenced by G__G__Graf_218_0_20(), G__setup_memfuncTTF(), TText::GetBoundingBox(), TGWin32::GetTextExtent(), TText::GetTextExtent(), and TGWin32::RequestString().

void TTF::GetTextAdvance ( UInt_t a,
char *  text 
) [static]

Definition at line 149 of file TTF.cxx.

References fgInit, GetWidth(), Init(), LayoutGlyphs(), PrepareString(), and SetRotationMatrix().

Referenced by G__G__Graf_218_0_21(), G__setup_memfuncTTF(), and TText::GetTextAdvance().

void TTF::SetTextFont ( Font_t  fontnumber  )  [static]

Definition at line 422 of file TTF.cxx.

References gEnv, TEnv::GetValue(), gSystem, kReadPermission, and TSystem::Which().

Referenced by TASImage::DrawText(), TASImage::DrawTextTTF(), G__G__Graf_218_0_22(), G__G__Graf_218_0_23(), G__setup_memfuncTTF(), TText::GetTextAdvance(), TText::GetTextAscentDescent(), TGWin32::GetTextExtent(), TText::GetTextExtent(), Init(), TGWin32::RequestString(), TGWin32::SetTextFont(), and TGX11TTF::SetTextFont().

Int_t TTF::SetTextFont ( const char *  fontname,
Int_t  italic = 0 
) [static]

Definition at line 317 of file TTF.cxx.

References TSystem::BaseName(), Error, fgCharMap, fgCurFontIdx, fgFace, fgFontCount, fgFontName, fgInit, fgLibrary, fgSymbItaFontIdx, FT_Done_Face(), FT_New_Face(), FT_Set_Transform(), gEnv, TEnv::GetValue(), gSystem, i, Init(), kReadPermission, kTTMaxFonts, NULL, StrDup(), Warning(), TSystem::Which(), FT_Matrix_::xx, FT_Matrix_::xy, FT_Matrix_::yx, and FT_Matrix_::yy.

void TTF::SetTextSize ( Float_t  textsize  )  [static]

Definition at line 501 of file TTF.cxx.

References Error, fgCurFontIdx, fgFace, fgFontCount, fgInit, FT_Set_Char_Size(), Init(), and kScale.

Referenced by TASImage::DrawText(), TASImage::DrawTextTTF(), G__G__Graf_218_0_24(), G__setup_memfuncTTF(), TText::GetTextAdvance(), TText::GetTextAscentDescent(), TGWin32::GetTextExtent(), TText::GetTextExtent(), TGWin32::RequestString(), TGWin32::SetTextSize(), and TGX11TTF::SetTextSize().

Bool_t TTF::IsInitialized (  )  [static]

Definition at line 544 of file TTF.cxx.

References fgInit.

Referenced by TASImage::DrawText(), TGWin32::DrawText(), TASImage::DrawTextTTF(), G__G__Graf_218_0_25(), G__setup_memfuncTTF(), TText::GetBoundingBox(), and TGWin32::OpenDisplay().

void TTF::Version ( Int_t major,
Int_t minor,
Int_t patch 
) [static]

Definition at line 520 of file TTF.cxx.

References fgLibrary, and FT_Library_Version().

Referenced by G__G__Graf_218_0_26(), and G__setup_memfuncTTF().

static Short_t TTF::CharToUnicode ( UInt_t  code  )  [static]

static void TTF::LayoutGlyphs (  )  [static]

static void TTF::PrepareString ( const char *  string  )  [static]

static void TTF::SetRotationMatrix ( Float_t  angle  )  [static]

static void TTF::Init (  )  [static]

static void TTF::Cleanup (  )  [static]

static Int_t TTF::GetAscent (  )  [static]

static const FT_BBox& TTF::GetBox (  )  [static]

static TTGlyph* TTF::GetGlyphs (  )  [static]

static Bool_t TTF::GetHinting (  )  [static]

static Bool_t TTF::GetKerning (  )  [static]

static Int_t TTF::GetNumGlyphs (  )  [static]

static FT_Matrix* TTF::GetRotMatrix (  )  [static]

static Bool_t TTF::GetSmoothing (  )  [static]

static Int_t TTF::GetWidth (  )  [static]

static void TTF::SetHinting ( Bool_t  state  )  [static]

static void TTF::SetKerning ( Bool_t  state  )  [static]

static void TTF::SetSmoothing ( Bool_t  state  )  [static]

static void TTF::GetTextExtent ( UInt_t w,
UInt_t h,
char *  text 
) [static]

static void TTF::GetTextAdvance ( UInt_t a,
char *  text 
) [static]

static void TTF::SetTextFont ( Font_t  fontnumber  )  [static]

static Int_t TTF::SetTextFont ( const char *  fontname,
Int_t  italic = 0 
) [static]

static void TTF::SetTextSize ( Float_t  textsize  )  [static]

static Bool_t TTF::IsInitialized (  )  [static]

static void TTF::Version ( Int_t major,
Int_t minor,
Int_t patch 
) [static]


Friends And Related Function Documentation

TGX11TTF [friend]

Definition at line 61 of file TTF.h.

TGWin32 [friend]

Definition at line 62 of file TTF.h.


Member Data Documentation

static Int_t TTF::fgAscent [static, private]

Definition at line 67 of file TTF.h.

Referenced by TGX11TTF::Align(), GetAscent(), and LayoutGlyphs().

static FT_BBox TTF::fgCBox [static, private]

Definition at line 68 of file TTF.h.

Referenced by GetBox(), GetTextExtent(), and LayoutGlyphs().

static FT_CharMap TTF::fgCharMap [static, private]

Definition at line 69 of file TTF.h.

Referenced by CharToUnicode(), and SetTextFont().

static Int_t TTF::fgCurFontIdx [static, private]

Definition at line 70 of file TTF.h.

Referenced by CharToUnicode(), LayoutGlyphs(), PrepareString(), SetTextFont(), and SetTextSize().

static Int_t TTF::fgSymbItaFontIdx [static, private]

Definition at line 71 of file TTF.h.

Referenced by SetTextFont().

static Int_t TTF::fgFontCount [static, private]

Definition at line 72 of file TTF.h.

Referenced by Cleanup(), SetTextFont(), and SetTextSize().

char * TTF::fgFontName [static, private]

Definition at line 73 of file TTF.h.

Referenced by CharToUnicode(), Cleanup(), and SetTextFont().

static FT_Face TTF::fgFace [static, private]

Definition at line 74 of file TTF.h.

Referenced by CharToUnicode(), Cleanup(), LayoutGlyphs(), PrepareString(), SetTextFont(), and SetTextSize().

static TTGlyph TTF::fgGlyphs [static, private]

Definition at line 75 of file TTF.h.

Referenced by GetGlyphs(), LayoutGlyphs(), PrepareString(), and TGX11TTF::RenderString().

static Bool_t TTF::fgHinting [static, private]

Definition at line 76 of file TTF.h.

Referenced by GetHinting(), LayoutGlyphs(), PrepareString(), and SetHinting().

static Bool_t TTF::fgInit [static, private]

Definition at line 77 of file TTF.h.

Referenced by ClassImp(), Cleanup(), TGX11TTF::DrawText(), GetTextAdvance(), GetTextExtent(), Init(), IsInitialized(), SetTextFont(), and SetTextSize().

static Bool_t TTF::fgKerning [static, private]

Definition at line 78 of file TTF.h.

Referenced by GetKerning(), LayoutGlyphs(), and SetKerning().

static FT_Library TTF::fgLibrary [static, private]

Definition at line 79 of file TTF.h.

Referenced by Cleanup(), Init(), SetTextFont(), and Version().

static Int_t TTF::fgNumGlyphs [static, private]

Definition at line 80 of file TTF.h.

Referenced by GetNumGlyphs(), LayoutGlyphs(), PrepareString(), and TGX11TTF::RenderString().

FT_Matrix * TTF::fgRotMatrix [static, private]

Definition at line 81 of file TTF.h.

Referenced by TGX11TTF::Align(), Cleanup(), GetRotMatrix(), LayoutGlyphs(), and SetRotationMatrix().

static Bool_t TTF::fgSmoothing [static, private]

Definition at line 82 of file TTF.h.

Referenced by TGX11TTF::DrawImage(), GetSmoothing(), TGX11TTF::RenderString(), and SetSmoothing().

static Int_t TTF::fgTBlankW [static, private]

Definition at line 83 of file TTF.h.

Referenced by GetTextExtent(), and PrepareString().

static Int_t TTF::fgWidth [static, private]

Definition at line 84 of file TTF.h.

Referenced by TGX11TTF::Align(), GetWidth(), and LayoutGlyphs().

char* TTF::fgFontName[kTTMaxFonts] [static, private]

Definition at line 73 of file TTF.h.

FT_Matrix* TTF::fgRotMatrix [static, private]

Definition at line 81 of file TTF.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:47:57 2011 for ROOT_528-00b_version by  doxygen 1.5.1