forked from mirror/presenterm
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bd1f097e1b | |||
|
|
cae76380fa | ||
|
|
78a3df199e |
@ -6,12 +6,12 @@
|
|||||||
|
|
||||||
## New features
|
## New features
|
||||||
|
|
||||||
* Support for [slide transitions](https://mfontanini.github.io/presenterm/features/slide-transitons.html) is now available ([#530](https://github.com/mfontanini/presenterm/issues/530)):
|
* Support for [slide transitions](https://mfontanini.github.io/presenterm/features/slide-transitions.html) is now available ([#530](https://github.com/mfontanini/presenterm/issues/530)):
|
||||||
* Add fade slide transition ([#534](https://github.com/mfontanini/presenterm/issues/534)).
|
* Add fade slide transition ([#534](https://github.com/mfontanini/presenterm/issues/534)).
|
||||||
* Add slide horizontally slide transition animation ([#528](https://github.com/mfontanini/presenterm/issues/528)).
|
* Add slide horizontally slide transition animation ([#528](https://github.com/mfontanini/presenterm/issues/528)).
|
||||||
* Add `collapse_horizontal` slide transition ([#560](https://github.com/mfontanini/presenterm/issues/560)).
|
* Add `collapse_horizontal` slide transition ([#560](https://github.com/mfontanini/presenterm/issues/560)).
|
||||||
* Add `--output` option to specify the path where the output file is written to during an export ([#526](https://github.com/mfontanini/presenterm/issues/526)).
|
* Add `--output` option to specify the path where the output file is written to during an export ([#526](https://github.com/mfontanini/presenterm/issues/526)) - thanks @marianozunino.
|
||||||
* Allow specifying [start/end lines](https://mfontanini.github.io/presenterm/features/code/highlighting.html#including-external-code-snippets) in file snippet type ([#565](https://github.com/mfontanini/presenterm/issues/565)) - thanks @marianozunino.
|
* Allow specifying [start/end lines](https://mfontanini.github.io/presenterm/features/code/highlighting.html#including-external-code-snippets) in file snippet type ([#565](https://github.com/mfontanini/presenterm/issues/565)).
|
||||||
* Allow letting [pauses become new slides](https://mfontanini.github.io/presenterm/configuration/settings.html#pause-behavior) when exporting ([#557](https://github.com/mfontanini/presenterm/issues/557)).
|
* Allow letting [pauses become new slides](https://mfontanini.github.io/presenterm/configuration/settings.html#pause-behavior) when exporting ([#557](https://github.com/mfontanini/presenterm/issues/557)).
|
||||||
* Allow [using images on right in footer](https://mfontanini.github.io/presenterm/features/themes/definition.html#footer-images) ([#554](https://github.com/mfontanini/presenterm/issues/554)).
|
* Allow [using images on right in footer](https://mfontanini.github.io/presenterm/features/themes/definition.html#footer-images) ([#554](https://github.com/mfontanini/presenterm/issues/554)).
|
||||||
* Add [`max_rows` configuration](https://mfontanini.github.io/presenterm/configuration/settings.html#maximum-presentation-height) to cap vertical size ([#531](https://github.com/mfontanini/presenterm/issues/531)).
|
* Add [`max_rows` configuration](https://mfontanini.github.io/presenterm/configuration/settings.html#maximum-presentation-height) to cap vertical size ([#531](https://github.com/mfontanini/presenterm/issues/531)).
|
||||||
|
|||||||
@ -18,7 +18,7 @@ use crate::{
|
|||||||
};
|
};
|
||||||
use image::{ImageEncoder, codecs::png::PngEncoder};
|
use image::{ImageEncoder, codecs::png::PngEncoder};
|
||||||
use std::{
|
use std::{
|
||||||
fs, io,
|
fs, io,env,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -165,6 +165,12 @@ impl PdfRender {
|
|||||||
let width = (self.dimensions.columns as f64 * FONT_SIZE as f64 * FONT_SIZE_WIDTH).ceil();
|
let width = (self.dimensions.columns as f64 * FONT_SIZE as f64 * FONT_SIZE_WIDTH).ceil();
|
||||||
let height = self.dimensions.rows * LINE_HEIGHT;
|
let height = self.dimensions.rows * LINE_HEIGHT;
|
||||||
let background_color = self.background_color.unwrap_or_else(|| "black".into());
|
let background_color = self.background_color.unwrap_or_else(|| "black".into());
|
||||||
|
|
||||||
|
let font_family = match env::var("PRESENTERM_EXPORT_FONT") {
|
||||||
|
Ok(val) => format!(r"font-family: {val} !important;"),
|
||||||
|
Err(_) => format!(r""),
|
||||||
|
};
|
||||||
|
|
||||||
let css = format!(
|
let css = format!(
|
||||||
r"
|
r"
|
||||||
pre {{
|
pre {{
|
||||||
@ -184,6 +190,10 @@ impl PdfRender {
|
|||||||
width: {width}px;
|
width: {width}px;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
body * {{
|
||||||
|
{font_family}
|
||||||
|
}}
|
||||||
|
|
||||||
.content-line {{
|
.content-line {{
|
||||||
line-height: {LINE_HEIGHT}px;
|
line-height: {LINE_HEIGHT}px;
|
||||||
height: {LINE_HEIGHT}px;
|
height: {LINE_HEIGHT}px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user