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

Outline text? #43

Open
TimotheAlbouy opened this issue Feb 6, 2019 · 3 comments
Open

Outline text? #43

TimotheAlbouy opened this issue Feb 6, 2019 · 3 comments
Labels

Comments

@TimotheAlbouy
Copy link

Is it possible to outline the text created with this module? For example, I would like to write text in white and outlined in black. This feature is possible with the vectorize-text module.

@shrhdk
Copy link
Owner

shrhdk commented Jul 9, 2019

Will the image look like this?

image

If so, you can use attributes options like this.

textToSVG.getSVG('hello', {attributes: {fill: "white", stroke: "black"}});

@shrhdk shrhdk added the question label Jul 9, 2019
@TimotheAlbouy
Copy link
Author

Yes that's good, thank you very much! But the strokes are outside the edges of the letters or are they a bit inside?

@shrhdk
Copy link
Owner

shrhdk commented Jul 12, 2019

@TimotheAlbouy

They are a bit inside.

If you want the stroke to be outside the edge, try the paint-order property.

https://www.oreilly.com/ideas/elegant-outlines-with-svg-paint-order

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

No branches or pull requests

2 participants