algoo / preview-generator

generates previews of files with cache management
https://pypi.org/project/preview-generator/
MIT License
228 stars 50 forks source link

Clarify svg builder behavior #191

Open inkhey opened 4 years ago

inkhey commented 4 years ago

Behaviour for svg builder is unclear:

Just tested with or without this patch:
[test_result.zip](https://github.com/algoo/preview-generator/files/4930704/test_result.zip)

For cairosvg:
- Based on svg "view"
- Preserve ratio, if ratio doesn't match file size, will change the view and also show elements outside of the "standard" view.

For inkscape:
- Based on drawing view.
- setting both height and width make inkscape don't preserve ratio anymore.

Not sure what should be the correct behavior here.

Originally posted by @inkhey in https://github.com/algoo/preview-generator/pull/184#issuecomment-659308321*

We do need to make decision about what should be a preview of svg, how we handle the ratio issue, etc...