Repository navigation
New option "--fillonly" - #56
Conversation
|
Would it work to put conditional around the foreground sections in the template? unless you want to keep the text but "invisible" for some reason? |
|
Some test could be nice also? the current tests seem to fail because of indent different so they might need to be updated to also, see https://github.com/wader/ansisvg?tab=readme-ov-file#development-and-release-build |
I'm not sure what you mean? Text still works fine with |
… pass existing tests
Doh sorry i should have tested your PR before commenting, now i think i see what it does. In what situations does background stroke cause a problem? if i remember correctly it was added because with some svg renderers would render a tiny gap between the background rects without it. Thinking it would be nice to document why such an option exist and when it one would want to use it. |
| var listColorSchemesFlag = fs.Bool("listcolorschemes", false, "List color schemes") | ||
| var transparentFlag = fs.Bool("transparent", ansitosvg.DefaultOptions.Transparent, "Transparent background") | ||
| var gridModeFlag = fs.Bool("grid", false, "Grid mode (sets position for each character)") | ||
| var fillOnlyFlag = fs.Bool("fillonly", false, "Remove strokes from SVG output (use fills only)") |
There was a problem hiding this comment.
Probably want ansitosvg.DefaultOptions.FillOnly here
| MarginSize: xydim.XyDimFloat{X: 0, Y: 0}, | ||
| ColorScheme: "Builtin Dark", | ||
| Transparent: false, | ||
| FillOnly: false, |
There was a problem hiding this comment.
gofmt seem to want to indent this false a bit to align with the rest
I've been using the tool to convert several ANSIs built primarily with the block character to SVGs using |
I see, could you scribble down a few words about that under a new section in the README? "Illustrator issues" etc? |
|
|
||
| ## Illustrator Issues | ||
|
|
||
| When handling ANSIs primarliy composed of block characters, e.g. █, ░, ▒, etc., a `stroke` is created by default in the output SVG that may cause overlapping of characters when viewed in Illustrator. The `--fillonly` mode is provided to remove `stroke` from the output SVG. This works especially well when combined with `--grid` and `--charboxsize`. |
There was a problem hiding this comment.
🥳 and nice catch about missing double dashes 👍
|
Thanks! |
New option
--fillonlywill removestrokefrom generated SVGs and only usefillfor colors.Defaults to
false, so no change in output unless invoked.