Undesired artifacts when using text outlines with arabic text
Environment/Versions
- GIMP version: 2.99.16
- Package: Flatpak beta
- Operating System: Fedora Linux 38
Description of the bug
Arabic and languages that uses similar alphabets (like Persian and Urdu) follow cursive writing where the letters are joined together.
When writing Arabic letters there are 4 contextual forms depending on the position of the letter in the word
The current way of doing text outlines works fine for arabic letters in isolated form but in joined form the following should happen:
- In the initial form the letter shouldn't have an ending edge as it get connected to the next letter
- In the medial form the letter shouldn't have neither a starting edge nor an ending edge
- In the final form the letter shouldn't have a starting edge
Currently text outlines display some rectangular artifacts due to the overlapping of these unnecessary starting and ending edges when joining letters . I provided images that better demonstrate the issue below
Reproduction
Is the bug reproducible?
yes
Reproduction steps:
- Use the text tool and write some arabic text
- set the style to "outlined" or "outlined and filled"
- observe the artifacts
Expected result:
In Godot 4.x
Actual result:
In Gimp 2.99.16
Additional information
Since Godot 4 gets arabic text outlines right I recommend looking into their implementation or reaching out to Godot contributors to see how they did it
hopefully this pull request can provide a good starting point: Text server in godot 4.0