Am 12.10.2004 um 14:39 schrieb Jean-Marc Lasgouttes:

"Andreas" == Andreas Vox <[EMAIL PROTECTED]> writes:

Andreas> Only circumstantial docs; you will love this: The docs to Andreas> QFontDatabase have an example program which starts [...] Andreas> and then never uses app again. When I added this code, which Andreas> lists all available font families, at the end of Andreas> addFontPath(), the symbol fonts didn't show up.

This is with Qt/Mac, right?

Sure.

Andreas> What about having three functions:

Andreas> // called before QApplication is initialized, friend to
Andreas> lyx_gui void addFontPathEarly() // called when available() is
Andreas> first called, private void addFontPathJustInTime() // Could
Andreas> be used in the future if the fontpath should change during
Andreas> runtime, public void addFontPathLate()

Andreas> If noone shouts I will provide a patch which implements the
Andreas> first two funtions, deferring the third until we need it.

Another solution would be to add a call to qfont_loader::addFontPath in
lyx_gui::init
lyx_gui::parse_init ?

 bracketed in #ifdef WS_MACX, and remove the special code
in qfont_loader::available. This seems simpler to me.


Simpler to understand or simpler to implement? In my view implementation is easy for both ways.

We can handle the X11 case in a second step.


But if I remove the code from qfont_loader::available() the behaviour of Q_WS_X11
_will_ change.
Sure you want that or shall I just bracket the special code
in qfont_loader::available() with #ifdef Q_WS_X11 ?


In my view it would be nicer to have these #ifdefs in qfont_loader.C instead of
lyx_gui.C; that's why I proposed two functions which get called at different times.


/Andreas



Reply via email to