Skip to content

Commit

Permalink
- Fixed stupid error in read
Browse files Browse the repository at this point in the history
- Update CHANGELOG.md
  • Loading branch information
abey79 committed Apr 2, 2022
1 parent ae9babd commit 05afe38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Release date: UNRELEASED

* Added HPGL configuration for the Calcomp Artisan plotter (thanks to Andee Collard and @ithinkido) (#418)
* Added the `--dont-set-date` option to the `write` command (#442)
* The `read` command now better handles SVGs with missing `width` or `height` attributes (#446)

When the `width` or `height` attribute is missing or expressed as percent, the `read` command now attempts to use the `viewBox` attribute to set the page size, defaulting to 1000x1000px if missing. This behavior can be overridden with the `--display-size` and the `--display-landscape` parameters.


### Bug fixes
Expand All @@ -23,6 +26,7 @@ Release date: UNRELEASED
* Added `vpype_cli.FloatType()`, `vpype_cli.IntRangeType()`, and `vpype_cli.ChoiceType()` (#430)
* Changed `vpype.Document.add_to_sources()` to also modify the `vp_source` property (#431)
* Added a `set_date:bool = True` argument to `vpype.write_svg()` (#442)
* Changed the default value of `default_width` and `default_height` arguments of `vpype.read_svg()` (and friends) to `None` to allow `svgelement` better handle missing `width`/`height` attributes (#446)


### Other changes
Expand Down
2 changes: 1 addition & 1 deletion vpype_cli/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def read(
vpype read --no-crop input_file.svg [...]
"""

display_width = display_height = None
default_width = default_height = None
if display_size is not None:
default_width, default_height = display_size
if display_landscape and default_width < default_height:
Expand Down

0 comments on commit 05afe38

Please sign in to comment.