]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/PreviewLoader.cpp
Fix bug #9319: Problems with space inside math and textrm.
[lyx.git] / src / graphics / PreviewLoader.cpp
index a6c2c68284df915bd6731fe20ae6d836e627a9ff..6e392e5f36af0ef3f8f3ecf6e81b081828a6ffdc 100644 (file)
@@ -68,7 +68,7 @@ FileName const unique_tex_filename(FileName const & bufferpath)
 }
 
 
-lyx::Converter const * setConverter(string const from)
+lyx::Converter const * setConverter(string const from)
 {
        typedef vector<string> FmtList;
        typedef lyx::graphics::Cache GCache;
@@ -581,9 +581,7 @@ void PreviewLoader::Impl::startLoading(bool wait)
                return;
        }
 
-       double const font_scaling_factor = 
-               buffer_.isExporting() ? 75.0 * buffer_.params().html_math_img_scale 
-                       : 0.01 * lyxrc.dpi * lyxrc.zoom * lyxrc.preview_scale_factor;
+       double const font_scaling_factor = buffer_.fontScalingFactor();
        
        // The conversion command.
        ostringstream cs;
@@ -650,6 +648,11 @@ void PreviewLoader::Impl::startLoading(bool wait)
 }
 
 
+double PreviewLoader::displayPixelRatio() const
+{
+       return buffer().params().display_pixel_ratio;
+}
+
 void PreviewLoader::Impl::finishedGenerating(pid_t pid, int retval)
 {
        // Paranoia check!