44 CFSTR(
"TimesNewRomanPS-ItalicMT"),
45 CFSTR(
"TimesNewRomanPS-BoldMT"),
46 CFSTR(
"TimesNewRomanPS-BoldItalicMT"),
48 CFSTR(
"Helvetica-Oblique"),
49 CFSTR(
"Helvetica-Bold"),
50 CFSTR(
"Helvetica-BoldOblique"),
52 CFSTR(
"Courier-Oblique"),
53 CFSTR(
"Courier-Bold"),
54 CFSTR(
"Courier-BoldOblique"),
56 CFSTR(
"TimesNewRomanPSMT"),
58 CFSTR(
"Symbol-Italic")
66 ::Error(
"CreateFontCollection",
"CTFontCollectionCreateFromAvailableFonts failed");
123#ifdef MAC_OS_X_VERSION_10_9
220 if (
xlfd.fPixelSize) {
221 std::ostringstream
out;
235 : fSymbolFontRegistered(
false)
249#ifdef MAC_OS_X_VERSION_10_9
260 ::Error(
"FontCache::LoadFont",
"CTFontCreateWithName failed for %s",
xlfd.fFamilyName.c_str());
290 CTFontRef
fontRef = (CTFontRef)font;
301 typedef std::vector<char>::size_type size_type;
318 ::Error(
"FontCache::ListFonts",
"CTFontCollectionCreateMatchingFontDescriptors failed %s",
xlfd.fFamilyName.c_str());
343 if (
newXLFD.fFamilyName.find(
'-') != std::string::npos)
354 if (
xlfd.fPixelSize) {
361#ifdef MAC_OS_X_VERSION_10_9
388 std::vector<char *> &list =
fFontLists.back().fList;
390 list.push_back(&
data[0]);
391 for (size_type i = 1,
e =
data.size(); i <
e; ++i) {
392 if (!
data[i] && i + 1 <
e)
393 list.push_back(&
data[i + 1]);
414 assert(0 &&
"FreeFontNames, unknown fontList");
423 typedef std::vector<CGSize>::size_type size_type;
425 CTFontRef
fontRef = (CTFontRef)font;
453 CTFontRef
fontRef = (CTFontRef)font;
460 }
catch (
const std::exception &) {
488 ::Error(
"FontCache::SelectFont",
"CTFontCreateWithName failed for font %d",
fontIndex);
494 }
catch (
const std::exception &) {
518 ::Error(
"FontCache::SelectSymbolFont",
"symbol.ttf file not found");
525 ::Error(
"FontCache::SelectSymbolFont",
"CFStringCreateWithCString failed");
531 ::Error(
"FontCache::SelectSymbolFont",
"CFURLCreateWithFileSystemPath failed");
540 ::Error(
"FontCache::SelectSymbolFont",
"CTFontManagerRegisterFontsForURL failed");
549 ::Error(
"FontCache::SelectSymbolFont",
"CTFontManagerCreateFontDescriptorsFromURL failed");
560 ::Error(
"FontCache::SelectSymbolFont",
"CTFontCreateWithFontDescriptor failed");
566 }
catch (
const std::exception &) {
584 }
catch (
const std::exception &) {
598 }
catch (
const std::exception &) {
613 assert(
text != 0 &&
"GetAscent, parameter 'text' is null");
621 }
catch (
const std::exception &) {
636 }
catch (
const std::exception &) {
651 assert(
text != 0 &&
"GetDescent, parameter 'text' is null");
659 }
catch (
const std::exception &) {
674 }
catch (
const std::exception &) {
Handle_t FontStruct_t
Pointer to font structure.
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char text
R__EXTERN TSystem * gSystem
void FreeFontNames(char **fontList)
double GetLeading() const
void GetFontProperties(FontStruct_t font, int &maxAscent, int &maxDescent)
std::map< CTFontRef, CTFontGuard_t >::iterator font_iterator
char ** ListFonts(const X11::XLFDName &xlfd, int maxNames, int &count)
unsigned GetTextWidth(FontStruct_t font, const char *text, int nChars)
CTFontRef SelectSymbolFont(Float_t fontSize, unsigned fontIndex)
PSNameMap_t fXLFDtoPostscriptNames
double GetDescent() const
std::list< FontList > fFontLists
void GetTextBounds(UInt_t &w, UInt_t &h, const char *text) const
std::map< CTFontRef, CTFontGuard_t > fLoadedFonts
FontStruct_t LoadFont(const X11::XLFDName &xlfd)
void UnloadFont(FontStruct_t font)
CTFontRef SelectFont(Font_t fontIndex, Float_t fontSize)
bool fSymbolFontRegistered
FontMap_t::iterator font_map_iterator
FontMap_t fFonts[nPadFonts]
const_iterator begin() const
const_iterator end() const
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
static const TString & GetTTFFontDir()
Get the fonts directory in the installation. Static utility function.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
const CTFontOrientation horizontalFontOrientation
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...