Stroke around outside of fill, instead of inside border

Post questions on how to use or achieve an effect in Inkscape.
seans_potato_biz
Posts: 138
Joined: Mon Apr 07, 2008 6:01 am

Stroke around outside of fill, instead of inside border

Postby seans_potato_biz » Wed Oct 29, 2008 9:12 am

I have applied a stroke to my text but the stroke sort of "eats into" the text which is bad for the aesthetic of the font. Is it possible to make the stroke just go around the outside of the text?
Win 7/10, Inkscape 0.92.2

We don't inherit the Earth from our parents; we borrow it from our children.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Stroke around outside of fill, instead of inside border

Postby microUgly » Wed Oct 29, 2008 9:18 am

Unfortunately this is the only stroke style SVG allows. You can try using "offset" functions instead, or compensate by making the object half a stroke larger.

There have been a few posts about this so you might like to search the forum for "stroke outside" or "stroke inside" for topics that might have more useful information for you.

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: Stroke around outside of fill, instead of inside border

Postby Simarilius » Wed Oct 29, 2008 9:21 am

If you have a solid fill you can fake it by duplicating the text, and then turning off the stroke on the top copy. If you play with clones a bit you can make this linked and so it will stay editable as text.

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: Stroke around outside of fill, instead of inside border

Postby Simarilius » Wed Oct 29, 2008 9:44 am

wasnt sure that last post would make sense, so heres a quick demo:

Image

http://john.cliff.googlepages.com/outstroke.svg

the editable original is on its own layer, the end result is on a locked seperate layer, edit the text of the original and the end result will update.
To change the colors unlock the layer and change the fill/stroke of the clones.

User avatar
aho
Posts: 180
Joined: Sun Nov 04, 2007 9:51 am
Contact:

Re: Stroke around outside of fill, instead of inside border

Postby aho » Wed Oct 29, 2008 10:37 am

1. Unset all styles (XML editor... delete the style attribute).
2. Create a clone, set the fill.
3. Select original.
4. Clone.
5. Move it down (below the "fill clone" or below the original).
6. Set the stroke (e.g. 4px for a 2px outline).

Example:
http://kaioa.com/svg/fatten.png

Here the "fill clone" also got a stroke in the same color as its fill color. This makes the text bolder. The "outline clone" uses a really fat stroke. E.g. if the "fill clone" was made bolder by 2px (4px stroke) you need a 8px stroke for a 2px outline (8/2-4/2=2).

Hint: you may need to tweak the miter-limit (stroke style tab) for optimal results.


Return to “Help with using Inkscape”