]> git.lyx.org Git - features.git/commitdiff
small tweak
authorJohn Levon <levon@movementarian.org>
Wed, 18 Dec 2002 03:07:13 +0000 (03:07 +0000)
committerJohn Levon <levon@movementarian.org>
Wed, 18 Dec 2002 03:07:13 +0000 (03:07 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5849 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/qfont_loader.C

index 377ec1c0f8044975631485554133b35012865fa4..f14c0de17895d62d70d28c32860958ae8901f2e5 100644 (file)
@@ -1,3 +1,7 @@
+2002-12-18  John Levon  <levon@movementarian.org>
+
+       * qfont_loader.C: symbol should not match "Standard Symbols 1"
+
 2002-12-18  John Levon  <levon@movementarian.org>
 
        * qfont_loader.C: rewrite for proper maths symbols
index 22cd6dee2664b10ff7f2b6e0d6c48903e7c3d26b..e173367087f54b1336c320f4f2b30c9bfbac7d19 100644 (file)
@@ -176,7 +176,7 @@ bool isAvailable(LyXFont const & f)
        QString const family(toqstr(tmp));
 
        lyxerr[Debug::FONT] << "Family " << tmp
-              << " isAvailable ?" << endl;
+              << " isAvailable ?";
 
        QFontDatabase db;
        // pass false for match-locale: LaTeX fonts
@@ -185,16 +185,15 @@ bool isAvailable(LyXFont const & f)
        QStringList sl(db.families(false));
 
        for (QStringList::Iterator it = sl.begin(); it != sl.end(); ++it) {
-
                // Case-insensitive for Cmmi10 vs. cmmi10
-               if ((*it).contains(family, false)) {
+               if ((*it).lower().startsWith(family.lower())) {
                        lyxerr[Debug::FONT]
                                << "found family "
                                << fromqstr(*it) << endl;
                        return true;
                }
        }
-
+       lyxerr[Debug::FONT] << " no." << endl;
        return false;
 }
 
@@ -357,8 +356,5 @@ bool qfont_loader::available(LyXFont const & f)
        if (!lyxrc.use_gui)
                return false;
 
-       bool const is_available(isAvailable(f));
-       lyxerr[Debug::FONT] << "font_loader::available returning "
-               << is_available << endl;
-       return is_available;
+       return isAvailable(f);
 }