Jean-Marc Lasgouttes wrote:
I'd appreciate if you could update the patch according to the remarks above, or find someone who can do so.
Attached the new patch for 1.4 with the code moved to the qt2 frontend. Is this OK?
Joost
Index: src/frontends/qt2/qfont_loader.C =================================================================== --- frontends/qt2/qfont_loader.C (revision 13844) +++ frontends/qt2/qfont_loader.C (working copy) @@ -51,7 +51,18 @@ #include <ApplicationServices/ApplicationServices.h> #endif +#ifdef Q_WS_WIN +#include "windows.h" +#include "support/os.h" +#include "support/package.h" +#include "support/path.h" +using lyx::support::AddName; +using lyx::support::AddPath; +using lyx::support::package; +namespace os = lyx::support::os; +#endif void FontLoader::initFontPath() { #ifdef Q_WS_MACX @@ -81,6 +92,21 @@ if (err) lyxerr << "FMActivateFonts err = " << err << endl; #endif + +#ifdef Q_WS_WIN + // Windows only: Add BaKoMa TrueType font resources + + string const fonts_dir = AddPath(package().system_support(), "fonts"); + string const fonts[] = {"cmex10", "cmmi10", "cmr10", "cmsy10", + "eufm10", "msam10", "msbm10", "wasy10"}; + string font_current; + + for(int i=0; i < (sizeof(fonts) / sizeof(*fonts)); i++) + { + font_current = os::external_path(AddName(fonts_dir, fonts[i] + ".ttf")); + AddFontResource(font_current.c_str()); + } +#endif } namespace {