ROOT
6.06/09
Reference Guide
|
Classes | |
class | TTGlyph |
TTF helper class containing glyphs description. More... | |
Public Member Functions | |
TTF () | |
virtual | ~TTF () |
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 | 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 | SetRotationMatrix (Float_t angle) |
Set the rotation matrix used to rotate the font outlines. More... | |
static void | Init () |
Initialise the TrueType fonts interface. 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 Int_t | GetWidth () |
static void | SetHinting (Bool_t state) |
Set hinting flag. More... | |
static void | SetKerning (Bool_t state) |
Set kerning flag. More... | |
static void | SetSmoothing (Bool_t state) |
Set smoothing (anti-aliasing) flag. 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 void | GetTextAdvance (UInt_t &a, char *text) |
Get advance (a) when text is horizontal. 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 Bool_t | IsInitialized () |
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 |
static FT_BBox | fgCBox |
static FT_CharMap | fgCharMap [kTTMaxFonts] |
static Int_t | fgCurFontIdx = -1 |
static Int_t | fgSymbItaFontIdx = -1 |
static Int_t | fgFontCount = 0 |
static char * | fgFontName [kTTMaxFonts] |
static FT_Face | fgFace [kTTMaxFonts] |
static TTF::TTGlyph | fgGlyphs [kMaxGlyphs] |
static Bool_t | fgHinting = kFALSE |
static Bool_t | fgInit = kFALSE |
static Bool_t | fgKerning = kTRUE |
static FT_Library | fgLibrary |
static Int_t | fgNumGlyphs = 0 |
static FT_Matrix * | fgRotMatrix |
static Bool_t | fgSmoothing = kTRUE |
static Int_t | fgTBlankW = 0 |
static Int_t | fgWidth = 0 |
Friends | |
class | TGX11TTF |
class | TGWin32 |
class | TMathTextRenderer |
#include <TTF.h>
|
virtual |
Map char to unicode. Returns 0 in case no mapping exists.
Definition at line 101 of file TTF.cxx.
Referenced by PrepareString().
|
static |
|
static |
Definition at line 632 of file TTF.cxx.
Referenced by TGWin32::Align(), TGQuartz::AlignTTFString(), and TASImage::DrawText().
|
static |
Definition at line 653 of file TTF.cxx.
Referenced by TASImage::DrawTextTTF(), TText::GetTextAscentDescent(), TGX11TTF::RenderString(), TGWin32::RenderString(), and TGQuartz::RenderTTFString().
|
static |
Definition at line 660 of file TTF.cxx.
Referenced by TASImage::DrawText(), TASImage::DrawTextTTF(), TGWin32::RenderString(), and TGQuartz::RenderTTFString().
|
static |
Definition at line 604 of file TTF.cxx.
Referenced by TText::GetTextAdvance().
|
static |
Definition at line 639 of file TTF.cxx.
Referenced by TASImage::DrawText(), TASImage::DrawTextTTF(), TGWin32::RenderString(), and TGQuartz::RenderTTFString().
|
static |
Definition at line 646 of file TTF.cxx.
Referenced by TGWin32::Align(), TGQuartz::AlignTTFString(), and TASImage::DrawText().
|
static |
Definition at line 611 of file TTF.cxx.
Referenced by TGQuartz::DrawFTGlyphIntoPixmap(), TGWin32::DrawImage(), TGWin32::RenderString(), and TGQuartz::RenderTTFString().
Get advance (a) when text is horizontal.
Definition at line 150 of file TTF.cxx.
Referenced by TText::GetTextAdvance().
Get width (w) and height (h) when text is horizontal.
Definition at line 134 of file TTF.cxx.
Referenced by TText::GetBoundingBox(), TText::GetTextExtent(), TGWin32::GetTextExtent(), and TGWin32::RequestString().
|
static |
Definition at line 625 of file TTF.cxx.
Referenced by TGWin32::Align(), TGQuartz::AlignTTFString(), TASImage::DrawText(), and GetTextAdvance().
|
static |
Initialise the TrueType fonts interface.
Definition at line 67 of file TTF.cxx.
Referenced by ClassImp(), TGX11TTF::DrawText(), TASImage::DrawText(), TGWin32::DrawText(), TASImage::DrawTextTTF(), GetTextAdvance(), GetTextExtent(), TGWin32::OpenDisplay(), SetTextFont(), SetTextSize(), and TGQuartz::TGQuartz().
|
static |
Definition at line 618 of file TTF.cxx.
Referenced by TGQuartz::DrawText(), TASImage::DrawText(), TGWin32::DrawText(), TASImage::DrawTextTTF(), TText::GetBoundingBox(), TGWin32::OpenDisplay(), TGQuartz::SetTextFont(), TGQuartz::SetTextSize(), and TGQuartz::TGQuartz().
|
static |
Compute the glyphs 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.
Definition at line 183 of file TTF.cxx.
Referenced by TGQuartz::DrawText(), TGX11TTF::DrawText(), TASImage::DrawText(), TGWin32::DrawText(), TASImage::DrawTextTTF(), GetTextAdvance(), and GetTextExtent().
|
static |
Put the characters in "string" in the "glyphs" array.
Definition at line 249 of file TTF.cxx.
Referenced by TGQuartz::DrawText(), TGX11TTF::DrawText(), TASImage::DrawText(), TGWin32::DrawText(), TASImage::DrawTextTTF(), GetTextAdvance(), and GetTextExtent().
|
static |
Set the rotation matrix used to rotate the font outlines.
Definition at line 341 of file TTF.cxx.
Referenced by TGQuartz::DrawText(), TGX11TTF::DrawText(), TASImage::DrawText(), TGWin32::DrawText(), TASImage::DrawTextTTF(), GetTextAdvance(), and GetTextExtent().
Set smoothing (anti-aliasing) flag.
Definition at line 364 of file TTF.cxx.
Referenced by TGQuartz::DrawText(), TGX11TTF::Init(), and TGWin32::OpenDisplay().
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 | |
15 | symbol oblique is emulated from symbol.ttf |
Definition at line 496 of file TTF.cxx.
Referenced by TASImage::DrawText(), TASImage::DrawTextTTF(), TText::GetTextAdvance(), TText::GetTextAscentDescent(), TText::GetTextExtent(), TGWin32::GetTextExtent(), Init(), TGWin32::RequestString(), TGX11TTF::SetTextFont(), TGQuartz::SetTextFont(), and TGWin32::SetTextFont().
Set current text size.
Definition at line 572 of file TTF.cxx.
Referenced by TASImage::DrawText(), TASImage::DrawTextTTF(), TText::GetTextAdvance(), TText::GetTextAscentDescent(), TText::GetTextExtent(), TGWin32::GetTextExtent(), TGWin32::RequestString(), TGX11TTF::SetTextSize(), TGQuartz::SetTextSize(), and TGWin32::SetTextSize().
|
staticprotected |
Definition at line 85 of file TTF.h.
Referenced by TGX11TTF::Align(), GetAscent(), and LayoutGlyphs().
|
staticprotected |
Definition at line 86 of file TTF.h.
Referenced by GetBox(), GetTextExtent(), and LayoutGlyphs().
|
staticprotected |
Definition at line 87 of file TTF.h.
Referenced by CharToUnicode(), and SetTextFont().
|
staticprotected |
Definition at line 88 of file TTF.h.
Referenced by CharToUnicode(), LayoutGlyphs(), PrepareString(), SetTextFont(), and SetTextSize().
|
staticprotected |
Definition at line 92 of file TTF.h.
Referenced by CharToUnicode(), Cleanup(), LayoutGlyphs(), PrepareString(), SetTextFont(), and SetTextSize().
|
staticprotected |
Definition at line 90 of file TTF.h.
Referenced by Cleanup(), SetTextFont(), and SetTextSize().
|
staticprotected |
Definition at line 91 of file TTF.h.
Referenced by CharToUnicode(), Cleanup(), and SetTextFont().
|
staticprotected |
Definition at line 93 of file TTF.h.
Referenced by GetGlyphs(), LayoutGlyphs(), PrepareString(), and TGX11TTF::RenderString().
Definition at line 94 of file TTF.h.
Referenced by GetHinting(), LayoutGlyphs(), PrepareString(), and SetHinting().
Definition at line 95 of file TTF.h.
Referenced by ClassImp(), Cleanup(), TGX11TTF::DrawText(), GetTextAdvance(), GetTextExtent(), Init(), IsInitialized(), SetTextFont(), and SetTextSize().
Definition at line 96 of file TTF.h.
Referenced by GetKerning(), LayoutGlyphs(), and SetKerning().
|
staticprotected |
|
staticprotected |
Definition at line 98 of file TTF.h.
Referenced by GetNumGlyphs(), LayoutGlyphs(), PrepareString(), and TGX11TTF::RenderString().
|
staticprotected |
Definition at line 99 of file TTF.h.
Referenced by TGX11TTF::Align(), Cleanup(), GetRotMatrix(), LayoutGlyphs(), and SetRotationMatrix().
Definition at line 100 of file TTF.h.
Referenced by TGX11TTF::DrawImage(), GetSmoothing(), TGX11TTF::RenderString(), and SetSmoothing().
|
staticprotected |
Definition at line 89 of file TTF.h.
Referenced by SetTextFont().
|
staticprotected |
Definition at line 101 of file TTF.h.
Referenced by GetTextExtent(), and PrepareString().
|
staticprotected |
Definition at line 102 of file TTF.h.
Referenced by TGX11TTF::Align(), GetWidth(), and LayoutGlyphs().