Skip to content
Snippets Groups Projects
Commit 010c9eb5 authored by Fons Rademakers's avatar Fons Rademakers
Browse files

make sure TGX11TTF is created before TGClient so we can use TTF fonts in

the GUI.


git-svn-id: http://root.cern.ch/svn/root/trunk@18110 27541ba8-7e3a-0410-8455-c3a389f83636
parent f1b48566
No related branches found
No related tags found
No related merge requests found
// @(#)root/base:$Name: $:$Id: TApplication.cxx,v 1.81 2007/02/21 09:52:14 brun Exp $
// @(#)root/base:$Name: $:$Id: TApplication.cxx,v 1.82 2007/02/26 17:24:30 brun Exp $
// Author: Fons Rademakers 22/12/95
/*************************************************************************
......@@ -195,18 +195,11 @@ void TApplication::InitializeGraphics()
if (fgGraphInit)
return;
fgGraphInit = kTRUE;
// Load the graphics related libraries
LoadGraphicsLibs();
// Create WM dependent application environment
if (fAppImp)
delete fAppImp;
fAppImp = gGuiFactory->CreateApplicationImp(gROOT->GetName(), &fArgc, fArgv);
if (!fAppImp) {
MakeBatch();
fAppImp = gGuiFactory->CreateApplicationImp(gROOT->GetName(), &fArgc, fArgv);
}
// Try to load TrueType font renderer. Only try to load if not in batch
// mode and Root.UseTTFonts is true and Root.TTFontPath exists. Abort silently
// if libttf or libGX11TTF are not found in $ROOTSYS/lib or $ROOTSYS/ttf/lib.
......@@ -235,6 +228,15 @@ void TApplication::InitializeGraphics()
delete [] ttfont;
}
// Create WM dependent application environment
if (fAppImp)
delete fAppImp;
fAppImp = gGuiFactory->CreateApplicationImp(gROOT->GetName(), &fArgc, fArgv);
if (!fAppImp) {
MakeBatch();
fAppImp = gGuiFactory->CreateApplicationImp(gROOT->GetName(), &fArgc, fArgv);
}
// Create the canvas colors early so they are allocated before
// any color table expensive bitmaps get allocated in GUI routines (like
// creation of XPM bitmaps).
......@@ -252,7 +254,6 @@ void TApplication::InitializeGraphics()
if (h > 0 && h < 1000) gStyle->SetScreenFactor(0.0011*h);
}
}
fgGraphInit = kTRUE;
}
//______________________________________________________________________________
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment