mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Implement independent output scaling for math images (and, I suppose,
for any other sort of image for which we produce a preview on export, e.g., eventually, for InsetExternal). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35032 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6d630bef7a
commit
89a9fc4c5e
@ -583,19 +583,22 @@ void PreviewLoader::Impl::startLoading(bool wait)
|
||||
return;
|
||||
}
|
||||
|
||||
double font_scaling_factor = 0.01 * lyxrc.dpi * lyxrc.zoom
|
||||
* lyxrc.preview_scale_factor;
|
||||
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;
|
||||
|
||||
// For XHTML image export, we need to control the background
|
||||
// color here.
|
||||
ColorCode bg = buffer_.isExporting()
|
||||
// FIXME XHTML
|
||||
// The colors should be customizable.
|
||||
ColorCode const bg = buffer_.isExporting()
|
||||
? Color_white : PreviewLoader::backgroundColor();
|
||||
ColorCode const fg = buffer_.isExporting()
|
||||
? Color_black : PreviewLoader::foregroundColor();
|
||||
// The conversion command.
|
||||
ostringstream cs;
|
||||
cs << pconverter_->command << ' ' << pconverter_->to << ' '
|
||||
<< quoteName(latexfile.toFilesystemEncoding()) << ' '
|
||||
<< int(font_scaling_factor) << ' '
|
||||
<< theApp()->hexName(PreviewLoader::foregroundColor()) << ' '
|
||||
<< theApp()->hexName(fg) << ' '
|
||||
<< theApp()->hexName(bg);
|
||||
if (buffer_.params().useXetex)
|
||||
cs << " xelatex";
|
||||
|
Loading…
Reference in New Issue
Block a user