fsh::stk
fantastic spatial holophonic synthesis toolkit
Loading...
Searching...
No Matches
fsh::gui::Fonts Struct Reference

Fonts used by the GUI. More...

#include <Fonts.h>

Public Types

using Instance = juce::SharedResourcePointer<Fonts>
 Add this as a member to your component/editor class to access the fonts.
 

Public Attributes

const juce::Font h1
 Heading 1. Use for: plugin name.
 
const juce::Font h2
 Heading 2. Use for: suite name.
 
const juce::Font h3
 Heading 3. Use for: panel labels, plugin version.
 
const juce::Font h4
 Heading 4. Use for: knob/button labels.
 
const juce::Font icons
 Font Awesome Solid.
 

Detailed Description

Fonts used by the GUI.

The fonts are accessed by the Fonts::Instance type, which is a juce::SharedResourcePointer. This means that the fonts are shared across all instances of the Fonts::Instance type. Unfortunately, Linux builds fail to link the fonts correctly when using static members, so this is a workaround.

Example usage:

class ComponentClass : public juce::Component
{
public:
void paint(juce::Graphics& g) override
{
g.setFont(_fonts->h1);
g.drawText("hello world", getLocalBounds(), juce::Justification::centred);
}
private:
const Fonts::Instance _fonts;
};
juce::SharedResourcePointer< Fonts > Instance
Add this as a member to your component/editor class to access the fonts.
Definition Fonts.h:58

The documentation for this struct was generated from the following files: