1

I'm trying to make a single path by taking the difference between a polygon and a text letter, but when I perform the Path > Difference the hole that is made in the polygon is much smaller than the original letter.

I have tried converting the text to a path using Stroke to Path and Object to Path to no avail. I also tried creating an intersection of the text and polygon, but the resulting letter-path was larger than the original letter.

How can I punch a hole in this polygon using the outline of a letter?

Here's a picture of the result I'm getting now:

enter image description here

  • 1
    Compound Path (Ctrl+K / Cmd+K) – Ryan Nov 17 '15 at 15:54
  • @Ryan Thanks! It's called Combine Path in my version of Inkscape, but I combined, then broke them apart, and was able to make a difference of the resulting paths and get the result I'm looking for. If you write your comment as an answer I will accept it! – Erik Gillespie Nov 17 '15 at 16:03
2

I don't know Inkscape but its usually called Compound Path and this official guide tells me it exists in Inkscape.

Inkscape can Combine paths into a compound path (Ctrl+K) and Break Apart a compound path into separate paths (Shift+Ctrl+K). Try these commands on the above examples. Since an object can only have one fill and stroke, a new compound path gets the style of the first (lowest in z-order) object being combined.

I'd make the letter into an Outline which you say you've done. Then with it on top of the shape and both selected would try hitting Ctrl / Cmd+K.

1

I guess I can explain what's going on.

I can draw a polygon, put a character on top, mark both in path mode (1) and convert to path (2) (after making a copy):

enter image description here

The copy is made to put the character again into the polygon, which fits exactly in my case. I prove this, by putting the character which is opaque to the bottom and with 3 red, opaque rectangles, the top one on top, the second is below the transparent polygon but above the yellow character, and the third is below both of them. I guess you experience like me an optical illusion, which makes the overlapping of yellow G and red bar look orange, but I assure you, it is pure red, which is visible in the second image, where I moved the bars to fit together - you see, it is one red color.

enter image description here

I guess I found the reason, why creating a differnce didn't work for you: Your shape has a border in the same color. Half of the border width goes into the polygon, half of its width goes to the outside. If you create the difference, the inner hole gets a border too, and the border is partly ranging into the hole. I made a very thick, green border, to show the effekt (the lower two objects). The green G is the shape of the hole in the polygon. The black character 'G', which is copied into the picture again and put below in z-order, only shines through through the transparent, green border. Only a very small part is not covered by the border and remains black.

If the character has a border too, it will cause a similar effect in the opposite direction. So the difference is too big or to small.

The conclusion is, that you may work in the way Ryan explained or with polygons and characters without border.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.