Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::MacOSX::Details::FontCache Class Reference

Definition at line 39 of file FontCache.h.

Classes

struct  FontList
 

Public Types

enum  Details { nPadFonts = 15 }
 

Public Member Functions

 FontCache ()
 
void FreeFontNames (char **fontList)
 
double GetAscent () const
 
double GetAscent (const char *text) const
 
double GetAscent (const std::vector< UniChar > &unichars) const
 
double GetDescent () const
 
double GetDescent (const char *text) const
 
double GetDescent (const std::vector< UniChar > &unichars) const
 
void GetFontProperties (FontStruct_t font, int &maxAscent, int &maxDescent)
 
double GetLeading () const
 
void GetTextBounds (UInt_t &w, UInt_t &h, const char *text) const
 
void GetTextBounds (UInt_t &w, UInt_t &h, const std::vector< UniChar > &unichars) const
 
unsigned GetTextWidth (FontStruct_t font, const char *text, int nChars)
 
char ** ListFonts (const X11::XLFDName &xlfd, int maxNames, int &count)
 
FontStruct_t LoadFont (const X11::XLFDName &xlfd)
 
CTFontRef SelectFont (Font_t fontIndex, Float_t fontSize)
 
void UnloadFont (FontStruct_t font)
 

Private Types

typedef std::map< CTFontRef, CTFontGuard_t >::const_iterator const_font_iterator
 
typedef FontMap_t::const_iterator const_font_map_iterator
 
typedef Util::CFStrongReference< CTFontRef > CTFontGuard_t
 
typedef std::map< CTFontRef, CTFontGuard_t >::iterator font_iterator
 
typedef FontMap_t::iterator font_map_iterator
 
typedef std::map< UInt_t, CTFontGuard_tFontMap_t
 
typedef std::map< std::string, std::string > PSNameMap_t
 

Private Member Functions

 FontCache (const FontCache &rhs)
 
FontCacheoperator= (const FontCache &rhs)
 
CTFontRef SelectSymbolFont (Float_t fontSize, unsigned fontIndex)
 

Private Attributes

FontList fDummyList
 
std::list< FontListfFontLists
 
FontMap_t fFonts [nPadFonts]
 
std::map< CTFontRef, CTFontGuard_tfLoadedFonts
 
CTFontRef fSelectedFont
 
bool fSymbolFontRegistered
 
PSNameMap_t fXLFDtoPostscriptNames
 

#include <FontCache.h>

Member Typedef Documentation

◆ const_font_iterator

typedef std::map<CTFontRef,CTFontGuard_t>::const_iterator ROOT::MacOSX::Details::FontCache::const_font_iterator
private

Definition at line 83 of file FontCache.h.

◆ const_font_map_iterator

typedef FontMap_t::const_iterator ROOT::MacOSX::Details::FontCache::const_font_map_iterator
private

Definition at line 88 of file FontCache.h.

◆ CTFontGuard_t

Definition at line 78 of file FontCache.h.

◆ font_iterator

typedef std::map<CTFontRef,CTFontGuard_t>::iterator ROOT::MacOSX::Details::FontCache::font_iterator
private

Definition at line 82 of file FontCache.h.

◆ font_map_iterator

typedef FontMap_t::iterator ROOT::MacOSX::Details::FontCache::font_map_iterator
private

Definition at line 87 of file FontCache.h.

◆ FontMap_t

Definition at line 86 of file FontCache.h.

◆ PSNameMap_t

typedef std::map<std::string, std::string> ROOT::MacOSX::Details::FontCache::PSNameMap_t
private

Definition at line 110 of file FontCache.h.

Member Enumeration Documentation

◆ Details

Enumerator
nPadFonts 

Definition at line 41 of file FontCache.h.

Constructor & Destructor Documentation

◆ FontCache() [1/2]

ROOT::MacOSX::Details::FontCache::FontCache ( )

Definition at line 234 of file FontCache.mm.

◆ FontCache() [2/2]

ROOT::MacOSX::Details::FontCache::FontCache ( const FontCache rhs)
private

Member Function Documentation

◆ FreeFontNames()

void ROOT::MacOSX::Details::FontCache::FreeFontNames ( char **  fontList)

Definition at line 402 of file FontCache.mm.

◆ GetAscent() [1/3]

double ROOT::MacOSX::Details::FontCache::GetAscent ( ) const

Definition at line 601 of file FontCache.mm.

◆ GetAscent() [2/3]

