From 22451cf2a82d13ddfea06917e00a2952f97d713f Mon Sep 17 00:00:00 2001 From: John Levon Date: Mon, 31 Mar 2003 02:59:34 +0000 Subject: [PATCH] some reworking to allow Qt to successfully choose a serif default font with fontconfig git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6655 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 12 +++++ src/exporter.C | 4 +- src/frontends/Alert.C | 12 ++--- src/frontends/ChangeLog | 7 +++ src/frontends/lyx_gui.h | 13 +++++- src/frontends/qt2/ChangeLog | 9 ++++ src/frontends/qt2/QPrefs.C | 12 ----- src/frontends/qt2/lyx_gui.C | 66 +++++++++++++++++++++++----- src/frontends/qt2/qfont_loader.C | 5 ++- src/frontends/qt2/qfont_metrics.C | 20 ++++----- src/frontends/xforms/ChangeLog | 7 +++ src/frontends/xforms/FontInfo.C | 2 +- src/frontends/xforms/lyx_gui.C | 47 +++++++++++++++----- src/frontends/xforms/xfont_loader.C | 4 +- src/frontends/xforms/xfont_metrics.C | 4 +- src/insets/ChangeLog | 5 +++ src/insets/insetgraphics.C | 7 ++- src/insets/insetgraphicsParams.C | 3 +- src/lyx_cb.C | 4 +- src/lyx_main.C | 16 +++---- src/lyxfunc.C | 2 +- src/lyxrc.C | 11 ++--- src/lyxrc.h | 4 -- 23 files changed, 190 insertions(+), 86 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f6c8dbc1ee..18d450839a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2003-03-31 John Levon + + * lyxrc.h: + * lyxrc.C: moved pdf_mode and use_gui to elsewhere + + * lyx_main.C: set default fonts from using lyx_gui funcs + + * exporter.C: pdf_mode moved from lyxrc + + * lyx_cb.C: + * lyxfunc.C: changes from above + 2003-03-31 John Levon * lyx_main.C: fix to the last fix diff --git a/src/exporter.C b/src/exporter.C index a8957f5eb0..c0b89ab18c 100644 --- a/src/exporter.C +++ b/src/exporter.C @@ -27,6 +27,8 @@ using std::vector; using std::find; +bool pdf_mode = false; + bool Exporter::Export(Buffer * buffer, string const & format, bool put_in_tempdir, string & result_file) { @@ -51,7 +53,7 @@ bool Exporter::Export(Buffer * buffer, string const & format, Graph::EdgePath p = converters.getPath(*it, format); if (!p.empty()) { - lyxrc.pdf_mode = converters.usePdflatex(p); + pdf_mode = converters.usePdflatex(p); backend_format = *it; break; } diff --git a/src/frontends/Alert.C b/src/frontends/Alert.C index 51e96f9e3c..a230557c8f 100644 --- a/src/frontends/Alert.C +++ b/src/frontends/Alert.C @@ -13,7 +13,7 @@ #include "Alert.h" #include "debug.h" -#include "lyxrc.h" +#include "lyx_gui.h" #include "Alert_pimpl.h" @@ -25,7 +25,7 @@ int Alert::prompt(string const & title, string const & question, int default_button, string const & b1, string const & b2, string const & b3) { - if (lyxrc.use_gui) + if (lyx_gui::use_gui) return prompt_pimpl(title, question, default_button, b1, b2, b3); lyxerr << title << endl; @@ -43,7 +43,7 @@ int Alert::prompt(string const & title, string const & question, void Alert::warning(string const & title, string const & message) { - if (lyxrc.use_gui) + if (lyx_gui::use_gui) return warning_pimpl(title, message); lyxerr << "Warning: " << title << endl; @@ -54,7 +54,7 @@ void Alert::warning(string const & title, string const & message) void Alert::error(string const & title, string const & message) { - if (lyxrc.use_gui) + if (lyx_gui::use_gui) return error_pimpl(title, message); lyxerr << "Error: " << title << endl; @@ -65,7 +65,7 @@ void Alert::error(string const & title, string const & message) void Alert::information(string const & title, string const & message) { - if (lyxrc.use_gui) + if (lyx_gui::use_gui) return information_pimpl(title, message); lyxerr << title << endl; @@ -77,7 +77,7 @@ void Alert::information(string const & title, string const & message) pair const Alert::askForText(string const & msg, string const & dflt) { - if (!lyxrc.use_gui) { + if (!lyx_gui::use_gui) { lyxerr << "----------------------------------------" << endl << msg << endl << "Assuming answer is " << dflt diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index 660221fc69..1a4fc93f5f 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,10 @@ +2003-03-31 John Levon + + * lyx_gui.h: add new font name helpers, move + use_gui to here. + + * Alert.C: from above + 2003-03-31 John Levon * Alert_pimpl.h: diff --git a/src/frontends/lyx_gui.h b/src/frontends/lyx_gui.h index 10b300caad..e42bb9fe6a 100644 --- a/src/frontends/lyx_gui.h +++ b/src/frontends/lyx_gui.h @@ -26,6 +26,18 @@ class FuncRequest; /// GUI interaction namespace lyx_gui { +/// are we using the GUI at all +extern bool use_gui; + +/// return a suitable serif font name (called from non-gui context too !) +string const roman_font_name(); + +/// return a suitable sans serif font name (called from non-gui context too !) +string const sans_font_name(); + +/// return a suitable monospaced font name (called from non-gui context too !) +string const typewriter_font_name(); + /// parse command line and do basic initialisation void parse_init(int & argc, char * argv[]); @@ -46,7 +58,6 @@ void start(string const & batch, std::vector const & files); */ void exit(); - /** * return the status flag for a given action. This can be used to tell * that a given lfun is not implemented by a frontend diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 31d593e797..28aec0801a 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,12 @@ +2003-03-31 John Levon + + * lyx_gui.C: return useful default font names, add use_gui + + * QPrefs.C: remove some dead font code + + * qfont_loader.C: use_gui moved. + * qfont_metrics.C: use_gui moved. + 2003-03-31 John Levon * Alert_pimpl.C: remove alert() diff --git a/src/frontends/qt2/QPrefs.C b/src/frontends/qt2/QPrefs.C index 4c436b1e9b..8385b06e9c 100644 --- a/src/frontends/qt2/QPrefs.C +++ b/src/frontends/qt2/QPrefs.C @@ -346,18 +346,6 @@ void setComboxFont(QComboBox * cb, string const & family, return; } } - - // Try the hint - QFont font; - font.setStyleHint(hint); - QFontInfo fi(font); - - for (int i = cb->count() - 1; i >= 0; --i) { - if (cb->text(i) == fi.family()) { - cb->setCurrentItem(i); - return; - } - } } } diff --git a/src/frontends/qt2/lyx_gui.C b/src/frontends/qt2/lyx_gui.C index 5992d9305b..544c9556c8 100644 --- a/src/frontends/qt2/lyx_gui.C +++ b/src/frontends/qt2/lyx_gui.C @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -74,7 +75,6 @@ map io_callbacks; } // namespace anon - // FIXME: wrong place ! LyXServer * lyxserver; @@ -105,8 +105,12 @@ LQApplication::LQApplication(int & argc, char ** argv) LQApplication::~LQApplication() {} +namespace lyx_gui { -void lyx_gui::parse_init(int & argc, char * argv[]) +bool use_gui = true; + + +void parse_init(int & argc, char * argv[]) { static LQApplication a(argc, argv); @@ -124,11 +128,11 @@ void lyx_gui::parse_init(int & argc, char * argv[]) } -void lyx_gui::parse_lyxrc() +void parse_lyxrc() {} -void lyx_gui::start(string const & batch, vector const & files) +void start(string const & batch, vector const & files) { // initial geometry unsigned int width = 690; @@ -171,7 +175,7 @@ void lyx_gui::start(string const & batch, vector const & files) } -void lyx_gui::exit() +void exit() { delete lyxserver; lyxserver = 0; @@ -185,7 +189,7 @@ void lyx_gui::exit() } -FuncStatus lyx_gui::getStatus(FuncRequest const & ev) +FuncStatus getStatus(FuncRequest const & ev) { FuncStatus flag; switch (ev.action) { @@ -201,38 +205,38 @@ FuncStatus lyx_gui::getStatus(FuncRequest const & ev) } -string const lyx_gui::hexname(LColor::color col) +string const hexname(LColor::color col) { QColor color(toqstr(lcolor.getX11Name(col))); return ltrim(fromqstr(color.name()), "#"); } -void lyx_gui::update_color(LColor::color) +void update_color(LColor::color) { // no need } -void lyx_gui::update_fonts() +void update_fonts() { fontloader.update(); } -bool lyx_gui::font_available(LyXFont const & font) +bool font_available(LyXFont const & font) { return fontloader.available(font); } -void lyx_gui::set_read_callback(int fd, LyXComm * comm) +void set_read_callback(int fd, LyXComm * comm) { io_callbacks[fd] = new io_callback(fd, comm); } -void lyx_gui::remove_read_callback(int fd) +void remove_read_callback(int fd) { map::iterator it = io_callbacks.find(fd); if (it != io_callbacks.end()) { @@ -240,3 +244,41 @@ void lyx_gui::remove_read_callback(int fd) io_callbacks.erase(it); } } + + +string const roman_font_name() +{ + if (!use_gui) + return "serif"; + + QFont font; + font.setFamily("serif"); + font.setStyleHint(QFont::Serif); + return font.family().latin1(); +} + + +string const sans_font_name() +{ + if (!use_gui) + return "sans"; + + QFont font; + font.setFamily("sans"); + font.setStyleHint(QFont::SansSerif); + return font.family().latin1(); +} + + +string const typewriter_font_name() +{ + if (!use_gui) + return "monospace"; + + QFont font; + font.setFamily("monospace"); + font.setStyleHint(QFont::TypeWriter); + return font.family().latin1(); +} + +}; // namespace lyx_gui diff --git a/src/frontends/qt2/qfont_loader.C b/src/frontends/qt2/qfont_loader.C index ef937fb243..0b49e9bd36 100644 --- a/src/frontends/qt2/qfont_loader.C +++ b/src/frontends/qt2/qfont_loader.C @@ -24,6 +24,7 @@ #include #include #include "support/lstrings.h" +#include "frontends/lyx_gui.h" #include @@ -292,7 +293,7 @@ qfont_loader::font_info::font_info(LyXFont const & f) qfont_loader::font_info * qfont_loader::getfontinfo(LyXFont const & f) { - if (!lyxrc.use_gui) { + if (!lyx_gui::use_gui) { // FIXME } @@ -322,7 +323,7 @@ int qfont_loader::charwidth(LyXFont const & f, Uchar val) bool qfont_loader::available(LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return false; static vector cache_set(LyXFont::NUM_FAMILIES, false); diff --git a/src/frontends/qt2/qfont_metrics.C b/src/frontends/qt2/qfont_metrics.C index 7fecadac95..f60e0cd164 100644 --- a/src/frontends/qt2/qfont_metrics.C +++ b/src/frontends/qt2/qfont_metrics.C @@ -11,7 +11,7 @@ #include - +#include "frontends/lyx_gui.h" #include "support/lstrings.h" #include "font_metrics.h" #include "qfont_loader.h" @@ -32,7 +32,7 @@ QFontMetrics const & metrics(LyXFont const & f) int charwidth(Uchar val, LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return 1; return fontloader.charwidth(f, val); } @@ -44,7 +44,7 @@ namespace font_metrics { int maxAscent(LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return 1; return metrics(f).ascent(); } @@ -52,7 +52,7 @@ int maxAscent(LyXFont const & f) int maxDescent(LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return 1; // We add 1 as the value returned by QT is different than X // See http://doc.trolltech.com/2.3/qfontmetrics.html#200b74 @@ -62,7 +62,7 @@ int maxDescent(LyXFont const & f) int ascent(char c, LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return 1; QRect const & r = metrics(f).boundingRect(c); return -r.top(); @@ -71,7 +71,7 @@ int ascent(char c, LyXFont const & f) int descent(char c, LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return 1; QRect const & r = metrics(f).boundingRect(c); return r.bottom()+1; @@ -80,7 +80,7 @@ int descent(char c, LyXFont const & f) int lbearing(char c, LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return 1; return metrics(f).leftBearing(c); } @@ -88,7 +88,7 @@ int lbearing(char c, LyXFont const & f) int rbearing(char c, LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return 1; QFontMetrics const & m(metrics(f)); @@ -108,7 +108,7 @@ Encoding const * fontencoding(LyXFont const & f) int smallcapswidth(char const * s, size_t ls, LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return 1; // handle small caps ourselves ... @@ -136,7 +136,7 @@ int smallcapswidth(char const * s, size_t ls, LyXFont const & f) int width(char const * s, size_t ls, LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return ls; if (f.realShape() == LyXFont::SMALLCAPS_SHAPE) { diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 476766919f..4ad9b83c4e 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,10 @@ +2003-03-31 John Levon + + * FontInfo.C: + * lyx_gui.C: + * xfont_loader.C: add font name helpers, move + use_gui + 2003-03-31 John Levon * Alert_pimpl.C: remove alert() diff --git a/src/frontends/xforms/FontInfo.C b/src/frontends/xforms/FontInfo.C index f1eea2bc41..a95d32f8c9 100644 --- a/src/frontends/xforms/FontInfo.C +++ b/src/frontends/xforms/FontInfo.C @@ -115,7 +115,7 @@ void FontInfo::query() } char ** list = 0; - if (lyxrc.use_gui) + if (lyx_gui::use_gui) list = XListFonts(fl_get_display(), pattern.c_str(), 100, &matches); diff --git a/src/frontends/xforms/lyx_gui.C b/src/frontends/xforms/lyx_gui.C index 0be4e51398..d21f90250a 100644 --- a/src/frontends/xforms/lyx_gui.C +++ b/src/frontends/xforms/lyx_gui.C @@ -128,7 +128,12 @@ char geometry[40]; } // namespace anon -void lyx_gui::parse_init(int & argc, char * argv[]) +namespace lyx_gui { + +bool use_gui = true; + + +void parse_init(int & argc, char * argv[]) { setDefaults(); @@ -177,7 +182,7 @@ void lyx_gui::parse_init(int & argc, char * argv[]) } -void lyx_gui::parse_lyxrc() +void parse_lyxrc() { XformsColor::read(AddName(user_lyxdir, "preferences.xform")); @@ -228,7 +233,7 @@ void lyx_gui::parse_lyxrc() } -void lyx_gui::start(string const & batch, vector const & files) +void start(string const & batch, vector const & files) { // initial geometry int xpos = -1; @@ -314,19 +319,19 @@ void lyx_gui::start(string const & batch, vector const & files) } -void lyx_gui::exit() +void exit() { finished = true; } -FuncStatus lyx_gui::getStatus(FuncRequest const & /*ev*/) +FuncStatus getStatus(FuncRequest const & /*ev*/) { // Nothing interesting to do here return FuncStatus(); } -string const lyx_gui::hexname(LColor::color col) +string const hexname(LColor::color col) { unsigned int r, g, b; bool const success = getRGBColor(col, r, g, b); @@ -347,19 +352,19 @@ string const lyx_gui::hexname(LColor::color col) } -void lyx_gui::update_color(LColor::color col) +void update_color(LColor::color col) { lyxColorHandler->updateColor(col); } -void lyx_gui::update_fonts() +void update_fonts() { fontloader.update(); } -bool lyx_gui::font_available(LyXFont const & font) +bool font_available(LyXFont const & font) { return fontloader.available(font); } @@ -375,13 +380,33 @@ void C_read_callback(int, void * data) } -void lyx_gui::set_read_callback(int fd, LyXComm * comm) +void set_read_callback(int fd, LyXComm * comm) { fl_add_io_callback(fd, FL_READ, C_read_callback, comm); } -void lyx_gui::remove_read_callback(int fd) +void remove_read_callback(int fd) { fl_remove_io_callback(fd, FL_READ, C_read_callback); } + + +string const roman_font_name() +{ + return "times"; +} + + +string const sans_font_name() +{ + return "helvetica"; +} + + +string const typewriter_font_name() +{ + return "courier"; +} + +}; // namespace lyx_gui diff --git a/src/frontends/xforms/xfont_loader.C b/src/frontends/xforms/xfont_loader.C index b0728d687b..5260eaa9ec 100644 --- a/src/frontends/xforms/xfont_loader.C +++ b/src/frontends/xforms/xfont_loader.C @@ -304,7 +304,7 @@ XFontStruct * xfont_loader::doLoad(LyXFont::FONT_FAMILY family, LyXFont::FONT_SHAPE shape, LyXFont::FONT_SIZE size) { - if (!lyxrc.use_gui) { + if (!lyx_gui::use_gui) { if (!dummyXFontStructisGood) { // no character specific info dummyXFontStruct.per_char = 0; @@ -366,7 +366,7 @@ XFontStruct * xfont_loader::doLoad(LyXFont::FONT_FAMILY family, bool xfont_loader::available(LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return false; if (!fontinfo[f.family()][f.series()][f.realShape()]) diff --git a/src/frontends/xforms/xfont_metrics.C b/src/frontends/xforms/xfont_metrics.C index e6eac434ca..c99215d022 100644 --- a/src/frontends/xforms/xfont_metrics.C +++ b/src/frontends/xforms/xfont_metrics.C @@ -108,7 +108,7 @@ int rbearing(char c, LyXFont const & f) int width(char const * s, size_t n, LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return n; if (lyxrc.font_norm_type == LyXRC::ISO_10646_1) { @@ -193,7 +193,7 @@ namespace xfont_metrics { int width(XChar2b const * s, int n, LyXFont const & f) { - if (!lyxrc.use_gui) + if (!lyx_gui::use_gui) return n; if (f.realShape() != LyXFont::SMALLCAPS_SHAPE) { diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index a9f2bd3a59..6da95bf9e9 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2003-03-31 John Levon + + * insetgraphics.C: + * insetgraphicsParams.C: use_gui moved to lyx_gui + 2003-03-31 John Levon * insettext.C: Alert fix diff --git a/src/insets/insetgraphics.C b/src/insets/insetgraphics.C index 834e3c629d..e945f3c062 100644 --- a/src/insets/insetgraphics.C +++ b/src/insets/insetgraphics.C @@ -71,6 +71,7 @@ TODO #include "LaTeXFeatures.h" #include "lyxlex.h" #include "lyxrc.h" +#include "frontends/lyx_gui.h" #include "frontends/Alert.h" #include "frontends/Dialogs.h" @@ -94,6 +95,8 @@ TODO #include // For the std::max extern string system_tempdir; +// set by Exporters +extern bool pdf_mode; using std::ostream; using std::endl; @@ -128,10 +131,10 @@ string const uniqueID() string findTargetFormat(string const & suffix) { - // lyxrc.pdf_mode means: + // pdf_mode means: // Are we creating a PDF or a PS file? // (Should actually mean, are we using latex or pdflatex). - if (lyxrc.pdf_mode) { + if (pdf_mode) { lyxerr[Debug::GRAPHICS] << "findTargetFormat: PDF mode\n"; if (contains(suffix, "ps") || suffix == "pdf") return "pdf"; diff --git a/src/insets/insetgraphicsParams.C b/src/insets/insetgraphicsParams.C index 7ce4710974..d8b01f8404 100644 --- a/src/insets/insetgraphicsParams.C +++ b/src/insets/insetgraphicsParams.C @@ -24,6 +24,7 @@ #include "lyxrc.h" #include "debug.h" #include "lyxlex.h" +#include "frontends/lyx_gui.h" using std::ostream; @@ -306,7 +307,7 @@ grfx::Params InsetGraphicsParams::as_grfxParams(string const & filepath) const } // Override the above if we're not using a gui - if (!lyxrc.use_gui) { + if (!lyx_gui::use_gui) { pars.display = grfx::NoDisplay; } diff --git a/src/lyx_cb.C b/src/lyx_cb.C index ac98e2fcb5..6fd57a886f 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -63,7 +63,7 @@ void ShowMessage(Buffer const * buf, string const & msg2, string const & msg3) { - if (lyxrc.use_gui + if (lyx_gui::use_gui && buf && buf->getUser() && buf->getUser()->owner()) { string const str = msg1 + ' ' + msg2 + ' ' + msg3; buf->getUser()->owner()->message(str); @@ -182,7 +182,7 @@ void QuitLyX() { lyxerr[Debug::INFO] << "Running QuitLyX." << endl; - if (lyxrc.use_gui) { + if (lyx_gui::use_gui) { if (!bufferlist.quitWriteAll()) return; diff --git a/src/lyx_main.C b/src/lyx_main.C index 1cb60a4263..83f6cfa897 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -413,23 +413,23 @@ void LyX::init(bool gui) first_start = false; } - // - // Shine up lyxrc defaults - // + // Disable gui when easyparse says so + lyx_gui::use_gui = gui; - // Default template path: system_dir/templates if (lyxrc.template_path.empty()) { lyxrc.template_path = AddPath(system_lyxdir, "templates"); } - // Default lastfiles file: $HOME/.lyx/lastfiles if (lyxrc.lastfiles.empty()) { lyxrc.lastfiles = AddName(user_lyxdir, "lastfiles"); } - // Disable gui when either lyxrc or easyparse says so - if (!gui) - lyxrc.use_gui = false; + if (lyxrc.roman_font_name.empty()) + lyxrc.roman_font_name = lyx_gui::roman_font_name(); + if (lyxrc.sans_font_name.empty()) + lyxrc.sans_font_name = lyx_gui::sans_font_name(); + if (lyxrc.typewriter_font_name.empty()) + lyxrc.typewriter_font_name = lyx_gui::typewriter_font_name(); // // Read configuration files diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 298e7b3cf1..1a79498173 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -1869,7 +1869,7 @@ void LyXFunc::doImport(string const & argument) string const lyxfile = ChangeExtension(filename, ".lyx"); // Check if the document already is open - if (lyxrc.use_gui && bufferlist.exists(lyxfile)) { + if (lyx_gui::use_gui && bufferlist.exists(lyxfile)) { string const file = MakeDisplayPath(lyxfile, 30); // FIXME: sucky UI ! diff --git a/src/lyxrc.C b/src/lyxrc.C index 1f9e957160..6b7cb7451d 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -209,9 +209,9 @@ void LyXRC::setDefaults() { font_sizes[LyXFont::SIZE_HUGE] = 20.74; font_sizes[LyXFont::SIZE_HUGER] = 24.88; use_scalable_fonts = true; - roman_font_name = "times"; - sans_font_name = "helvetica"; - typewriter_font_name = "courier"; + roman_font_name = ""; + sans_font_name = ""; + typewriter_font_name = ""; popup_bold_font = "-*-helvetica-bold-r"; popup_normal_font = "-*-helvetica-medium-r"; font_norm = "iso8859-1"; @@ -257,11 +257,6 @@ void LyXRC::setDefaults() { preview_hashed_labels = false; preview_scale_factor = 0.9; - /// These variables are not stored on disk (perhaps they - // should be moved from the LyXRC class). - use_gui = true; - pdf_mode = false; - user_name = lyx::user_name(); user_email = lyx::user_email(); diff --git a/src/lyxrc.h b/src/lyxrc.h index 406a26d493..0de60914ab 100644 --- a/src/lyxrc.h +++ b/src/lyxrc.h @@ -185,8 +185,6 @@ enum LyXRCTags { string custom_export_command; /// string custom_export_format; - /// - bool pdf_mode; /// postscript interpreter (in general "gs", if it is installed) string ps_command; /// option for telling the dvi viewer about the paper size @@ -330,8 +328,6 @@ enum LyXRCTags { bool auto_number; /// bool mark_foreign_language; - /// Do we have to use a GUI? - bool use_gui; /// string default_language; ///