Public Member Functions | |
| TTFhandle () | |
| virtual | ~TTFhandle () |
| void | CleanupGlyphs () |
| Remove temporary data created by LayoutGlyphs. | |
| Int_t | GetAscent () const |
| const FT_BBox & | GetBox () const |
| FT_Face | GetFontFace () const |
| Return current font index. | |
| FT_BitmapGlyph | GetGlyphBitmap (UInt_t n, Bool_t smooth=kFALSE) |
| Return bitmap for specified glyph. | |
| TTF::TTGlyph * | GetGlyphs () |
| Bool_t | GetKerning () const |
| UInt_t | GetNumGlyphs () const |
| FT_Matrix * | GetRotMatrix () const |
| void | GetTextAdvance (UInt_t &a, const char *text) |
| Get advance (a) when text is horizontal. | |
| void | GetTextExtent (UInt_t &w, UInt_t &h, const char *text) |
| Get width (w) and height (h) when text is horizontal. | |
| void | GetTextExtent (UInt_t &w, UInt_t &h, const wchar_t *text) |
| Get width (w) and height (h) when text is horizontal. | |
| Int_t | GetTrailingBlanksWidth () const |
| Int_t | GetWidth () const |
| virtual TClass * | IsA () const |
| void | LayoutGlyphs () |
| Compute the glyphs positions, fgAscent and fgWidth (needed for alignment). | |
| void | PrepareString (const char *string) |
| Put the characters in "string" in the "glyphs" array. | |
| void | PrepareString (const wchar_t *string) |
| Put the characters in "string" in the "glyphs" array. | |
| void | SetKerning (Bool_t state) |
| void | SetRotationMatrix (Float_t angle) |
| Set the rotation matrix used to rotate the font outlines. | |
| Int_t | SetTextFont (const char *fontname, Int_t italic=0) |
| Set text font to specified name. | |
| void | SetTextFont (Font_t fontnumber) |
| Set specified font. | |
| Bool_t | SetTextSize (Float_t textsize) |
| Set current text size. | |
| virtual void | Streamer (TBuffer &) |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
| void | Version (Int_t &major, Int_t &minor, Int_t &patch) |
Static Public Member Functions | |
| static TClass * | Class () |
| static const char * | Class_Name () |
| static constexpr Version_t | Class_Version () |
| static const char * | DeclFileName () |
| static Bool_t | GetHinting () |
| static Bool_t | GetSmoothing () |
| static Bool_t | Init () |
| static void | SetHinting (Bool_t state) |
| static void | SetSmoothing (Bool_t state) |
Private Member Functions | |
| UInt_t | CharToUnicode (UInt_t code) |
| Map char to unicode. Returns 0 in case no mapping exists. | |
| void | ComputeTrailingBlanksWidth (Int_t n) |
| Compute the trailing blanks width. | |
| Int_t | SelectFontHandle (Int_t arg, const char *name=nullptr) |
| Return thread_local instance of TTFontHandle for speified font. | |
Static Private Member Functions | |
| static FT_Library | InitClose (Int_t direction=0) |
| Initialize or close FreeType library If argument is 0 - just return current handle Library initialized per thread. | |
Private Attributes | |
| Int_t | fAscent = 0 |
| string ascent, used to compute Y alignment | |
| FT_BBox | fCBox |
| string control box | |
| TTFontHandle * | fFont = nullptr |
| selected font | |
| std::vector< TTF::TTGlyph > | fGlyphs |
| glyphs | |
| Bool_t | fKerning = kTRUE |
| use kerning (true by default) | |
| std::unique_ptr< FT_Matrix > | fRotMatrix |
| rotation matrix | |
| Int_t | fTBlankW = 0 |
| trailing blanks width | |
| Int_t | fWidth = 0 |
| string width, used to compute X alignment | |
Static Private Attributes | |
| static Bool_t | fgHinting = kFALSE |
| use hinting (false by default) | |
| static Bool_t | fgSmoothing = kTRUE |
| use anti-aliasing (true when >8 planes, false otherwise) | |
Friends | |
| class | TTF |
#include <TTF.h>
| void TTFhandle::CleanupGlyphs | ( | ) |
|
private |
| FT_Face TTFhandle::GetFontFace | ( | ) | const |
| FT_BitmapGlyph TTFhandle::GetGlyphBitmap | ( | UInt_t | n, |
| Bool_t | smooth = kFALSE ) |
|
inline |
|
staticprivate |
| void TTFhandle::LayoutGlyphs | ( | ) |
| void TTFhandle::PrepareString | ( | const char * | string | ) |
Return thread_local instance of TTFontHandle for speified font.
| void TTFhandle::SetRotationMatrix | ( | Float_t | angle | ) |
| void TTFhandle::SetTextFont | ( | Font_t | fontnumber | ) |
Set specified font.
List of the currently supported fonts (screen and PostScript)
| Font number | TTF Names | PostScript/PDF Names |
|---|---|---|
| 1 | Free Serif Italic | Times-Italic |
| 2 | Free Serif Bold | Times-Bold |
| 3 | Free Serif Bold Italic | Times-BoldItalic |
| 4 | Tex Gyre Regular | Helvetica |
| 5 | Tex Gyre Italic | Helvetica-Oblique |
| 6 | Tex Gyre Bold | Helvetica-Bold |
| 7 | Tex Gyre Bold Italic | Helvetica-BoldOblique |
| 8 | Free Mono | Courier |
| 9 | Free Mono Oblique | Courier-Oblique |
| 10 | Free Mono Bold | Courier-Bold |
| 11 | Free Mono Bold Oblique | Courier-BoldOblique |
| 12 | Symbol | Symbol |
| 13 | Free Serif | Times-Roman |
| 14 | Wingdings | ZapfDingbats |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |