Georg Baum wrote:
Am Samstag, 14. Oktober 2006 12:42 schrieb Abdelrazak Younes:
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 found the bug: http://bugzilla.lyx.org/show_bug.cgi?id=1665

I understand. But is the font imformation really required?

After reading the bug I am not sure anymore. It looks like it is not required anymore.

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?

It was used for requirements like ams. The second part of the patch is definitely right, the first one is wrong, since the fonts are only used for drawing and metrics.

I don't understand. That's exactly what the first part of the patch is doing: avoid the font searching in case when lyx::use_gui=false. So one part cannot go with the other.

I believe that the math part would then be fixed. The change of lyx::use_gui really looked suspicious to me, since it matched so well the old problem. I did some search in svn and found out that you set lyx::use_gui to true in revision 15306 (probably a copy/paste error), so this fix was ok.

Yes, and that was the reason why I reverted it to false but then, because of the FontMetrics access which were not available anymore it crashed.


What you can see from this conversation is that it really helps to send patches in advance to the list, together with a short explanation. That would have saved me some time. I know that I also committed several changes directly lately, but they were purely mechanical.

Yes, sorry but I thought this one was purely mechanical also. On the plus side, we can now use the export feature without loading the GUI now. At least for text. I will test the other formats.

Abdel.

Reply via email to