Week 9 Summary
Introduction
Hi, I am Vaibhav Malik, a Google Summer Of Code contributor and developer at Inkscape. In this blog, I've described the work that I've done during the ninth week of the Google Summer Of Code 2022. I'm currently working on the font collections feature. You can go through the code that I've written by visiting this link
August 8
This week started with a deadlock situation. I was about to conclude the work on the font collections when Mikekov reported that Inkscape froze when he tried to use the font collections. I was surprised to hear this because I never encountered any speed-related problem with the font collections. Mikekov also said that he had almost 2000-3000 fonts installed on his PC. After some debugging, I found that this happens because of the TreeStore. As I mentioned in my previous blogs, I changed the structure of the font list from the ListStore to the TreeStore. I also got rid of the style's treeview. Now, the font styles are present as the children of each font. It resulted in the size of the font list of the order 10000. Whenever the TreeStore was to clear all the font entries, Inkscape used to freeze. The clear()
function defined in the Gtk::TreeStore was the cause of this behaviour. I tried to improve the speed of clearing the font list with a TreeStore structure using some standards. Nothing solved the problem.
Screencast
August 9
I spent the whole day searching for potential solutions to fix this lag. I also planned to create a new branch and start everything from scratch. The worst case would be that I'll need to do a lot of refactoring.
August 10
Today, I created a new branch: font-collections. I copy pasted the font collections, document fonts, recently-used fonts, and the font-collections-selector logic files. This time I started working on the "Font Collections Manager" dialogue. I created the glade design and added some minor commits.
August 11
Today, I linked the "Font Collections Manager" dialogue with the "Text and Font" dialogue.
August 12
Added the font search functionality to both the dialogues. Added the ListBox widget to display collections in a popover widget in the Text and Font dialogue.
August 13
Today, I created a new MR on GitLab. And added minor bug fixes to my code.
August 14
I added more improvements to the "Font Collections Manager" dialogue.
This is how it looks after week 9
Conclusion
So, this concludes week nine of Google Summer of Code. Because of the deadlock I mentioned earlier, I had to change my approach. And this week was very hectic for me. For better testing and development, I installed all the Google Fonts available on the internet. In the coming weeks, I'll try to fix all the bugs and start implementing the live preview of the fonts feature. Thanks for reading. Stay tuned for more updates.
Subscribe to my newsletter
Read articles from Vaibhav Malik directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Vaibhav Malik
Vaibhav Malik
Hello, I'm Vaibhav Malik, an enthusiast of open-source projects. I have been a GSoC mentee for Inkscape in both 2022 and 2023. Presently, I am delving into the dynamic realm of cloud-native applications.