ROOT 6.12/07 Reference Guide |
Classes | |
class | TTGlyph |
TTF helper class containing glyphs description. More... | |
Public Member Functions | |
TTF () | |
virtual | ~TTF () |
Cleanup TTF environment. More... | |
Static Public Member Functions | |
static Short_t | CharToUnicode (UInt_t code) |
Map char to unicode. Returns 0 in case no mapping exists. More... | |
static void | Cleanup () |
Cleanup. Is called by the gCleanupTTF destructor. More... | |
static Int_t | GetAscent () |
static const FT_BBox & | GetBox () |
static TTGlyph * | GetGlyphs () |
static Bool_t | GetHinting () |
static Bool_t | GetKerning () |
static Int_t | GetNumGlyphs () |
static FT_Matrix * | GetRotMatrix () |
static Bool_t | GetSmoothing () |
static void | GetTextAdvance (UInt_t &a, char *text) |
Get advance (a) when text is horizontal. More... | |
static void | GetTextExtent (UInt_t &w, UInt_t &h, char *text) |
Get width (w) and height (h) when text is horizontal. More... | |
static void | GetTextExtent (UInt_t &w, UInt_t &h, wchar_t *text) |
Get width (w) and height (h) when text is horizontal. More... | |
static Int_t | GetWidth () |
static void | Init () |
Initialise the TrueType fonts interface. More... | |
static Bool_t | IsInitialized () |
static void | LayoutGlyphs () |
Compute the glyphs positions, fgAscent and fgWidth (needed for alignment). More... | |
static void | PrepareString (const char *string) |
Put the characters in "string" in the "glyphs" array. More... | |
static void | PrepareString (const wchar_t *string) |
Put the characters in "string" in the "glyphs" array. More... | |
static void | SetHinting (Bool_t state) |
Set hinting flag. More... | |
static void | SetKerning (Bool_t state) |
Set kerning flag. More... | |
static void | SetRotationMatrix (Float_t angle) |
Set the rotation matrix used to rotate the font outlines. More... | |
static void | SetSmoothing (Bool_t state) |
Set smoothing (anti-aliasing) flag. More... | |
static void | SetTextFont (Font_t fontnumber) |
Set specified font. More... | |
static Int_t | SetTextFont (const char *fontname, Int_t italic=0) |
Set text font to specified name. More... | |
static void | SetTextSize (Float_t textsize) |
Set current text size. More... | |
static void | Version (Int_t &major, Int_t &minor, Int_t &patch) |
Protected Types | |
enum | { kTTMaxFonts = 32, kMaxGlyphs = 1024 } |
Static Protected Attributes | |
static Int_t | fgAscent = 0 |
string ascent, used to compute Y alignment More... | |
static FT_BBox | fgCBox |
string control box More... | |
static FT_CharMap | fgCharMap [kTTMaxFonts] |
font character map More... | |
static Int_t | fgCurFontIdx = -1 |
current font index More... | |
static FT_Face | fgFace [kTTMaxFonts] |
font face More... | |
static Int_t | fgFontCount = 0 |
number of fonts loaded More... | |
static char * | fgFontName [kTTMaxFonts] |
font name More... | |
static TTF::TTGlyph | fgGlyphs [kMaxGlyphs] |
glyphs More... | |
static Bool_t | fgHinting = kFALSE |
use hinting (true by default) More... | |
static Bool_t | fgInit = kFALSE |
true if the Init has been called More... | |
static Bool_t | fgKerning = kTRUE |
use kerning (true by default) More... | |
static FT_Library | fgLibrary |
FreeType font library. More... | |
static Int_t | fgNumGlyphs = 0 |
number of glyphs in the string More... | |
static FT_Matrix * | fgRotMatrix |
rotation matrix More... | |
static Bool_t | fgSmoothing = kTRUE |
use anti-aliasing (true when >8 planes, false otherwise) More... | |
static Int_t | fgSymbItaFontIdx = -1 |
Symbol italic font index. More... | |
static Int_t | fgTBlankW = 0 |
trailing blanks width More... | |
static Int_t | fgWidth = 0 |
string width, used to compute X alignment More... | |
Friends | |
class | TGWin32 |
class | TGX11TTF |
class | TMathTextRenderer |
#include <TTF.h>
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
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 | timesbi.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 | |
15 | symbol oblique is emulated from symbol.ttf |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |