Logo ROOT  
Reference Guide
TGFont.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 20/5/2003
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGFont
13 #define ROOT_TGFont
14 
15 
16 #include "TNamed.h"
17 #include "TGObject.h"
18 #include "TRefCnt.h"
19 
20 class THashTable;
21 class TObjString;
22 class TGFont;
23 
24 // Flags passed to TGFont::MeasureChars and TGFont::ComputeTextLayout
25 
32 };
33 
42 };
43 
44 enum EFontSlant {
49 };
50 
51 
52 struct FontMetrics_t {
53  Int_t fAscent; // from baseline to top of font
54  Int_t fDescent; // from baseline to bottom of font
55  Int_t fLinespace; // the sum of the ascent and descent
56  Int_t fMaxWidth; // width of widest character in font
57  Bool_t fFixed; // true if monospace, false otherwise
58 };
59 
60 
62 
63  const char *fFamily; // Font family. The most important field.
64  Int_t fPointsize; // Pointsize of font, 0 for default size, or negative number meaning pixel size.
65  Int_t fWeight; // Weight flag; see below for def'n.
66  Int_t fSlant; // Slant flag; see below for def'n.
67  Int_t fUnderline; // Non-zero for underline font.
68  Int_t fOverstrike; // Non-zero for overstrike font.
69 
70  FontAttributes_t(): // default constructor
71  fFamily (0),
72  fPointsize (0),
75  fUnderline (0),
76  fOverstrike(0) { }
77 
78  FontAttributes_t(const FontAttributes_t& f): // copy constructor
79  fFamily (f.fFamily),
81  fWeight (f.fWeight),
82  fSlant (f.fSlant),
85 
86  FontAttributes_t& operator=(const FontAttributes_t& f) // assignment operator
87  {
88  if (this != &f) {
89  fFamily = f.fFamily;
90  fPointsize = f.fPointsize;
91  fWeight = f.fWeight;
92  fSlant = f.fSlant;
93  fUnderline = f.fUnderline;
94  fOverstrike = f.fOverstrike;
95  }
96  return *this;
97  }
98 
99 };
100 
101 
102 
103 struct LayoutChunk_t;
104 
105 
106 class TGTextLayout : public TObject {
107 
108 friend class TGFont;
109 
110 protected:
111  const TGFont *fFont; ///< The font used when laying out the text.
112  const char *fString; ///< The string that was laid out.
113  Int_t fWidth; ///< The maximum width of all lines in the text layout.
114  Int_t fNumChunks; ///< Number of chunks actually used in following array.
115  LayoutChunk_t *fChunks; ///< Array of chunks. The actual size will be maxChunks.
116 
117  TGTextLayout(const TGTextLayout &tlayout) = delete;
118  void operator=(const TGTextLayout &tlayout) = delete;
119 
120 public:
121  TGTextLayout(): fFont(nullptr), fString(""), fWidth(0), fNumChunks(0), fChunks(NULL) {}
122  virtual ~TGTextLayout();
123 
124  void DrawText(Drawable_t dst, GContext_t gc, Int_t x, Int_t y,
125  Int_t firstChar, Int_t lastChar) const;
126  void UnderlineChar(Drawable_t dst, GContext_t gc,
127  Int_t x, Int_t y, Int_t underline) const;
128  Int_t PointToChar(Int_t x, Int_t y) const;
129  Int_t CharBbox(Int_t index, Int_t *x, Int_t *y, Int_t *w, Int_t *h) const;
130  Int_t DistanceToText(Int_t x, Int_t y) const;
131  Int_t IntersectText(Int_t x, Int_t y, Int_t w, Int_t h) const;
132  void ToPostscript(TString *dst) const;
133 
134  ClassDef(TGTextLayout,0) // Keep track of string measurement information.
135 };
136 
137 
138 // The following class is used to keep track of the generic information about a font.
139 
140 class TGFont : public TNamed, public TRefCnt {
141 
142 friend class TGFontPool;
143 friend class TGTextLayout;
144 
145 private:
146  FontStruct_t fFontStruct; ///< Low level graphics fontstruct
147  FontH_t fFontH; ///< Font handle (derived from fontstruct)
148  FontMetrics_t fFM; ///< Cached font metrics
149  FontAttributes_t fFA; ///< Actual font attributes obtained when the font was created
150  TObjString *fNamedHash; ///< Pointer to the named object TGFont was based on
151  Int_t fTabWidth; ///< Width of tabs in this font (pixels).
152  Int_t fUnderlinePos; ///< Offset from baseline to origin of underline bar
153  ///< (used for drawing underlines on a non-underlined font).
154  Int_t fUnderlineHeight; ///< Height of underline bar (used for drawing
155  ///< underlines on a non-underlined font).
156  char fTypes[256]; ///< Array giving types of all characters in
157  ///< the font, used when displaying control characters.
158  Int_t fWidths[256]; ///< Array giving widths of all possible characters in the font.
159  Int_t fBarHeight; ///< Height of underline or overstrike bar
160  ///< (used for simulating a native underlined or strikeout font).
161 
162 protected:
163  TGFont(const char *name)
164  : TNamed(name,""), TRefCnt(), fFontStruct(0), fFontH(0), fFM(),
166  {
167  SetRefCount(1);
168  for (Int_t i=0; i<256; i++) {
169  fWidths[i] = 0;
170  fTypes[i] = ' ';
171  }
172  }
173 
174  TGFont(const TGFont &) = delete;
175  void operator=(const TGFont &) = delete;
176 
177  LayoutChunk_t *NewChunk(TGTextLayout *layout, int *maxPtr,
178  const char *start, int numChars,
179  int curX, int newX, int y) const;
180 public:
181  virtual ~TGFont();
182 
183  FontH_t GetFontHandle() const { return fFontH; }
185  FontStruct_t operator()() const;
186  void GetFontMetrics(FontMetrics_t *m) const;
188 
189  Int_t PostscriptFontName(TString *dst) const;
190  Int_t TextWidth(const char *string, Int_t numChars = -1) const;
191  Int_t XTextWidth(const char *string, Int_t numChars = -1) const;
192  Int_t TextHeight() const { return fFM.fLinespace; }
193  void UnderlineChars(Drawable_t dst, GContext_t gc,
194  const char *string, Int_t x, Int_t y,
195  Int_t firstChar, Int_t lastChar) const;
196  TGTextLayout *ComputeTextLayout(const char *string, Int_t numChars,
197  Int_t wrapLength, Int_t justify, Int_t flags,
198  UInt_t *width, UInt_t *height) const;
199  Int_t MeasureChars(const char *source, Int_t numChars, Int_t maxLength,
200  Int_t flags, Int_t *length) const;
201  void DrawCharsExp(Drawable_t dst, GContext_t gc, const char *source,
202  Int_t numChars, Int_t x, Int_t y) const;
203  void DrawChars(Drawable_t dst, GContext_t gc, const char *source,
204  Int_t numChars, Int_t x, Int_t y) const;
205 
206  void Print(Option_t *option="") const;
207  virtual void SavePrimitive(std::ostream &out, Option_t * = "");
208 
209  ClassDef(TGFont,0) // GUI font description
210 };
211 
212 
213 struct FontStateMap_t;
214 struct XLFDAttributes_t;
215 
216 
217 class TGFontPool : public TGObject {
218 
219 private:
220  THashTable *fList; // TGFont objects pool
221  THashTable *fUidTable; // Hash table for some used string values like family names, etc.
222  THashTable *fNamedTable; // Map a name to a set of attributes for a font
223 
224  TGFontPool(const TGFontPool& fp) = delete;
225  TGFontPool& operator=(const TGFontPool& fp) = delete;
226 
227 protected:
228  const char *GetUid(const char *string);
229  Bool_t ParseXLFD(const char *string, XLFDAttributes_t *xa);
231  int FindStateNum(const FontStateMap_t *map, const char *strKey);
232  const char *FindStateString(const FontStateMap_t *map, int numKey);
233  Bool_t FieldSpecified(const char *field);
234  TGFont *GetNativeFont(const char *name, Bool_t fixedDefault = kTRUE);
235  TGFont *MakeFont(TGFont *font, FontStruct_t fontStruct, const char *fontName);
236 
237 public:
238  TGFontPool(TGClient *client);
239  virtual ~TGFontPool();
240 
241  TGFont *GetFont(const char *font, Bool_t fixedDefault = kTRUE);
242  TGFont *GetFont(const TGFont *font);
243  TGFont *GetFont(FontStruct_t font);
244  TGFont *GetFont(const char *family, Int_t ptsize, Int_t weight, Int_t slant);
245 
246  void FreeFont(const TGFont *font);
247 
248  TGFont *FindFont(FontStruct_t font) const;
249  TGFont *FindFontByHandle(FontH_t font) const;
250 
251  char **GetAttributeInfo(const FontAttributes_t *fa);
252  void FreeAttributeInfo(char **info);
253  char **GetFontFamilies();
254  void FreeFontFamilies(char **f);
255  Bool_t ParseFontName(const char *string, FontAttributes_t *fa);
256  const char *NameOfFont(TGFont *font);
257 
258  void Print(Option_t *option="") const;
259 
260  ClassDef(TGFontPool,0) // Font pool
261 };
262 
263 #endif
TGFont::operator=
void operator=(const TGFont &)=delete
TGTextLayout::fFont
const TGFont * fFont
The font used when laying out the text.
Definition: TGFont.h:111
TGFontPool::TGFontPool
TGFontPool(const TGFontPool &fp)=delete
TGObject
This class is the baseclass for all ROOT GUI widgets.
Definition: TGObject.h:22
m
auto * m
Definition: textangle.C:8
TGTextLayout::DrawText
void DrawText(Drawable_t dst, GContext_t gc, Int_t x, Int_t y, Int_t firstChar, Int_t lastChar) const
Use the information in the TGTextLayout object to display a multi-line, justified string of text.
Definition: TGFont.cxx:923
TGTextLayout::TGTextLayout
TGTextLayout()
Definition: TGFont.h:121
FontAttributes_t::fFamily
const char * fFamily
Definition: TGFont.h:63
FontAttributes_t::fWeight
Int_t fWeight
Definition: TGFont.h:65
FontMetrics_t
Definition: TGFont.h:52
TGFontPool::GetNativeFont
TGFont * GetNativeFont(const char *name, Bool_t fixedDefault=kTRUE)
The return value is a pointer to an TGFont object that represents the native font.
Definition: TGFont.cxx:2565
TGFontPool::GetFont
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get the specified font.
Definition: TGFont.cxx:1558
TGFont::NewChunk
LayoutChunk_t * NewChunk(TGTextLayout *layout, int *maxPtr, const char *start, int numChars, int curX, int newX, int y) const
Helper function for ComputeTextLayout().
Definition: TGFont.cxx:1410
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TGFont::fFM
FontMetrics_t fFM
Cached font metrics.
Definition: TGFont.h:148
TGTextLayout::fNumChunks
Int_t fNumChunks
Number of chunks actually used in following array.
Definition: TGFont.h:114
TGTextLayout::fWidth
Int_t fWidth
The maximum width of all lines in the text layout.
Definition: TGFont.h:113
f
#define f(i)
Definition: RSha256.hxx:104
TGFontPool::FieldSpecified
Bool_t FieldSpecified(const char *field)
Helper function for ParseXLFD().
Definition: TGFont.cxx:2247
TRefCnt::SetRefCount
void SetRefCount(UInt_t r)
Definition: TRefCnt.h:39
kFontWeightBold
@ kFontWeightBold
Definition: TGFont.h:37
Option_t
const char Option_t
Definition: RtypesCore.h:66
kTextPartialOK
@ kTextPartialOK
Definition: TGFont.h:29
kTextAtLeastOne
@ kTextAtLeastOne
Definition: TGFont.h:28
TGFont::fBarHeight
Int_t fBarHeight
Height of underline or overstrike bar (used for simulating a native underlined or strikeout font).
Definition: TGFont.h:159
FontH_t
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index)
Definition: GuiTypes.h:35
FontAttributes_t::fPointsize
Int_t fPointsize
Definition: TGFont.h:64
TGFont::Print
void Print(Option_t *option="") const
Print font info.
Definition: TGFont.cxx:308
TGFontPool::FindStateString
const char * FindStateString(const FontStateMap_t *map, int numKey)
Given a lookup table, map a number to a string in the table.
Definition: TGFont.cxx:2228
kTextIgnoreTabs
@ kTextIgnoreTabs
Definition: TGFont.h:30
kFontSlantRoman
@ kFontSlantRoman
Definition: TGFont.h:45
TGFontPool::FreeFont
void FreeFont(const TGFont *font)
Free font. If ref count is 0 delete font.
Definition: TGFont.cxx:1718
FontStruct_t
Handle_t FontStruct_t
Pointer to font structure.
Definition: GuiTypes.h:39
EFontWeight
EFontWeight
Definition: TGFont.h:34
kTextWholeWords
@ kTextWholeWords
Definition: TGFont.h:27
TGFont::TGFont
TGFont(const char *name)
Definition: TGFont.h:163
TNamed.h
TGTextLayout::operator=
void operator=(const TGTextLayout &tlayout)=delete
TGTextLayout::DistanceToText
Int_t DistanceToText(Int_t x, Int_t y) const
Computes the distance in pixels from the given point to the given text layout.
Definition: TGFont.cxx:1191
kFontWeightUnknown
@ kFontWeightUnknown
Definition: TGFont.h:41
TRefCnt.h
kFontSlantUnknown
@ kFontSlantUnknown
Definition: TGFont.h:48
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
Int_t
int Int_t
Definition: RtypesCore.h:45
TGFontPool::GetUid
const char * GetUid(const char *string)
Given a string, this procedure returns a unique identifier for the string.
Definition: TGFont.cxx:1785
TGFont::fTabWidth
Int_t fTabWidth
Width of tabs in this font (pixels).
Definition: TGFont.h:151
TGFont::TextWidth
Int_t TextWidth(const char *string, Int_t numChars=-1) const
A wrapper function for the more complicated interface of MeasureChars.
Definition: TGFont.cxx:575
x
Double_t x[n]
Definition: legend1.C:17
TGFont::fFontStruct
FontStruct_t fFontStruct
Low level graphics fontstruct.
Definition: TGFont.h:146
TGObject.h
TGFontPool::Print
void Print(Option_t *option="") const
List all fonts in the pool.
Definition: TGFont.cxx:1876
TGFontPool::ParseFontName
Bool_t ParseFontName(const char *string, FontAttributes_t *fa)
Converts a string into a set of font attributes that can be used to construct a font.
Definition: TGFont.cxx:1962
TGFont::ComputeTextLayout
TGTextLayout * ComputeTextLayout(const char *string, Int_t numChars, Int_t wrapLength, Int_t justify, Int_t flags, UInt_t *width, UInt_t *height) const
Computes the amount of screen space needed to display a multi-line, justified string of text.
Definition: TGFont.cxx:661
FontAttributes_t::fUnderline
Int_t fUnderline
Definition: TGFont.h:67
ETextLayoutFlags
ETextLayoutFlags
Definition: TGFont.h:26
TGTextLayout::UnderlineChar
void UnderlineChar(Drawable_t dst, GContext_t gc, Int_t x, Int_t y, Int_t underline) const
Use the information in the TGTextLayout object to display an underline below an individual character.
Definition: TGFont.cxx:970
TString
Basic string class.
Definition: TString.h:136
TGFontPool::~TGFontPool
virtual ~TGFontPool()
Cleanup font pool.
Definition: TGFont.cxx:1544
FontAttributes_t::FontAttributes_t
FontAttributes_t(const FontAttributes_t &f)
Definition: TGFont.h:78
FontAttributes_t::FontAttributes_t
FontAttributes_t()
Definition: TGFont.h:70
TGFont::fFontH
FontH_t fFontH
Font handle (derived from fontstruct)
Definition: TGFont.h:147
kFontWeightBlack
@ kFontWeightBlack
Definition: TGFont.h:40
bool
FontAttributes_t::operator=
FontAttributes_t & operator=(const FontAttributes_t &f)
Definition: TGFont.h:86
TGFontPool::fUidTable
THashTable * fUidTable
Definition: TGFont.h:221
FontAttributes_t
Definition: TGFont.h:61
TGFont::GetFontMetrics
void GetFontMetrics(FontMetrics_t *m) const
Get font metrics.
Definition: TGFont.cxx:286
TGFont::MeasureChars
Int_t MeasureChars(const char *source, Int_t numChars, Int_t maxLength, Int_t flags, Int_t *length) const
Determine the number of characters from the string that will fit in the given horizontal span.
Definition: TGFont.cxx:488
TGFontPool
provides a pool of fonts.
Definition: TGFont.h:217
TGFont::TGFont
TGFont(const TGFont &)=delete
TGFontPool::GetFontFamilies
char ** GetFontFamilies()
Return information about the font families that are available on the current display.
Definition: TGFont.cxx:2274
Drawable_t
Handle_t Drawable_t
Drawable handle.
Definition: GuiTypes.h:31
TGTextLayout::TGTextLayout
TGTextLayout(const TGTextLayout &tlayout)=delete
GContext_t
Handle_t GContext_t
Graphics context handle.
Definition: GuiTypes.h:38
TObjString
Collectable string class.
Definition: TObjString.h:28
TGFontPool::FindFont
TGFont * FindFont(FontStruct_t font) const
Find font based on its font struct. Returns 0 if font is not found.
Definition: TGFont.cxx:1744
kFontWeightNormal
@ kFontWeightNormal
Definition: TGFont.h:35
kFontWeightLight
@ kFontWeightLight
Definition: TGFont.h:38
TGFont::DrawChars
void DrawChars(Drawable_t dst, GContext_t gc, const char *source, Int_t numChars, Int_t x, Int_t y) const
Perform a quick sanity check to ensure we won't overflow the X coordinate space.
Definition: TGFont.cxx:1493
FontMetrics_t::fLinespace
Int_t fLinespace
Definition: TGFont.h:55
TGFont::UnderlineChars
void UnderlineChars(Drawable_t dst, GContext_t gc, const char *string, Int_t x, Int_t y, Int_t firstChar, Int_t lastChar) const
This procedure draws an underline for a given range of characters in a given string.
Definition: TGFont.cxx:617
TGFont::fWidths
Int_t fWidths[256]
Array giving widths of all possible characters in the font.
Definition: TGFont.h:158
TGFont::XTextWidth
Int_t XTextWidth(const char *string, Int_t numChars=-1) const
Return text width in pixels.
Definition: TGFont.cxx:590
TGFontPool::fNamedTable
THashTable * fNamedTable
Definition: TGFont.h:222
TGFontPool::NameOfFont
const char * NameOfFont(TGFont *font)
Given a font, return a textual string identifying it.
Definition: TGFont.cxx:2262
THashTable
THashTable implements a hash table to store TObject's.
Definition: THashTable.h:35
TGFont::TextHeight
Int_t TextHeight() const
Definition: TGFont.h:192
TGFont::~TGFont
virtual ~TGFont()
Delete font.
Definition: TGFont.cxx:276
h
#define h(i)
Definition: RSha256.hxx:106
TGFont::fUnderlineHeight
Int_t fUnderlineHeight
Height of underline bar (used for drawing underlines on a non-underlined font).
Definition: TGFont.h:154
FontAttributes_t::fSlant
Int_t fSlant
Definition: TGFont.h:66
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
TGFontPool::FindFontByHandle
TGFont * FindFontByHandle(FontH_t font) const
Find font based on its font handle. Returns 0 if font is not found.
Definition: TGFont.cxx:1761
TGFontPool::FindStateNum
int FindStateNum(const FontStateMap_t *map, const char *strKey)
Given a lookup table, map a string to a number in the table.
Definition: TGFont.cxx:2205
TGFont::GetFontHandle
FontH_t GetFontHandle() const
Definition: TGFont.h:183
TGFont::PostscriptFontName
Int_t PostscriptFontName(TString *dst) const
Return the name of the corresponding Postscript font for this TGFont.
Definition: TGFont.cxx:343
TGTextLayout
is used to keep track of string measurement information when using the text layout facilities.
Definition: TGFont.h:106
TGTextLayout::ToPostscript
void ToPostscript(TString *dst) const
Outputs the contents of a text layout in Postscript format.
Definition: TGFont.cxx:1334
TGTextLayout::CharBbox
Int_t CharBbox(Int_t index, Int_t *x, Int_t *y, Int_t *w, Int_t *h) const
Use the information in the TGTextLayout token to return the bounding box for the character specified ...
Definition: TGFont.cxx:1109
TGFont::DrawCharsExp
void DrawCharsExp(Drawable_t dst, GContext_t gc, const char *source, Int_t numChars, Int_t x, Int_t y) const
Draw a string of characters on the screen.
Definition: TGFont.cxx:1463
BIT
#define BIT(n)
Definition: Rtypes.h:85
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
y
Double_t y[n]
Definition: legend1.C:17
FontAttributes_t::fOverstrike
Int_t fOverstrike
Definition: TGFont.h:68
TGFontPool::FreeAttributeInfo
void FreeAttributeInfo(char **info)
Free attributes info.
Definition: TGFont.cxx:1859
kFontWeightDemibold
@ kFontWeightDemibold
Definition: TGFont.h:39
TGFontPool::operator=
TGFontPool & operator=(const TGFontPool &fp)=delete
TGFont::fUnderlinePos
Int_t fUnderlinePos
Offset from baseline to origin of underline bar (used for drawing underlines on a non-underlined font...
Definition: TGFont.h:152
kFontWeightMedium
@ kFontWeightMedium
Definition: TGFont.h:36
TGFontPool::fList
THashTable * fList
Definition: TGFont.h:220
kTextIgnoreNewlines
@ kTextIgnoreNewlines
Definition: TGFont.h:31
FontMetrics_t::fFixed
Bool_t fFixed
Definition: TGFont.h:57
TGTextLayout::fChunks
LayoutChunk_t * fChunks
Array of chunks. The actual size will be maxChunks.
Definition: TGFont.h:115
kFontSlantItalic
@ kFontSlantItalic
Definition: TGFont.h:46
FontMetrics_t::fMaxWidth
Int_t fMaxWidth
Definition: TGFont.h:56
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
TGFontPool::MakeFont
TGFont * MakeFont(TGFont *font, FontStruct_t fontStruct, const char *fontName)
Helper for GetNativeFont() and GetFontFromAttributes().
Definition: TGFont.cxx:2590
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
EFontSlant
EFontSlant
Definition: TGFont.h:44
TGFontPool::FreeFontFamilies
void FreeFontFamilies(char **f)
Delete an array of families allocated GetFontFamilies() method.
Definition: TGFont.cxx:2333
name
char name[80]
Definition: TGX11.cxx:110
TGTextLayout::PointToChar
Int_t PointToChar(Int_t x, Int_t y) const
Use the information in the TGTextLayout token to determine the character closest to the given point.
Definition: TGFont.cxx:1003
TGFont::fNamedHash
TObjString * fNamedHash
Pointer to the named object TGFont was based on.
Definition: TGFont.h:150
TGTextLayout::fString
const char * fString
The string that was laid out.
Definition: TGFont.h:112
TGFont::fTypes
char fTypes[256]
Array giving types of all characters in the font, used when displaying control characters.
Definition: TGFont.h:156
TRefCnt
Definitions for TRefCnt, base class for reference counted objects.
Definition: TRefCnt.h:27
TGFont::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the used font as a C++ statement(s) on output stream out.
Definition: TGFont.cxx:1884
TGTextLayout::~TGTextLayout
virtual ~TGTextLayout()
destructor
Definition: TGFont.cxx:900
TGFont::GetFontAttributes
FontAttributes_t GetFontAttributes() const
Definition: TGFont.h:187
TGFont::GetFontStruct
FontStruct_t GetFontStruct() const
Definition: TGFont.h:184
FontMetrics_t::fAscent
Int_t fAscent
Definition: TGFont.h:53
TGTextLayout::IntersectText
Int_t IntersectText(Int_t x, Int_t y, Int_t w, Int_t h) const
Determines whether a text layout lies entirely inside, entirely outside, or overlaps a given rectangl...
Definition: TGFont.cxx:1257
FontMetrics_t::fDescent
Int_t fDescent
Definition: TGFont.h:54
TGFont
Encapsulate fonts used in the GUI system.
Definition: TGFont.h:140
TGFontPool::GetAttributeInfo
char ** GetAttributeInfo(const FontAttributes_t *fa)
Return information about the font attributes as an array of strings.
Definition: TGFont.cxx:1805
kFontSlantOblique
@ kFontSlantOblique
Definition: TGFont.h:47
TGFontPool::ParseXLFD
Bool_t ParseXLFD(const char *string, XLFDAttributes_t *xa)
Break up a fully specified XLFD into a set of font attributes.
Definition: TGFont.cxx:2054
TGClient
Window client.
Definition: TGClient.h:37
TGFontPool::GetFontFromAttributes
TGFont * GetFontFromAttributes(FontAttributes_t *fa, TGFont *fontPtr)
Given a desired set of attributes for a font, find a font with the closest matching attributes and cr...
Definition: TGFont.cxx:2356
TGFont::fFA
FontAttributes_t fFA
Actual font attributes obtained when the font was created.
Definition: TGFont.h:149
int
TGFont::operator()
FontStruct_t operator()() const
Not inline due to a bug in g++ 2.96 20000731 (Red Hat Linux 7.0)
Definition: TGFont.cxx:300