Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TTF Class Reference

Interface to the freetype 2 library.

Implements old static API. Unitl ROOT7 just redirects to static TTFhandle instance, then TTFhandle will be renamed into TTF class

Definition at line 55 of file TTF.h.

Classes

class  TTGlyph
 TTF helper class containing glyphs description. More...
 

Public Member Functions

 TTF ()
 
virtual ~TTF ()
 Cleanup TTF environment.
 
virtual TClassIsA () const
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static Short_t CharToUnicode (UInt_t code)
 Map char to unicode. Returns 0 in case no mapping exists.
 
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static void Cleanup ()
 
static void CleanupGlyphs ()
 Remove temporary data created by LayoutGlyphs.
 
static void ComputeTrailingBlanksWidth (Int_t n)
 Compute the trailing blanks width.
 
static const char * DeclFileName ()
 
static Int_t GetAscent ()
 
static const FT_BBox & GetBox ()
 
static TTGlyphGetGlyphs ()
 
static Bool_t GetHinting ()
 
static Bool_t GetKerning ()
 
static Int_t GetNumGlyphs ()
 
static FT_MatrixGetRotMatrix ()
 
static Bool_t GetSmoothing ()
 
static void GetTextAdvance (UInt_t &a, const char *text)
 Get advance (a) when text is horizontal.
 
static void GetTextExtent (UInt_t &w, UInt_t &h, const char *text)
 Get width (w) and height (h) when text is horizontal.
 
static void GetTextExtent (UInt_t &w, UInt_t &h, const wchar_t *text)
 Get width (w) and height (h) when text is horizontal.
 
static Int_t GetTrailingBlanksWidth ()
 
static Int_t GetWidth ()
 
static void Init ()
 Init TTF environment.
 
static Bool_t IsInitialized ()
 
static void LayoutGlyphs ()
 Compute the glyphs positions, fgAscent and fgWidth (needed for alignment).
 
static void PrepareString (const char *string)
 Put the characters in "string" in the "glyphs" array.
 
static void PrepareString (const wchar_t *string)
 Put the characters in "string" in the "glyphs" array.
 
static void SetHinting (Bool_t state)
 Set hinting flag.
 
static void SetKerning (Bool_t state)
 Set kerning flag.
 
static void SetRotationMatrix (Float_t angle)
 Set the rotation matrix used to rotate the font outlines.
 
static void SetSmoothing (Bool_t state)
 Set smoothing (anti-aliasing) flag.
 
static Int_t SetTextFont (const char *fontname, Int_t italic=0)
 Set text font to specified name.
 
static void SetTextFont (Font_t fontnumber)
 Set specified font.
 
static void SetTextSize (Float_t textsize)
 
static void Version (Int_t &major, Int_t &minor, Int_t &patch)
 

Friends

class TTFhandle
 

#include <TTF.h>

Constructor & Destructor Documentation

◆ TTF()

TTF::TTF ( )
inline

Definition at line 73 of file TTF.h.

◆ ~TTF()

TTF::~TTF ( )
virtual

Cleanup TTF environment.

Definition at line 637 of file TTF.cxx.

Member Function Documentation

◆ CharToUnicode()

Short_t TTF::CharToUnicode ( UInt_t code)
static

Map char to unicode. Returns 0 in case no mapping exists.

Definition at line 734 of file TTF.cxx.

◆ Class()

static TClass * TTF::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TTF::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TTF::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 116 of file TTF.h.

◆ Cleanup()

static void TTF::Cleanup ( )
static

◆ CleanupGlyphs()

void TTF::CleanupGlyphs ( )
static

Remove temporary data created by LayoutGlyphs.

Definition at line 842 of file TTF.cxx.

◆ ComputeTrailingBlanksWidth()

void TTF::ComputeTrailingBlanksWidth ( Int_t n)
static

Compute the trailing blanks width.

It is use to compute the text width in GetTextExtent n is the number of trailing blanks in a string.

Definition at line 833 of file TTF.cxx.

◆ DeclFileName()

static const char * TTF::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 116 of file TTF.h.

◆ GetAscent()

Int_t TTF::GetAscent ( )
static

Definition at line 690 of file TTF.cxx.

◆ GetBox()

const FT_BBox & TTF::GetBox ( )
static

