Week 12 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 twelfth week of the Google Summer Of Code 2022. I'm currently working on the font collections feature. The code of my project is available at this link.
I dedicated this week to code refactoring and bug fixes. The final submission is coming up, and I'm trying to conclude the Font Collections
feature. I worked on fewer bugs this week. The major bug was related to the text toolbar font list. Whenever the user tried to expand the popup, Inkscape used to hang for 3-5 minutes. After some debugging, I discovered that it happened because of recursive calls to init_font_families
. After some more debugging, I found that the font list in the text toolbar was getting generated in chunks. If the size of the font list was greater than 30(GROUP_SIZE
), then it made a recursive call on the same function with a different thread to generate the remaining font list whenever the resources were available.
Current Solution
I've added the related code to the comments to make the font-list consistent throughout Inkscape. Later, I'm planning to re-write this function to do the following:
- Generate the font list in chunks if its size is larger than the value of
GROUP_SIZE(previously it was 30)
.
Other Improvements
Apart from this, I also worked on the translation
of strings. I created two constants:
inline const std::string RECENTLY_USED_FONTS = "Recently Used Fonts"
inline const std::string DOCUMENT_FONTS = "Document Fonts"
to avoid problems in translations.
What's Left???
- The
font-collections
branch is yet to be merged into themaster
branch. The final code review is pending. - I haven't added the
on-canvas preview of fonts
yet. It is because I'm concluding the work on the font collections feature. Both these features deal with the same set of files. Hence, I've decided to add this feature after the font collection work is over.
I won't be available to code for three weeks starting from 8th September because of university exams(They'll be starting from 19th September). I'll be able to continue the work after exams only.
Experience At Inkscape
Working with the Inkscape community has been a wonderful experience for me. I got constant support from everybody. I learned so many new things like:
- Valgrind
- GDB
- Glade UI designing.
- Gtk signals
- Working with XML
- Resource handling API in Inkscape
- Learned proper code standards.
- I learned the importance of comments in the code.
- Advanced Git
Apart from this, I've made a healthy bond with the Inkscape community members. I'm really looking forward to continuing my journey with Inkscape even after the Google Summer Of Code.
I'd also like to thank all my mentors and the Inkscape community for their constant motivation and support. Without you guys, I'd never have been able to reach here.
Conclusion
Alright, this is it for week twelfth of Google Summer of Code. This week was mostly about bug fixes, code reviews and code refactoring. 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.