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

Add SVG support to Terminal widget as a compile-time option. #9

Open
ismail-yilmaz opened this issue Jan 14, 2021 · 2 comments
Open
Assignees
Labels
enhancement Terminal Terminal package related issues.

Comments

@ismail-yilmaz
Copy link
Owner

ismail-yilmaz commented Jan 14, 2021

Given the increasing popularity of inline images support in virtual terminal emulators, and the usage of SVG in general, the SVG rendering support can be added to TerminalCtrl as a compile-time option, since U++ already provides the necessary and easy-to-use SVG rendering functions.

As for the required changes in the wire protocols: This option doesn't necessarily require any modification of supported/existing wire protocols (DECSIXEL/jexer/iterm2), since TerminalCtrl already uses a generic infrastructure to identify and decode images.

@ismail-yilmaz ismail-yilmaz added enhancement Terminal Terminal package related issues. labels Jan 14, 2021
@ismail-yilmaz ismail-yilmaz self-assigned this Jan 14, 2021
@ismail-yilmaz ismail-yilmaz changed the title Add SVG support to Terminal widget as compile-time option. Add SVG support to Terminal widget as a compile-time option. Jan 14, 2021
@ismail-yilmaz
Copy link
Owner Author

ismail-yilmaz commented Jun 14, 2021

A sort of proof of concept implemention, using the existing jexer protocol:

TerminalCtrl-inline-sgv-test (using jexer protocol)

Works just fine with images.

It uses Upp::RenderSVGImage to render the svg into a raster image that can be displayed as usual. (Currently requires only three more lines of code + 2 lines of code change to the renderer.)

Still, a simple yet fine-grained implementation seems to require at least a few options to the wire protocol (such as default bkg color, custom size, etc.).

@klamonte, would you be okay if I attempt to extend the jexer protocol a little bit to include SVG rendering? (a possible TerminalCtrl-variant?)

@ghost
Copy link

ghost commented Jan 1, 2022

@ismail-yilmaz I have no objection. Do you think SVG would make the most sense to be like PNG/JPG, where dimensions are picked up from the image data, or more like RGB where height/width are specified exactly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Terminal Terminal package related issues.
Projects
None yet
Development

No branches or pull requests

1 participant