Definition at line 718 of file TTF.cxx.

◆ GetGlyphs()

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

Definition at line 726 of file TTF.cxx.

◆ GetHinting()

Bool_t TTF::GetHinting ( )
static

Definition at line 655 of file TTF.cxx.

◆ GetKerning()

Bool_t TTF::GetKerning ( )
static

Definition at line 662 of file TTF.cxx.

◆ GetNumGlyphs()

Int_t TTF::GetNumGlyphs ( )
static

Definition at line 697 of file TTF.cxx.

◆ GetRotMatrix()

FT_Matrix * TTF::GetRotMatrix ( )
static

Definition at line 704 of file TTF.cxx.

◆ GetSmoothing()

Bool_t TTF::GetSmoothing ( )
static

Definition at line 669 of file TTF.cxx.

◆ GetTextAdvance()

void TTF::GetTextAdvance ( UInt_t & a,
const char * text )
static

Get advance (a) when text is horizontal.

Definition at line 860 of file TTF.cxx.

◆ GetTextExtent() [1/2]

void TTF::GetTextExtent ( UInt_t & w,
UInt_t & h,
const char * text )
static

Get width (w) and height (h) when text is horizontal.

Definition at line 851 of file TTF.cxx.

◆ GetTextExtent() [2/2]

void TTF::GetTextExtent ( UInt_t & w,
UInt_t & h,
const wchar_t * text )
static

Get width (w) and height (h) when text is horizontal.

Definition at line 869 of file TTF.cxx.

◆ GetTrailingBlanksWidth()

Int_t TTF::GetTrailingBlanksWidth ( )
static

Definition at line 711 of file TTF.cxx.

◆ GetWidth()

Int_t TTF::GetWidth ( )
static

Definition at line 683 of file TTF.cxx.

◆ Init()

void TTF::Init ( )
static

Init TTF environment.

Definition at line 645 of file TTF.cxx.

◆ IsA()

virtual TClass * TTF::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Definition at line 116 of file TTF.h.

◆ IsInitialized()

Bool_t TTF::IsInitialized ( )
static

Definition at line 676 of file TTF.cxx.

◆ LayoutGlyphs()

void TTF::LayoutGlyphs ( )
static

Compute the glyphs positions, fgAscent and fgWidth (needed for alignment).

Definition at line 823 of file TTF.cxx.

◆ PrepareString() [1/2]

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

Put the characters in "string" in the "glyphs" array.

Definition at line 805 of file TTF.cxx.

◆ PrepareString() [2/2]

void TTF::PrepareString ( const wchar_t * string)
static

Put the characters in "string" in the "glyphs" array.

Definition at line 814 of file TTF.cxx.

◆ SetHinting()

void TTF::SetHinting ( Bool_t state)
static

Set hinting flag.

Definition at line 752 of file TTF.cxx.

◆ SetKerning()

void TTF::SetKerning ( Bool_t state)
static

Set kerning flag.

Definition at line 760 of file TTF.cxx.

◆ SetRotationMatrix()

void TTF::SetRotationMatrix ( Float_t angle)
static

Set the rotation matrix used to rotate the font outlines.

Definition at line 743 of file TTF.cxx.

◆ SetSmoothing()

void TTF::SetSmoothing ( Bool_t state)
static

Set smoothing (anti-aliasing) flag.

Definition at line 769 of file TTF.cxx.

◆ SetTextFont() [1/2]

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

Set text font to specified name.

  • font : font name
  • italic : the fonts should be slanted. Used for symbol font.

Definition at line 779 of file TTF.cxx.

◆ SetTextFont() [2/2]

void TTF::SetTextFont ( Font_t fontnumber)
static

Set specified font.

Definition at line 788 of file TTF.cxx.

◆ SetTextSize()

void TTF::SetTextSize ( Float_t textsize)
static

Definition at line 796 of file TTF.cxx.

◆ Streamer()

virtual void TTF::Streamer ( TBuffer & )
virtual

◆ StreamerNVirtual()

void TTF::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 116 of file TTF.h.

◆ Version()

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

Definition at line 877 of file TTF.cxx.

Friends And Related Symbol Documentation

◆ TTFhandle

friend class TTFhandle
friend

Definition at line 57 of file TTF.h.


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