Commit Graph
6 Commits
Author SHA1 Message Date
John MacFarlane 6149cec27a Update command test for SVG embedding changes. 2023-11-25 11:39:22 -05:00
John MacFarlane 7b8e8f6f52 SelfContained: retain attributes in svg tag...
when referring to another svg's content using `<use>`.
Closes #8969.
2023-07-27 09:56:56 -06:00
John MacFarlane ecb59e1cde SelfContained: fix calculation of svg width and height.
We were computing width and height from viewBox incorrectly.
See #8969.
2023-07-26 09:49:37 -06:00
John MacFarlane 704a07d963 SelfContained: Improve inline SVGs.
- Ensure that width and height attributes don't get specified
  twice is both the img tag and the svg include them.
- Omit unnecessary attributes xmlns, xmlns:xlink, and version on
  svg element.
- Use 20 character rather than 40 character hashes for generated IDs.

Closes #8965.
2023-07-25 23:24:43 -06:00
John MacFarlane a97b270b28 Fix bugs in implementation of #8948. 2023-07-13 07:49:13 -07:00
John MacFarlane 94832af98a SelfContained: Use inline svg instead of data uris...
for SVG images in HTML5. Closes #8948.

Note that SelfContained does not have access to the writer
name, so we check for HTML5 by determining whether the document
starts with `<DOCTYPE! html>`. This means that inline SVG
won't be used when generating document fragments.

An API change could be contemplated to give more flexibility,
but this is okay for now.
2023-07-11 10:59:33 -07:00