main.cpp   main.cpp 
skipping to change at line 164 skipping to change at line 164
// output, such as --help and --version // output, such as --help and --version
CLIProcessor::parseCLIArgsPreConfig(argList); CLIProcessor::parseCLIArgsPreConfig(argList);
// Start logging. // Start logging.
StelLogger::init(StelFileMgr::getUserDir()+"/log.txt"); StelLogger::init(StelFileMgr::getUserDir()+"/log.txt");
StelLogger::writeLog(argStr); StelLogger::writeLog(argStr);
// OK we start the full program. // OK we start the full program.
// Print the console splash and get on with loading the program // Print the console splash and get on with loading the program
QString versionLine = QString("This is %1 - http://www.stellarium.or g").arg(StelUtils::getApplicationName()); QString versionLine = QString("This is %1 - http://www.stellarium.or g").arg(StelUtils::getApplicationName());
QString copyrightLine = QString("Copyright (C) 2000-2012 Fabien Cher eau et al"); QString copyrightLine = QString("Copyright (C) 2000-2013 Fabien Cher eau et al");
int maxLength = qMax(versionLine.size(), copyrightLine.size()); int maxLength = qMax(versionLine.size(), copyrightLine.size());
qDebug() << qPrintable(QString(" %1").arg(QString().fill('-', maxLen gth+2))); qDebug() << qPrintable(QString(" %1").arg(QString().fill('-', maxLen gth+2)));
qDebug() << qPrintable(QString("[ %1 ]").arg(versionLine.leftJustifi ed(maxLength, ' '))); qDebug() << qPrintable(QString("[ %1 ]").arg(versionLine.leftJustifi ed(maxLength, ' ')));
qDebug() << qPrintable(QString("[ %1 ]").arg(copyrightLine.leftJusti fied(maxLength, ' '))); qDebug() << qPrintable(QString("[ %1 ]").arg(copyrightLine.leftJusti fied(maxLength, ' ')));
qDebug() << qPrintable(QString(" %1").arg(QString().fill('-', maxLen gth+2))); qDebug() << qPrintable(QString(" %1").arg(QString().fill('-', maxLen gth+2)));
qDebug() << "Writing log file to:" << StelLogger::getLogFileName(); qDebug() << "Writing log file to:" << StelLogger::getLogFileName();
qDebug() << "File search paths:"; qDebug() << "File search paths:";
int n=0; int n=0;
foreach (QString i, StelFileMgr::getSearchPaths()) foreach (QString i, StelFileMgr::getSearchPaths())
{ {
skipping to change at line 307 skipping to change at line 307
if (!fName.isEmpty()) if (!fName.isEmpty())
QFontDatabase::addApplicationFont(fName); QFontDatabase::addApplicationFont(fName);
} }
catch (std::runtime_error& e) catch (std::runtime_error& e)
{ {
// Removed this warning practically allowing to package the program without the font file. // Removed this warning practically allowing to package the program without the font file.
// This is useful for distribution having already a package for DejaVu font. // This is useful for distribution having already a package for DejaVu font.
// qWarning() << "ERROR while loading font DejaVuSans : " << e.what(); // qWarning() << "ERROR while loading font DejaVuSans : " << e.what();
} }
QString fileFont = confSettings->value("gui/base_font_file", "").toS
tring();
if (!fileFont.isEmpty())
{
try
{
const QString& afName = StelFileMgr::findFile(QStrin
g("data/%1").arg(fileFont));
if (!afName.isEmpty())
QFontDatabase::addApplicationFont(afName);
}
catch (std::runtime_error& e)
{
qWarning() << "ERROR while loading custom font " <<
fileFont << " : " << e.what();
}
}
QString baseFont = confSettings->value("gui/base_font_name", "DejaVu
Sans").toString();
QString safeFont = confSettings->value("gui/safe_font_name", "Verdan
a").toString();
// Set the default application font and font size. // Set the default application font and font size.
// Note that style sheet will possibly override this setting. // Note that style sheet will possibly override this setting.
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
// On windows use Verdana font, to avoid unresolved bug with OpenGL1 Qt paint engine. // On windows use Verdana font, to avoid unresolved bug with OpenGL1 Qt paint engine.
// See Launchpad question #111823 for more info // See Launchpad question #111823 for more info
QFont tmpFont(safeMode ? "Verdana" : "DejaVu Sans"); QFont tmpFont(safeMode ? safeFont : baseFont);
tmpFont.setStyleHint(QFont::AnyStyle, QFont::OpenGLCompatible); tmpFont.setStyleHint(QFont::AnyStyle, QFont::OpenGLCompatible);
// Activate verdana by defaut for all win32 builds to see if it impr oves things. // Activate verdana by defaut for all win32 builds to see if it impr oves things.
// -> this seems to bring crippled arabic fonts with OpenGL2 paint e ngine.. // -> this seems to bring crippled arabic fonts with OpenGL2 paint e ngine..
// QFont tmpFont("Verdana"); // QFont tmpFont("Verdana");
#else #else
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
QFont tmpFont("Verdana"); QFont tmpFont(safeFont);
#else #else
QFont tmpFont("DejaVu Sans"); QFont tmpFont(baseFont);
#endif #endif
#endif #endif
tmpFont.setPixelSize(confSettings->value("gui/base_font_size", 13).t oInt()); tmpFont.setPixelSize(confSettings->value("gui/base_font_size", 13).t oInt());
//tmpFont.setFamily("Verdana"); //tmpFont.setFamily("Verdana");
//tmpFont.setBold(true); //tmpFont.setBold(true);
QApplication::setFont(tmpFont); QApplication::setFont(tmpFont);
#endif #endif
// Initialize translator feature // Initialize translator feature
try try
 End of changes. 5 change blocks. 
4 lines changed or deleted 27 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/