Skip to content

Text to glyph misplaces characters from ligatures

Summary:

When converting text to glyphs, all characters that formed a ligature are placed on top of each other.

Steps to reproduce:

  • create a text and set font to "FreeSans"
  • type "ff fi" -> observe that ff and fi are joined by ligatures, if not choose a different font
  • uses text to glyphs command

What happened?

2 f from ff are placed on top of each other, f and i are also on top of each other.

What should have happened?

Not sure what the most appropriate behavior would be a) split the characters and not having them on top of each other b) treating ligature as single glyph

For something like English alphabet where ligatures are more for visually pleasing character spacing, approach a) might be more appropriate.

But I can imagine situations where the ligature creates a completely different glyph and it preferred to keep it.

workarounds

There are workarounds for both behaviors.

For approach a) user can disable ligatures before running "text to glyphs" in the features tab of "Text and font" panel. Unless it's a monospace font this will likely shift the position of everything as non ligature versions have different widths and spacing.

For approach b) user can use "object to path" and "split path". Downside is that it will be necessary to do some manual cleanup to join back dots on i and similar details.

Other thoughts

While testing this I also noticed that text selection doesn't work for characters with ligatures. This might deserve a separate issue. Inkscape only allows selecting whole ligature. In such case only way of editing it is by placing cursor after the ligature, deleting part of it using backspace and retyping.

Tested how it's handled in other programs, both firefox and LibreOffice writer supported selecting half a ligature. Seems like firefox just splits the ligature width into equal parts hoping it will work. For simple ligatures like ff fl it works well enough. For more complex ones you sometimes see in coding fonts which combine ">=" into single or double width "≥" it can get a bit janky, still better than nothing.

Sample attachments:

glyphs_ligature.svg

Version info

Inkscape 1.4.2 (ebf0e940d0, 2025-05-08)

                      Compile  (Run)
    GLib version:     2.84.2
    GTK version:      3.24.49 (3.24.49)
    glibmm version:   2.66.8
    gtkmm version:    3.24.10
    libxml2 version:  2.14.3
    libxslt version:  1.1.43
    Cairo version:    1.18.4 (1.18.4)
    Pango version:    1.56.3 (1.56.4)
    HarfBuzz version: 11.2.1 (11.2.1)

    OS version:       Arch Linux
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information