From 787667f40618d577d3d91502ca42d01b23c67a44 Mon Sep 17 00:00:00 2001 From: guigui64 Date: Mon, 26 Sep 2022 17:13:05 +0200 Subject: [PATCH 1/3] TextD for apply dx and dy to text --- svg.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/svg.go b/svg.go index 03af677..fdbaa26 100644 --- a/svg.go +++ b/svg.go @@ -411,6 +411,14 @@ func (svg *SVG) Text(x int, y int, t string, s ...string) { svg.println(``) } +// Text places the specified text, t at x,y according to the style specified in s +// Standard Reference: http://www.w3.org/TR/SVG11/text.html#TextElement +func (svg *SVG) TextD(x int, y int, dx, dy string, t string, s ...string) { + svg.printf(`")) + xml.Escape(svg.Writer, []byte(t)) + svg.println(``) +} + // Textspan begins text, assuming a tspan will be included, end with TextEnd() // Standard Reference: https://www.w3.org/TR/SVG11/text.html#TSpanElement func (svg *SVG) Textspan(x int, y int, t string, s ...string) { @@ -1032,6 +1040,9 @@ func ptag(x int, y int) string { return fmt.Sprintf(` Date: Tue, 27 Sep 2022 11:02:24 +0200 Subject: [PATCH 2/3] publish fork with new path --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index c725841..5b02cc2 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/ajstarks/svgo +module github.com/guigui64/svgo go 1.15 From 74ee858060852dd85f5d2a73b50561d70fc94cd2 Mon Sep 17 00:00:00 2001 From: Guillaume Comte Date: Fri, 9 Dec 2022 14:56:52 +0100 Subject: [PATCH 3/3] ImageNoRatio --- svg.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/svg.go b/svg.go index fdbaa26..3f605c7 100644 --- a/svg.go +++ b/svg.go @@ -403,6 +403,13 @@ func (svg *SVG) Image(x int, y int, w int, h int, link string, s ...string) { svg.printf(`