DESOSA 2021

Variability in Inkscape

Inkscape is an application that is used to design vector images. There exist a lot of different users of vector images; from a web-designer in need of simple icons, to a CNC cutting hobbyist, to a professional graphics designer. All these stakeholders have diverse needs and priorities in what they require from Inkscape. Therefore, Inkscape greatly benefits from a high level of variability. The ability to install Inkscape on the three main Operating Systems, Inkscape’s extensibility, and the configurability of the user interface are all aspects that define Inkscape and are useful to its stakeholders. In this essay we will explore and analyze the most important variability aspects of Inkscape, an overview of which is given in the feature model below.

Platforms

Inkscape supports three major platforms: GNU/Linux, Windows, and macOS. Support for these is required as users on any platform should be able to use Inkscape. The correct distribution for each platform can be downloaded directly from the Inkscape download page 1 and installed via the instructions on the wiki 2.

Users can acquire Inkscape on GNU/Linux as an executable (AppImage), a Flatpak, or an archive (PPA). On Windows, it can be downloaded as a 32-bit executable, a 64-bit executable, or as a Windows Store application. For macOS, Inkscape is provided in the form of a DMG file, which can be installed in the same manner as any other application. Unfortunately, macOS support has only recently been updated, and is not yet feature-complete 3. One of the problems that remains is the signing of the DMG file. Meaning that the OS may not allow the application to be installed without explicit confirmation from the user that it is safe to do so.

Finally, it is possible to compile Inkscape’s source code, either by downloading it as a compressed archive or cloning it from their Gitlab repository 4. This may be required when no distribution for the user’s platform is provided, or when the user requires certain core features to be enabled or disabled.

Compilation

The compilation of Inkscape comes with many options. Most prominent are the choice of C++ standard and build type. But there are other development and user specific options as well.

Currently, Inkscape is transitioning from c++11 to c++17. While the source code is not yet fully compatible, the option to compile the code using c++17 is already made available to developers such that they can use the new features that come with it.

The build type can be any of: None, Debug, Release, MinSizeRel, RelWithDebInfo, and Strict. Choosing None will cause the C/C++ compiler to use the default, system-wide, compilation flags. Debug includes additional debug information in the build, allowing its execution and memory to be monitored more closely. The Release build option optimizes Inkscape for performance, and MinSizeRel optimizes it for binary (file) size. The RelWithDebInfo type can be used to optimize for performance, but simultaneously includes the debug info required to properly monitor the application. Finally, the Strict build type can be used to compile Inkscape with extensive checking for deprecated code. This option is especially useful to developers who are working on the transition to c++17.

Development options

Besides the choice of C++ standard and build type, there is a number of options in the compilation process that can help improve the workflow of developers. For example, when compiling on Windows, it is possible to enable lazy compilation messages. This significantly speeds up the compilation process at the cost of delayed status information.

The most important options are: Profiling, Address Sanitization, Fuzzing, and Relocatable Binaries. These can be used to gather performance data, to improve security, and to optimize the consistency of Inkscape’s performance.

Building the unit tests and license header checks can also be enabled and disabled during the compilation process. However, we do not consider these features of Inkscape as they produce individual binaries that are not distributed to users.

User options

Then, there are the options that are essential to the users of Inkscape. These are the support for raster extensions, which are required for manipulating vector graphics using filters and transformations normally performed on raster images, native language support, which allows users to change the user interface language to any of the supported languages, the inclusion of a spell checker for text written using Inkscape’s included text rendering tools, a PDF preview, which can be used instead of the SVG preview normally rendered using Cairo, and finally diagram support, which can be any combination of support for CorelDRAW, Microsoft Visio, and WordPerfect.

Extensions

The ability to add extensions provides Inkscape with a lot of variability. We gave an overview of how extensions work in the previous blog posts. Now, we explain how extensions open many options for both the users and the developers.

Provided Variability

Inkscape allows extensions to be installed during load-time. Users can download any extension from the Inkscape Gallery5 and copy the .zip file to a specific directory. After a restart of Inkscape, the new extension will be available for use.

Inkscape allows extensions to be of the below four types.6

  • Input (read a file / data)
  • Output (write a file / data)
  • Effect (change contents in the document)
  • Print (output to an external device)

The support of extensions gives a unique variability aspect in the sense that there are very few restrictions on what an extension can do. It can provide a completely new option working on a completely different subdomain. At the time of writing, there are 164 extensions listed in the gallery. Inkscape itself comes preloaded with quite a few extensions as can be seen below.

