Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird line break issues with SVG #175

Open
graipher opened this issue Dec 15, 2023 · 2 comments
Open

Weird line break issues with SVG #175

graipher opened this issue Dec 15, 2023 · 2 comments
Labels
bug Something isn't working carbon.now.sh Related to the carbon.now.sh webapp

Comments

@graipher
Copy link

graipher commented Dec 15, 2023

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:

  1. 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

  1. Wait for image to download…
  2. 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:
Generics_1
PNG:
Generics_1

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 graipher added the bug Something isn't working label Dec 15, 2023
@mixn
Copy link
Owner

mixn commented Jan 9, 2024

@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! 🙂

@mixn mixn added the carbon.now.sh Related to the carbon.now.sh webapp label Feb 8, 2024
@mixn
Copy link
Owner

mixn commented May 31, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working carbon.now.sh Related to the carbon.now.sh webapp
Projects
None yet
Development

No branches or pull requests

2 participants