Skip to content

Releases: sammycage/lunasvg

v3.2.1

08 Mar 03:59
Compare
Choose a tag to compare

Support for textLength and lengthAdjust Attributes (#215)

This update now lets you control SVG text rendering with the textLength and lengthAdjust attributes. You can set a fixed width for your text and decide whether to tweak only the spacing between characters or to also stretch the glyphs.

https://www.w3.org/Graphics/SVG/Test/20061213/svggen/text-text-01-b.svg

We sincerely thank @terjehelgesen from Software Companions for their generous financial contribution, which helped make this feature possible!

v3.2.0

16 Feb 12:25
Compare
Choose a tag to compare

🚀 New Feature: Document::querySelectorAll()

querySelectorAll() is a powerful way to select multiple elements from a Document using CSS selectors. Unlike getElementById(), which only fetches a single element by its ID, querySelectorAll() allows you to retrieve multiple elements that match the given selector(s).

It works exactly like the JavaScript querySelectorAll() method in the DOM:
👉 MDN Reference

📌 Example Usage

Consider an SVG with multiple <circle> elements:

<svg width="200" height="200">
  <circle cx="50" cy="50" r="40" fill="red" />
  <circle cx="150" cy="50" r="40" fill="blue" />
</svg>

✔️ This selects all <circle> elements and stores them in an ElementList.

ElementList circles = document->querySelectorAll("circle");

Now, let's update all circles to green:

for (Element& circle : circles) {
  circle.setAttribute("fill", "green");
}

All circles turn green! 🎨

v3.1.1

31 Jan 17:04
Compare
Choose a tag to compare
  • Set needsLayout when TextNode is modified
  • Reload image exclusively when href is modified
  • Added back plutovg as a submodule #207
  • Fix undefined behavior caused by a null clip path #209
  • Fix undefined behavior caused by invalid geometry elements with markers
  • Fix viewBox clipping

🎄 LunaSVG v3.1.0

23 Dec 17:03
Compare
Choose a tag to compare

What's New

  • Dynamic Styling with CSS:
    Introduced a new applyStyleSheet method for dynamic styling, making it easier to apply CSS styles to SVG content. See an example here.

  • Automatic Layout Updates:
    The library now detects document modifications and updates the layout automatically when necessary, eliminating the need for manual updateLayout calls.

  • Enhanced Layout Control:
    Added the forceLayout method to trigger immediate layout updates when needed.

  • Improved Text Rendering:
    Support for CSS properties like baseline-shift, alignment-baseline, and dominant-baseline has been added, significantly enhancing text rendering capabilities.

Cheers to creating awesome things with these new features! Happy holidays and happy coding! 🎉

v3.0.1

03 Nov 22:26
Compare
Choose a tag to compare
  • Fix stroke-miterlimit parsing
  • Fix Bitmap::valid checks #190
  • Support font-family names with quotes #186

Happy coding! 🎉

LunaSVG v3.0

12 Oct 09:54
Compare
Choose a tag to compare

It has been over five months since I first announced the development of LunaSVG version 3.0, and today, I am beyond excited to finally share it with you! This journey has been filled with countless learning experiences, and while there’s still more work to be done, the library is now ready for use.

I want to express my deepest gratitude to all the LunaSVG users who took the time to test version 3.0 during its development. Your feedback, suggestions, and bug reports have been invaluable in shaping the final product, and I truly appreciate your efforts.

API Changes

The API for rendering and rasterization—the core of what LunaSVG is most often used for—remains mostly unchanged. However, there have been significant updates to the API for document manipulation. You can find the full API reference in the lunasvg.h header file. I am also planning to release demos and examples soon, so stay tuned for that!

What’s New

A lot of work has gone into improving the core of LunaSVG. Much of the code has been rewritten to enhance quality and introduce exciting new features. I’ve also made it easier for LunaSVG to be integrated into other projects using CMake or Meson. Here’s a summary of what’s new:

  • Support for text and image tags
  • Meson build system support
  • Modernized CMake
  • Transition to C++17
  • Introduction of plutovg as a dependency
  • Improved document manipulation capabilities

Acknowledgments

None of this would have been possible without the incredible support of my donors. Your generosity allows me to dedicate more time to maintaining and improving my open-source projects, and I’m deeply thankful for your trust. I also want to extend a heartfelt thank you to everyone who contributed by submitting pull requests or detailed bug reports. Your help in reproducing and fixing issues made this process much smoother.

Thank you all for being part of this journey. I hope LunaSVG v3.0 serves you well!

v2.4.1

22 Aug 18:01
Compare
Choose a tag to compare

What's Changed

  • Add DomElement::render
  • Update minimum cmake version to 3.5 by @WerWolv in #174

New Contributors

Full Changelog: v2.4.0...v2.4.1

v2.4.0

04 Jul 07:54
Compare
Choose a tag to compare

What's Changed

  • rename inner selector in seletor to subselector by @toge in #147
  • Add SvgBooga to list of projects using LunaSVG by @etodanik in #148
  • Add render child element by @lolpie244 in #162

New Contributors

Full Changelog: v2.3.9...v2.4.0

v2.3.9

23 Dec 17:55
610b8bf
Compare
Choose a tag to compare
  • Fix infinite loop issue caused by corrupt SVG file in parsePath #140
  • Implement move constructor for Document class #135
  • Downgrade C++ Compiler from C++17 to C++11

v2.3.8

28 May 00:02
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.3.5...v2.3.8