Inkscape takes a long time reading the gsub table of Calibri

Migrated from: https://bugs.launchpad.net/inkscape/+bug/1804860

Steps to reproduce:

  • open Inkscape and create a piece of text
  • change the font to Calibri (or other font with large gsub table)

What happened?

  • UI becomes unresponsive for up to 30 seconds

Comment from Patrick Storz (ede123) on original bug:
"I've seen this issue, too, also with other fonts. Simply selecting a different font in the font list (using text tool) takes a considerable amount of time (i.e. seconds).

This seems to be a fairly recent regression in master. 0.92.x built with identical library versions is unaffected, ruling out a regression with fontconfig / pango.

Also this seems not limited to Windows, Jabier reported experiencing this on Liunux, too... I suspect either OpenType font feature handling or the recent changes to SPStyle."

Inkscape Version and Operating System:

  • Inkscape Version: 1.0alpha (d7d7b92)
  • Operating System: Windows 10
  • Operating System version: 1803
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information