Each extension further gives options to the user on how it can be used. The below image shows the many options that are possible for an extension that generates geometrical grids.

Other highly popular extensions available in the Gallery are shown in the below image. As we can infer from the extensions' name, their functionalities vary a lot.

Realization of the Variability

Extensions can be implemented in two ways6:

  • Internally using C++ by directly modifying Inkscape’s codebase
  • Externally using scripts written in various languages, for example python is used very often.7

Extensions are added by using Inkscape Extension Definition Files (.inx) which define them using XML.8 Using a simple GUI for user input, parameters are supplied to the extensions. These include:

  • int (integer number input field)
  • string (text input field)
  • float (float number input field)
  • boolean (checkbox)
  • enum (dropdown list)
  • optiongroup (dropdown list)
  • color (color selector)

The UI can also be altered using the following two parameters:

  • description (for descriptions below parameters)
  • notebook (for tabs)

Some extensions may depend on other programs, that will need to be installed for them to work correctly. These dependencies are specified by the extension developers.

Benefit to Stakeholders

For a developer, it becomes easy to implement a requirement that has a different domain. Instead of having to write the complete functionality of a graphics editor, they can focus on just creating extensions that add options to the existing software. Also, it helps users-turned-developers to help other people in alternate domains. Inkscape recognizes and encourages this as can be seen in their guide to create extensions9 where they write.

First of all: don’t worry too much about the code quality or the importance of the problem your extension can help solve. It might still be useful for someone - or someone may help you fix the issues, when they know about them.

For instance, one of the most used extension available in the Inkscape Gallery is Lasercut Jigsaw10 which allows a user to design puzzle pieces that can be then laser cut. The fact that this is one of the most used extension shows that even such niche applications get used by quite some number of users, and thus portrays a clear advantage how the extra variability helps Inkscape.

Graphical User Interface

Various preferences add variability to Inkscape by meeting the needs of different user groups.

Themes and icons

The user can change Inkscape’s theme and its icons to their liking. Changing the theme is done at run-time, meaning that a restart is not necessary and that the changes are applied instantaneously. The same holds for changing the icons. Their appearance can also be changed at run-time. However, their size cannot and requires a restart of the application. Changing icon sizes requires all other user interface elements to be resized as well, which is more easily done at load-time.

Being able to change Inkscape’s theme can be beneficial to users, for example for those that require a higher contrast representation due to visual impairment, or larger icons, in case they are using a drawing tablet.

Inkscape also allows additional themes and icons to be loaded as resources.11 These can be defined as configuration files, further increases the customizability of the user interface.

Translations

The interface of Inkscape can be translated into different languages.12 This variability is managed by using a portable object file (.po) for each language, which users from the community can contribute to. At the time of writing, 88 languages were available. This makes Inkscape accessible to people all around the world who speak different languages. Changing the language is load time binding and requires a restart to change.

Conclusion

Inkscape’s variability shows up in both its functionality and its aesthetics. It is important to all stakeholders that they are able to alter these to fit their personal workflow. Furthermore, Inkscape’s ability to be run on Windows, MacOS, and Linux makes it accessible to everyone.

This was our final essay on Inkscape, we hope you enjoyed reading it!


  1. Download page - https://inkscape.org/release/inkscape-1.0.2/ ↩︎

  2. Installing Inkscape - https://wiki.inkscape.org/wiki/index.php/Installing_Inkscape ↩︎

  3. MacOS alpha - https://wiki.inkscape.org/wiki/index.php?title=MacOS_alpha ↩︎

  4. Gitlab repository - https://gitlab.com/inkscape/inkscape ↩︎

  5. Inkscape Gallery - https://inkscape.org/gallery/=extension/ ↩︎

  6. Inkscape implementation types - https://inkscape.org/develop/extensions/#extension-implementation ↩︎

  7. XSLT Wiki - https://en.wikipedia.org/wiki/XSLT ↩︎

  8. Inkscape INX Files - https://wiki.inkscape.org/wiki/index.php?title=INX_extension_descriptor_format ↩︎

  9. Inkscape Extension developer guide - https://inkscape.org/develop/extensions/ ↩︎

  10. Lasercut Jigsaw - Inkscape extension - https://inkscape.org/~Neon22/%E2%98%85lasercut-jigsaw ↩︎

  11. Resources importing source code - https://inkscape.gitlab.io/inkscape/doxygen/resource_8cpp_source.html ↩︎

  12. Translations - https://inkscape.org/contribute/translations/ ↩︎

Inkscape
Authors
Isar Meijer
Sourav Mohapatra
Vivian Dsouza
Wessel van de Brug