GUI mockup |
The component project itself is built on Juce, which is the framework that I'm gradually migrating most of my plugins to. For all of Juce's awesomeness, it has a few annoyances when it comes to graphics:
- The fonts, oh the humanity! Juce's font rendering is very poor, for reasons that I've never completely understood. Typefaces, though legible, do not seem to be properly anti-aliased, and do not truncate (ie, ending words with "..."). Instead of truncation, Juce crams all the text together very tightly.
- Workarounds: I will build a filmstrip for fixed width fonts, probably based on Droid Sans Mono, and a custom component to render text. This approach worked reasonably well with older plugins such as KickMaker. Labels with dynamic width text will be embedded into the background image rather than rendered dynamically with Juce.
- Knobs are simplistic and bad looking, like most of the default components which provide very ugly but functional widgets. Juce's knob style is similar to Ableton Live's, which is to say a vector-based image drawn at rotation. For realistic (aka skeumorphic) knobs, a filmstrip must be used instead.
- Workaround: I've built a new knob class which can load in filmstrips. Also I made a few handy shell scripts for stitching filmstrips, since Max exported the knob animation as single frames (which was very nice of him, as I can now choose how smooth I want the animation to be).
- When you insert graphics into a Juce project, it amalgamates them into your editor C++ file. That is, it takes the PNG graphics and turns them into C++ static const char* objects which are compiled directly into the binary. This is extremely convenient, especially on Linux & Windows where one would otherwise need to store such resources somewhere in the filesystem. However, editing that code is a complete pain because the files tend to be huge. Also this makes sharing components between plugins difficult, since the same graphics need to be imported in every project.
- Workaround: I created a single resources C++ class which contains all graphics, and an accompanying cache class which lets you load widget graphics by name. This means that the editor class usually has only one embedded graphic -- the background image. Also this class can be easily used in different plugins, which means that there is some wasted space for any unused graphics but reduces the amount of headache between sharing these graphics.