Text tool takes a while to load

Bug #1311873 reported by Zack Zatkin-Gold
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

When I click the Text tool when starting up Pinta, it takes a while for it to actually be usable. I think it has to do with my system having a lot of fonts. Perhaps Pinta is taking a significantly long time loading the font families?

OS: Arch Linux (kernel 3.14.1-1-ARCH #1)
Pinta version: 1.4

Let me know if there's any other information necessary to assist. Thanks!

Tags: gtk3 text-tool
Revision history for this message
Cameron White (cameronwhite91) wrote :

How many fonts do you have on your system?

For me (fairly standard Ubuntu installation) there are about 150 fonts and I get a very slight delay the first time the tool is loaded (so it's definitely something that could be improved).

Changed in pinta:
importance: Undecided → Medium
milestone: none → 1.6
status: New → Triaged
tags: added: text-tool
Revision history for this message
Zack Zatkin-Gold (zg) wrote :

I have 302 fonts installed.

Changed in pinta:
milestone: 1.6 → 1.7
Revision history for this message
Michael Bloom (mabloom) wrote :

I'm running UbuntuStudio, and have not explicitly added any fonts myself.

The system has nearly 5200 fonts installed (not counting what's in ".ttc" collections).

I experience the slowness Zack reported, but it is much worse when I try to change fonts.

I haven't timed it, but if something non-trivial is running (such as chromium, with it's constant barrage of ridiculously copious redundant system calls and clearly unplanned timeout reads following polls that timed out with no descriptors ready), I can microwave water for instant coffee before the font menu gets populated (I'm assuming that's what I'm waiting for, anyway).

This condition makes the Text functionality in Pinta quite uncomfortable to use for all but the most trivial purposes.

Revision history for this message
Andrés E Sampaulo (asampau) wrote :

I have similar issue running new installation from Ubuntu 20.04. I choose minimal install I installed pinta via apt-get install pinta.
Can anyone help me what can I do?
Thanks in advance.

Revision history for this message
Cameron White (cameronwhite91) wrote :

See also Bug #1873628

Revision history for this message
Cameron White (cameronwhite91) wrote :

I looked into this more, and (at least on my OSX machine) the couple seconds of lag is due to drawing all of the font previews for the combo box entries (https://github.com/PintaProject/Pinta/blob/7dcd1794470e985fd3a1f937ffbea46406988e7e/Pinta.Core/Extensions/ToolBarFontComboBox.cs#L54).
GTK seems to be triggering this before the combo box is actually opened up, and is trying to render the preview for every single font.

I'm not sure there's too much we can directly do - we might need to consider alternate approaches for the UI (e.g. use https://developer.gnome.org/gtk3/stable/GtkFontButton.html to instead launch the standard font selection dialog). Or maybe this performance issue will be fixed entirely in GTK3...

Changed in pinta:
milestone: 1.7 → none
tags: added: gtk3
Revision history for this message
Cameron White (cameronwhite91) wrote :

Attached an example of what the font button approach would look like.

Revision history for this message
Cameron White (cameronwhite91) wrote :

This is also related to bug 1866653

Changed in pinta:
milestone: none → 1.8
Revision history for this message
Cameron White (cameronwhite91) wrote :
Changed in pinta:
status: Triaged → Fix Committed
Revision history for this message
Dan Dascalescu (ddascalescu+launchpad) wrote :

Even though Pinta fixed this, I think we should not ignore the underlying problem - hundreds or thousands of fonts installed by default on Ubuntu systems, the *vast* majority of which we don't need, as they are far-eastern scripts.

I've been trying to persuade distro maintainers to provide an option to only install fonts relevant to the selected locale, or at least Latin fonts as a fallback option if that's too complicated.

Ubuntu - https://discourse.ubuntu.com/t/excessive-fonts-installed-by-default/20924

Kubuntu - https://www.kubuntuforums.net/showthread.php/77868-How-can-we-reduce-the-crapton-of-fonts-installed-by-default

Mint - https://forums.linuxmint.com/viewtopic.php?f=29&t=339442

I could use some support over there. People seem to be very triggered by my proposal.

Changed in pinta:
status: Fix Committed → Fix Released
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.