Inkscape takes a long time reading the gsub table of Calibri

Bug #1804860 reported by Roland Illig
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

0.92+devel (ad33df1, 2018-11-17)
Windows 10

Whenever Inkscape loads the Calibri font (which is known to have a rather large gsub table), the UI becomes unresponsive. A typical stack trace during that time looks like this:

libfreetype-6.dll!TT_New_Context+0x1ced9
libfreetype-6.dll!TT_New_Context+0x1d6c5
libfreetype-6.dll!FT_Get_Char_Index+0x20
libharfbuzz-0.dll!hb_glib_blob_create+0x864
libharfbuzz-0.dll!hb_font_get_nominal_glyph+0x28
libinkscape_base.dll!Z21readOpenTypeGsubTableP11FT_FaceRec_RSt3mapIN4Glib7ustringE14OTSubstitutionSt4lessIS3_ESaISt4pairIKS3_S4_EEE+0xb93
libinkscape_base.dll!ZN13font_instance11InitTheFaceEv+0xab
libinkscape_base.dll!ZN13font_instance11InstallFaceEP10_PangoFont+0x16
libinkscape_base.dll!ZN12font_factory4FaceEP21_PangoFontDescriptionb+0x1b3
libinkscape_base.dll!ZNK8Inkscape4Text6Layout21InputStreamTextSource20styleGetFontInstanceEv+0x4b
libinkscape_base.dll!ZNK8Inkscape4Text6Layout10Calculator29_buildPangoItemizationForParaEPNS2_13ParagraphInfoE+0x35c
libinkscape_base.dll!ZN8Inkscape4Text6Layout10Calculator9calculateEv+0x24d
libinkscape_base.dll!ZN8Inkscape4Text6Layout13calculateFlowEv+0x1b
libinkscape_base.dll!ZN6SPText13rebuildLayoutEv+0x104
libinkscape_base.dll!Z30te_update_layout_now_recursiveP6SPItem+0xa6
libinkscape_base.dll!ZN8Inkscape2UI20ClipboardManagerImpl10_pasteTextEP9SPDesktop+0x3c8
libinkscape_base.dll!ZN8Inkscape2UI20ClipboardManagerImpl5pasteEP9SPDesktopb+0x81
libinkscape_base.dll!Z18sp_selection_pasteP9SPDesktopb+0x21
libinkscape_base.dll!Z17sp_action_performP8SPActionPv+0x21a
libinkscape_base.dll!Z18sp_shortcut_invokejPN8Inkscape2UI4View4ViewE+0xba

As you can see from the stacktrace, I pressed Ctrl+V when a small Calibri text was in the clipboard. The freezes typically last for about 30 seconds.

Revision history for this message
Patrick Storz (ede123) wrote :

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've subscribed Tav, as he might know what is causing it. I suspect either OpenType font feature handling or the recent changes to SPStyle.

Changed in inkscape:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.0
tags: added: fonts performance
Changed in inkscape:
importance: High → Medium
tags: added: bug-migration
Revision history for this message
Firoz Taverbi (firoztaverbi) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new
bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at
http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/issues/440
Closed by: https://gitlab.com/firoztaverbi

Changed in inkscape:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.