]> git.lyx.org Git - lyx.git/blobdiff - src/FontInfo.C
write \mathrm{x}\mathrm{y} as \mathrm{xy} again
[lyx.git] / src / FontInfo.C
index 43aa03c5770277ea01e79389ef3b466c3b99ed97..e7eb8117c0b70570e380daa8d303e9912a7b7e53 100644 (file)
@@ -19,6 +19,7 @@
 #include "debug.h"
 #include "lyxrc.h"     // lyxrc.use_scalable_fonts
 #include "support/lstrings.h"
+#include "support/lyxlib.h"
 #include "frontends/GUIRunTime.h"
 
 using std::endl;
@@ -49,7 +50,7 @@ string const FontInfo::getFontname(int size)
                }
        }
 
-       if (scalable && lyxrc.use_scalable_fonts) {
+       if (scalable && (lyxrc.use_scalable_fonts || closestind == -1)) {
                // We can use scalable
                string const font = resize(strings[scaleindex], size);
                lyxerr[Debug::FONT] << "Using scalable font to get\n"
@@ -59,7 +60,7 @@ string const FontInfo::getFontname(int size)
 
        // Did any fonts get close?
        if (closestind == -1) {
-               // No, and we are not allowed to use scalables, so...
+               // No, so...
                return string();
        }
 
@@ -110,7 +111,7 @@ void FontInfo::query()
                return;
 
        if (pattern.empty()) {
-               lyxerr << "Can not use empty font name for font query."
+               lyxerr << "Cannot use empty font name for font query."
                       << endl;
                queried = true;
                return;
@@ -133,6 +134,8 @@ void FontInfo::query()
                // We have matches. Run them through
                for (int i = 0; i < matches; ++i) {
                        string name(list[i]);
+                       lyxerr[Debug::FONT] << "match #" << i << " "
+                                           << name << endl; 
                        sizes[i] = lyx::atoi(token(name, '-', 7));
                        strings[i] = name;
                        if (sizes[i] == 0) {