double ROOT::MacOSX::Details::FontCache::GetAscent ( const char *  text) const

Definition at line 608 of file FontCache.mm.

◆ GetAscent() [3/3]

double ROOT::MacOSX::Details::FontCache::GetAscent ( const std::vector< UniChar > &  unichars) const

Definition at line 624 of file FontCache.mm.

◆ GetDescent() [1/3]

double ROOT::MacOSX::Details::FontCache::GetDescent ( ) const

Definition at line 639 of file FontCache.mm.

◆ GetDescent() [2/3]

double ROOT::MacOSX::Details::FontCache::GetDescent ( const char *  text) const

Definition at line 646 of file FontCache.mm.

◆ GetDescent() [3/3]

double ROOT::MacOSX::Details::FontCache::GetDescent ( const std::vector< UniChar > &  unichars) const

Definition at line 662 of file FontCache.mm.

◆ GetFontProperties()

void ROOT::MacOSX::Details::FontCache::GetFontProperties ( FontStruct_t  font,
int maxAscent,
int maxDescent 
)

Definition at line 448 of file FontCache.mm.

◆ GetLeading()

double ROOT::MacOSX::Details::FontCache::GetLeading ( ) const

Definition at line 677 of file FontCache.mm.

◆ GetTextBounds() [1/2]

void ROOT::MacOSX::Details::FontCache::GetTextBounds ( UInt_t w,
UInt_t h,
const char *  text 
) const

Definition at line 573 of file FontCache.mm.

◆ GetTextBounds() [2/2]

void ROOT::MacOSX::Details::FontCache::GetTextBounds ( UInt_t w,
UInt_t h,
const std::vector< UniChar > &  unichars 
) const

Definition at line 587 of file FontCache.mm.

◆ GetTextWidth()

unsigned ROOT::MacOSX::Details::FontCache::GetTextWidth ( FontStruct_t  font,
const char *  text,
int  nChars 
)

Definition at line 418 of file FontCache.mm.

◆ ListFonts()

char ** ROOT::MacOSX::Details::FontCache::ListFonts ( const X11::XLFDName xlfd,
int  maxNames,
int count 
)

Definition at line 299 of file FontCache.mm.

◆ LoadFont()

FontStruct_t ROOT::MacOSX::Details::FontCache::LoadFont ( const X11::XLFDName xlfd)

Definition at line 244 of file FontCache.mm.

◆ operator=()

FontCache & ROOT::MacOSX::Details::FontCache::operator= ( const FontCache rhs)
private

◆ SelectFont()

CTFontRef ROOT::MacOSX::Details::FontCache::SelectFont ( Font_t  fontIndex,
Float_t  fontSize 
)

Definition at line 464 of file FontCache.mm.

◆ SelectSymbolFont()

CTFontRef ROOT::MacOSX::Details::FontCache::SelectSymbolFont ( Float_t  fontSize,
unsigned  fontIndex 
)
private

Definition at line 500 of file FontCache.mm.

◆ UnloadFont()

void ROOT::MacOSX::Details::FontCache::UnloadFont ( FontStruct_t  font)

Definition at line 288 of file FontCache.mm.

Member Data Documentation

◆ fDummyList

FontList ROOT::MacOSX::Details::FontCache::fDummyList
private

Definition at line 108 of file FontCache.h.

◆ fFontLists

std::list<FontList> ROOT::MacOSX::Details::FontCache::fFontLists
private

Definition at line 107 of file FontCache.h.

◆ fFonts

FontMap_t ROOT::MacOSX::Details::FontCache::fFonts[nPadFonts]
private

Definition at line 90 of file FontCache.h.

◆ fLoadedFonts

std::map<CTFontRef, CTFontGuard_t> ROOT::MacOSX::Details::FontCache::fLoadedFonts
private

Definition at line 81 of file FontCache.h.

◆ fSelectedFont

CTFontRef ROOT::MacOSX::Details::FontCache::fSelectedFont
private

Definition at line 91 of file FontCache.h.

◆ fSymbolFontRegistered

bool ROOT::MacOSX::Details::FontCache::fSymbolFontRegistered
private

Definition at line 116 of file FontCache.h.

◆ fXLFDtoPostscriptNames

PSNameMap_t ROOT::MacOSX::Details::FontCache::fXLFDtoPostscriptNames
private

Definition at line 111 of file FontCache.h.

  • graf2d/cocoa/inc/FontCache.h
  • graf2d/cocoa/src/FontCache.mm