Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Initializing font takes a long time

Tags:

python

pygame

Initializing font takes a long time. Here I am initializing the Arial font to be used later in the program:

pygame.font.SysFont("Arial", 30)

However this takes about 30 seconds to execute every time I start up the program. Is this supposed to happen?

I'm testing it on macOS Sierra.

like image 591
Derek 朕會功夫 Avatar asked Mar 21 '26 02:03

Derek 朕會功夫


1 Answers

Apparently the issue was caused by fc-cache in XQuartz not able to cache fonts properly (Bug 97546). After updating XQuartz from 2.7.10 to 2.7.11 the speed is back to normal.

like image 109
Derek 朕會功夫 Avatar answered Mar 23 '26 15:03

Derek 朕會功夫



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!