]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/qfont_loader.C
better selection and scrolling behaviour
[lyx.git] / src / frontends / qt2 / qfont_loader.C
index 2e34c41b8d809d6f5ae8bdce31cfd5080b9294ba..40d79e3bc0981e6d93f83038530501675ec7078c 100644 (file)
@@ -20,6 +20,7 @@
 #include "debug.h"
 #include "lyxrc.h"
 #include "BufferView.h"
+#include "qt_helpers.h"
 
 #include <qglobal.h>
 #if QT_VERSION < 300
@@ -119,7 +120,7 @@ string const symbolPattern(LyXFont::FONT_FAMILY family)
 
        default:
                return string();
-       }       
+       }
 }
 
 bool addFontPath()
@@ -135,7 +136,7 @@ bool addFontPath()
                lyxerr << "Adding " << dir << " to the font path.\n";
                string const command = "xset fp+ " + dir;
                Systemcall s;
-               if (!s.startscript(Systemcall::Wait, command)) 
+               if (!s.startscript(Systemcall::Wait, command))
                        return true;
                lyxerr << "Unable to add font path.\n";
        }
@@ -151,7 +152,7 @@ bool isAvailable(QFont const & font, LyXFont const & f) {
        if (tmp.empty())
                return false;
        else
-               return token(tmp, '-', 2) == 
+               return token(tmp, '-', 2) ==
                        token(font.rawName().latin1(), '-', 2);
 #endif
 }
@@ -173,16 +174,19 @@ qfont_loader::font_info::font_info(LyXFont const & f)
                                font.setRawName(pat.c_str());
                        }
                }
-       } else 
+       } else
                switch (f.family()) {
                case LyXFont::ROMAN_FAMILY:
-                       font.setFamily(lyxrc.roman_font_name.c_str());
+                       font.setFamily(makeFontName(lyxrc.roman_font_name,
+                                                   lyxrc.roman_font_foundry).c_str());
                        break;
                case LyXFont::SANS_FAMILY:
-                       font.setFamily(lyxrc.sans_font_name.c_str());
+                       font.setFamily(makeFontName(lyxrc.sans_font_name,
+                                                   lyxrc.sans_font_foundry).c_str());
                        break;
                case LyXFont::TYPEWRITER_FAMILY:
-                       font.setFamily(lyxrc.typewriter_font_name.c_str());
+                       font.setFamily(makeFontName(lyxrc.typewriter_font_name,
+                                                   lyxrc.typewriter_font_foundry).c_str());
                        break;
                default:
                        break;