carbon-now-cli
carbon-now-cli copied to clipboard
Weird line break issues with SVG
Describe the bug
When saving as SVG, some lines are weirdly broken. widthAdjustment
is true
. The PNG version is fine. Only happens with chromium
driver, not firefox
.
To Reproduce Steps to reproduce the behavior:
- Run
carbon-now
with…config.json
{
"latest-preset": {
"theme": "material",
"backgroundColor": "#00000000",
"windowTheme": "none",
"windowControls": false,
"fontFamily": "Fira Code",
"fontSize": "18px",
"lineNumbers": false,
"firstLineNumber": 1,
"dropShadow": false,
"dropShadowOffsetY": "20px",
"dropShadowBlurRadius": "68px",
"selectedLines": "*",
"widthAdjustment": true,
"lineHeight": "133%",
"paddingVertical": "2px",
"paddingHorizontal": "2px",
"squaredImage": false,
"watermark": false,
"exportSize": "1x",
"type": "svg",
"language": "python"
}
}
and
generics.py
from typing import Generic, TypeVar
T = TypeVar("T")
def f(a: T) -> T:
return a
class A(Generic[T]):
a: T
carbon-now generics.py --engine chromium
- Wait for image to download…
- See error
Expected behavior SVG and PNG output should be the same. There should be no weird linebreaks that are not present in the file.
Screenshots
SVG:
PNG:
Info (please complete the following information):
- OS [e.g. macOS, Linux, Windows, iOS]: Linux
-
--engine
used [e.g.chromium
,firefox
,webkit
]:chromium
- Carbon URL (run with
--open-in-browser
to see) [e.g. carbon.now.sh?bg=pink]: browser does not open
@graipher Thank you for opening; sorry I missed this earlier last month. I’ll investigate further this weekend, but I think this is an error on Carbon’s part (not the CLI), since I remember having different outputs when implementing --engine
as part of v2
and I even had to use --engine firefox
for some of the screenshots of the docs.
I will report back, though; thanks for your patience! 🙂
Been quite swamped since the beginning of the year, but I will tackle a new release of the CLI soon and, amongst other things, address this (somehow.) 🙂 Thanks for your patience, appreciated! @graipher