I have text on top of some shapes. I want the fill of the text to not only be transparent, but also create a "hole" through any underlying shapes.
For example, let's say there's text on top of green boxes, with the resulting SVG used on a stainless steel surface. I want the text to have "stainless steel" fill (and black stroke). If I use "X" fill, the green boxes will come through.
Is there an easy way to do this or do I have to resort to path manipulation? For now, I'm converting to a bitmap and then using the fill color for transparency. I'd prefer an SVG solution.
Thank you, Freek. I was hoping to avoid doing that so that I can easily move/change the text without having to go through path manipulation each time. Looks like it's time to script...
The linked Boolean Operation feels like a workable solution but you're right; it's wonky. In my Inkscape 1.1, it has wild behaviors with some of the paths.
There's no way to say "Make the fill of this text/object transparent through whatever is under it." Getting the effect takes multiple steps each time the text is changed. A script would make it easy to perform those steps.
Fortunately I solved the immediate need that I have.
I have text on top of some shapes. I want the fill of the text to not only be transparent, but also create a "hole" through any underlying shapes.
For example, let's say there's text on top of green boxes, with the resulting SVG used on a stainless steel surface. I want the text to have "stainless steel" fill (and black stroke). If I use "X" fill, the green boxes will come through.
Is there an easy way to do this or do I have to resort to path manipulation? For now, I'm converting to a bitmap and then using the fill color for transparency. I'd prefer an SVG solution.
That is a relatively easy boolean operation
If you select the text and the green box and go to Path > Difference (shortcut "Ctrl" + "-") it will cut out the shape of the text from the green box.
Thank you, Freek. I was hoping to avoid doing that so that I can easily move/change the text without having to go through path manipulation each time. Looks like it's time to script...
Oops! Sorry, *Freerk*.
There is a way to do this while keeping the ability to change the text allthough I find it very wonky, meaning it doesn't always update properly.
Select the text and hit ctrl + C
Select the green box go to Path > Path Effects and hit the + button there,
Select Boolean operation
In the Boolean operation menu select as "operand path" the option "link to item" and select "difference" in the drop down for Operation.
The linked Boolean Operation feels like a workable solution but you're right; it's wonky. In my Inkscape 1.1, it has wild behaviors with some of the paths.
Still looking for a simple solution...
Inkscape 1.2 fixes the funky Boolean Operation behavior. That was a good upgrade.
Here are the steps I used:
The reason that I duplicated the text after selecting it is so that I would get the stroke after using the other copy of the text to make the hole.
This is still not a simple, easily modified solution, but it works for now.
Why script...? What's the big picture here?
There's no way to say "Make the fill of this text/object transparent through whatever is under it." Getting the effect takes multiple steps each time the text is changed. A script would make it easy to perform those steps.
Fortunately I solved the immediate need that I have.