]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFonts.cpp
Fix compatibility issue with 64-bit cygwin.
[lyx.git] / src / LaTeXFonts.cpp
index e37ad2e945269ac5fcbcc459057064724e1380c2..9010615fcb4c19bf0307ef12e5c2795b46e0202b 100644 (file)
@@ -193,6 +193,15 @@ docstring const LaTeXFont::getUsedFont(bool ot1, bool complete, bool nomath)
 }
 
 
+docstring const LaTeXFont::getUsedPackage(bool ot1, bool complete, bool nomath)
+{
+       docstring const usedfont = getUsedFont(ot1, complete, nomath);
+       if (usedfont.empty())
+               return docstring();
+       return theLaTeXFonts().getLaTeXFont(usedfont).package();
+}
+
+
 string const LaTeXFont::getAvailablePackage(bool dryrun)
 {
        if (package_.empty())
@@ -250,8 +259,9 @@ string const LaTeXFont::getPackageOptions(bool ot1, bool complete, bool sc, bool
            && providesScale(ot1, complete, nomath)) {
                if (!os.str().empty())
                        os << ',';
-               os << subst(to_ascii(scaleoption_), "$$val",
-                           convert<std::string>(float(scale) / 100));
+               ostringstream value;
+               value << float(scale) / 100;
+               os << subst(to_ascii(scaleoption_), "$$val", value.str());
        }
        return os.str();
 }