1

I have a text layer whose letter-spacing is set to a negative value, and thus letters overlap. This is my intention.

enter image description here

I transform the text layer to path and hide the original text as I don't need it anymore. The letters are made of separate closed curves whose areas overlap, mirroring their original respective positions properly.

enter image description here

However, if I will this path I'm getting holes where the characters are overlapping -- this is not what I want.

enter image description here

How can I fill them in, in general?

I've simplified the flow here, so it looks pointless to do text to path but I actually use the transform tool on the path before filling it in.

In this concrete example, a making a selection out of path and then removing holes would work, but now if there's a letter with a hole in it such as O or B, so that's out of question too, although it served me as quick workaround a couple of times.

2 Answers 2

1

Seems like GIMP 2.10.8 really has no automatic way to fill paths including their overlapping sections. I can think of two workarounds of which only one really seems to work:

Workaround 1 – Selection To Path

Instead of using Layer → Text to Path, use Layer → Transparency → Alpha to Selection followed by Select → To Path. That way you end up with an overlap-free path that can be filled as expected.

Workaround 1

Workaround 2 – Processing Paths In Another Program

If you cannot use the first Workaround because you need the letters to be separated you can post-process paths in another program, for instance Inkscape.

  • Convert the text to a path
  • Edit your path as you would normally
  • When finished, right click the path and select Copy Path (CtrlC did not work for me).
  • Open Inkscape
  • Hit CtrlV (paste path), Ctrl+ (union paths), CtrlC (copy path)
  • Back in GIMP, paste the path with CtrlV.

Unfortunately, GIMP sometimes shifts parts of pasted paths as seen in the following picture. So far I haven't found a solution to this problem.

Workaround 2

0

Wrote a little script to assist:

  1. Get and install ofn-path-edits. And read the doc.
  2. Use its Break text path apart function (not to be confused with its plain Break text path apart function). This should normally create one path per letter (you can get extra paths for diacritics but here it won't be a problem).
  3. Delete the initial path, and make sure you have one single image open, and no selection in it.
  4. Start the python console (Filters>Python-fu>Console) and enter:

    image=gimp.image_list()[0]
    

    then:

    for p in image.vectors: pdb.gimp_image_select_item(image, CHANNEL_OP_ADD,p)
    

enter image description here

Step 4 can be replaced by ofn-paths-to-selection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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