Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for text? #29

Open
tzookb opened this issue May 3, 2021 · 2 comments
Open

support for text? #29

tzookb opened this issue May 3, 2021 · 2 comments

Comments

@tzookb
Copy link

tzookb commented May 3, 2021

hello :)

wondering if the converter supports text or Im doing something wrong :|

have this svg that I create in the code, so in the end I have the svg string.

canvas := svg.New(&buf)
canvas.Start(width, height)
canvas.Text(width/2, height/2, "aloha, SVG", "text-anchor:middle;font-size:30px;fill:white")
canvas.Circle(width/2, height/2, 100, "fill: green")
canvas.End()

the svg looks like this:
Screen Shot 2021-05-03 at 6 26 28

but when Im running the repo code to generate a png, I get only a circle.

So want to make sure if text is supported, as it mentions in the readme that not all svg options are available.

@srwiley
Copy link
Owner

srwiley commented May 7, 2021

That is correct, text is not supported. Of course if you make a path representing a letter you can use that. In fact you can pull that info from most scalable font formats, but for now text is not directly supported.
See https://github.com/srwiley/oksvg/blob/master/doc/SVG_Element_List.txt

@juburr
Copy link

juburr commented Dec 26, 2023

Partial support for text in one of the forks: raykov#4

Related closed PRs in this repo: #30, #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants