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");
197 if (
xlfd.fPixelSize) {
198 std::ostringstream out;
199 out<<
xlfd.fPixelSize;
212 : fSymbolFontRegistered(
false)
226#ifdef MAC_OS_X_VERSION_10_9
237 ::Error(
"FontCache::LoadFont",
"CTFontCreateWithName failed for %s",
xlfd.fFamilyName.c_str());
267 CTFontRef
fontRef = (CTFontRef)font;
278 typedef std::vector<char>::size_type size_type;
295 ::Error(
"FontCache::ListFonts",
"CTFontCollectionCreateMatchingFontDescriptors failed %s",
xlfd.fFamilyName.c_str());
320 if (
newXLFD.fFamilyName.find(
'-') != std::string::npos)
331 if (
xlfd.fPixelSize) {
352 std::vector<char *> &list =
fFontLists.back().fList;
354 list.push_back(&
data[0]);
355 for (size_type i = 1,
e =
data.size(); i <
e; ++i) {
356 if (!
data[i] && i + 1 <
e)
357 list.push_back(&
data[i + 1]);
378 assert(0 &&
"FreeFontNames, unknown fontList");
387 typedef std::vector<CGSize>::size_type size_type;
389 CTFontRef
fontRef = (CTFontRef)font;
417 CTFontRef
fontRef = (CTFontRef)font;
424 }
catch (
const std::exception &) {
452 ::Error(
"FontCache::SelectFont",
"CTFontCreateWithName failed for font %d",
fontIndex);
458 }
catch (
const std::exception &) {
482 ::Error(
"FontCache::SelectSymbolFont",
"symbol.ttf file not found");
489 ::Error(
"FontCache::SelectSymbolFont",
"CFStringCreateWithCString failed");
495 ::Error(
"FontCache::SelectSymbolFont",
"CFURLCreateWithFileSystemPath failed");
504 ::Error(
"FontCache::SelectSymbolFont",
"CTFontManagerRegisterFontsForURL failed");
513 ::Error(
"FontCache::SelectSymbolFont",
"CTFontManagerCreateFontDescriptorsFromURL failed");
524 ::Error(
"FontCache::SelectSymbolFont",
"CTFontCreateWithFontDescriptor failed");
530 }
catch (
const std::exception &) {
548 }
catch (
const std::exception &) {
562 }
catch (
const std::exception &) {
577 assert(
text != 0 &&
"GetAscent, parameter 'text' is null");
585 }
catch (
const std::exception &) {
600 }
catch (
const std::exception &) {
615 assert(
text != 0 &&
"GetDescent, parameter 'text' is null");
623 }
catch (
const std::exception &) {
638 }
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...