Georg Baum wrote:
Am Freitag, 13. Oktober 2006 23:27 schrieb [EMAIL PROTECTED]:
Author: younes
Date: Fri Oct 13 23:27:55 2006
New Revision: 15327
URL: http://www.lyx.org/trac/changeset/15327
Log:
enable buffer-export without loading the GUI.
* lyx_main.C:
- parse_export(): set lyx::use_gui to false.
* MathFactory.C:
- initMath(): initSymbols() only if lyx::use_gui is true.
Both is wrong, please revert.
initSymbols() loads information about math commands that is needed to parse
math stuff correctly, so this is also needed without gui. Unfortunately it
also requires some font information, so lyx::use_gui was set to true on
purpose. There is a closed bug about this somewhere in bugzilla.
I understand. But is the font imformation really required? Won't the
attached patch solves the problem. If not, why do we need these font
information if we don't display anything on screen?
Abdel.
Index: mathed/MathFactory.C
===================================================================
--- mathed/MathFactory.C (revision 15327)
+++ mathed/MathFactory.C (working copy)
@@ -87,6 +87,9 @@
bool math_font_available(string & name)
{
+ if (!lyx::use_gui)
+ return true;
+
LyXFont f;
augmentFont(f, name);
@@ -230,8 +233,7 @@
if (!initialized) {
initialized = true;
initParser();
- if (lyx::use_gui)
- initSymbols();
+ initSymbols();
}
}