library: libGraf
#include "TTF.h"


class description - header file - source file
viewCVS header - viewCVS source

class TTF

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
TTF(const TTF&)
static Short_tCharToUnicode(UInt_t code)
static TClass*Class()
static voidCleanup()
static Int_tGetAscent()
static const FT_BBox&GetBox()
static TTGlyph*GetGlyphs()
static Bool_tGetHinting()
static Bool_tGetKerning()
static Int_tGetNumGlyphs()
static FT_Matrix*GetRotMatrix()
static Bool_tGetSmoothing()
static voidGetTextExtent(UInt_t& w, UInt_t& h, char* text)
static Int_tGetWidth()
static voidInit()
virtual TClass*IsA() const
static Bool_tIsInitialized()
static voidLayoutGlyphs()
TTF&operator=(const TTF&)
static voidPrepareString(const char* string)
static voidSetHinting(Bool_t state)
static voidSetKerning(Bool_t state)
static voidSetRotationMatrix(Float_t angle)
static voidSetSmoothing(Bool_t state)
static voidSetTextFont(Font_t fontnumber)
static Int_tSetTextFont(const char* fontname)
static voidSetTextSize(Float_t textsize)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
static voidVersion(Int_t& major, Int_t& minor, Int_t& patch)

Data Members

enum { kTTMaxFonts
static Int_tfgAscentstring ascent, used to compute Y alignment
static FT_BBoxfgCBoxstring control box
static void*fgCharMap[32]font character map
static Int_tfgCurFontIdxcurrent font index
static Int_tfgFontCountnumber of fonts loaded
static char*fgFontName[32]font name
static void*fgFace[32]font face
static TTGlyphfgGlyphs[1024]glyphs
static Bool_tfgHintinguse hinting (true by default)
static Bool_tfgInittrue if the Init has been called
static Bool_tfgKerninguse kerning (true by default)
static void*fgLibraryFreeType font library
static Int_tfgNumGlyphsnumber of glyphs in the string
static FT_Matrix*fgRotMatrixrotation matrix
static Bool_tfgSmoothinguse anti-aliasing (true when >8 planes, false otherwise)
static Int_tfgTBlankWtrailing blanks width
static Int_tfgWidthstring width, used to compute X alignment

Class Description

 Interface to the freetype 2 library.                                 

 Cleanup TTF environment.
void Init()
 Initialise the TrueType fonts interface.
void Cleanup()
 Cleanup. Is called by the gCleanupTTF destructor.
Short_t CharToUnicode(UInt_t code)
 Map char to unicode. Returns 0 in case no mapping exists.
void GetTextExtent(UInt_t &w, UInt_t &h, char *text)
 Get width (w) and height (h) when text is horizontal.
void LayoutGlyphs()
 Compute the glyps positions, fgAscent and fgWidth (needed for alignment).
 Perform the Glyphs transformation.
 Compute the string control box.
 If required take the "kerning" into account.
 SetRotation and PrepareString should have been called before.
void PrepareString(const char *string)
 Put the characters in "string" in the "glyphs" array.
void SetHinting(Bool_t state)
 Set hinting flag.
void SetKerning(Bool_t state)
 Set kerning flag.
void SetRotationMatrix(Float_t angle)
 Set the rotation matrix used to rotate the font outlines.
void SetSmoothing(Bool_t state)
 Set smoothing (anti-aliasing) flag.
Int_t SetTextFont(const char *fontname)
 Set text font to specified name.
 font       : font name

 Set text font to specified name. This function returns 0 if
 the specified font is found, 1 if not.
void SetTextFont(Font_t fontnumber)
 Set specified font.
 List of the currently supported fonts (screen and PostScript)
   Font ID       X11                        TTF
        1 : times-medium-i-normal       timesi.ttf
        2 : times-bold-r-normal         timesbd.ttf
        3 : times-bold-i-normal         timesi.ttf
        4 : helvetica-medium-r-normal   arial.ttf
        5 : helvetica-medium-o-normal   ariali.ttf
        6 : helvetica-bold-r-normal     arialbd.ttf
        7 : helvetica-bold-o-normal     arialbi.ttf
        8 : courier-medium-r-normal     cour.ttf
        9 : courier-medium-o-normal     couri.ttf
       10 : courier-bold-r-normal       courbd.ttf
       11 : courier-bold-o-normal       courbi.ttf
       12 : symbol-medium-r-normal      symbol.ttf
       13 : times-medium-r-normal       times.ttf
       14 :                             wingding.ttf
void SetTextSize(Float_t textsize)
 Set current text size.
void Version(Int_t &major, Int_t &minor, Int_t &patch)
Bool_t GetHinting()
Bool_t GetKerning()
Bool_t GetSmoothing()
Bool_t IsInitialized()
Int_t GetWidth()
Int_t GetAscent()
Int_t GetNumGlyphs()
FT_Matrix * GetRotMatrix()
const FT_BBox & GetBox()
TTGlyph * GetGlyphs()
{ }

Author: Olivier Couet 01/10/02
Last update: root/graf:$Name: $:$Id: TTF.cxx,v 1.15 2006/11/16 17:17:37 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.