Skip to content
Snippets Groups Projects
Commit eb014185 authored by jsiegle's avatar jsiegle
Browse files

Switch to more sensible font-loading solution

parent 6c565191
No related branches found
No related tags found
No related merge requests found
...@@ -90,10 +90,13 @@ RecordButton::~RecordButton() ...@@ -90,10 +90,13 @@ RecordButton::~RecordButton()
CPUMeter::CPUMeter() : Label("CPU Meter","0.0"), cpu(0.0f), lastCpu(0.0f) CPUMeter::CPUMeter() : Label("CPU Meter","0.0"), cpu(0.0f), lastCpu(0.0f)
{ {
MemoryInputStream mis(BinaryData::silkscreenserialized, BinaryData::silkscreenserializedSize, false);
Typeface::Ptr typeface = new CustomTypeface(mis); font = Font("Small Text", 12, Font::plain);
font = Font(typeface);
font.setHeight(12); // MemoryInputStream mis(BinaryData::silkscreenserialized, BinaryData::silkscreenserializedSize, false);
// Typeface::Ptr typeface = new CustomTypeface(mis);
// font = Font(typeface);
// font.setHeight(12);
} }
CPUMeter::~CPUMeter() CPUMeter::~CPUMeter()
...@@ -125,10 +128,13 @@ void CPUMeter::paint(Graphics& g) ...@@ -125,10 +128,13 @@ void CPUMeter::paint(Graphics& g)
DiskSpaceMeter::DiskSpaceMeter() DiskSpaceMeter::DiskSpaceMeter()
{ {
MemoryInputStream mis(BinaryData::silkscreenserialized, BinaryData::silkscreenserializedSize, false);
Typeface::Ptr typeface = new CustomTypeface(mis); font = Font("Small Text", 12, Font::plain);
font = Font(typeface);
font.setHeight(12); // MemoryInputStream mis(BinaryData::silkscreenserialized, BinaryData::silkscreenserializedSize, false);
// Typeface::Ptr typeface = new CustomTypeface(mis);
// font = Font(typeface);
// font.setHeight(12);
} }
...@@ -161,10 +167,12 @@ void DiskSpaceMeter::paint(Graphics& g) ...@@ -161,10 +167,12 @@ void DiskSpaceMeter::paint(Graphics& g)
Clock::Clock() : isRunning(false), isRecording(false) Clock::Clock() : isRunning(false), isRecording(false)
{ {
MemoryInputStream mis(BinaryData::cpmonolightserialized, BinaryData::cpmonolightserializedSize, false); clockFont = Font("Default Light", 30, Font::plain);
Typeface::Ptr typeface = new CustomTypeface(mis);
clockFont = Font(typeface); // MemoryInputStream mis(BinaryData::cpmonolightserialized, BinaryData::cpmonolightserializedSize, false);
clockFont.setHeight(30); // Typeface::Ptr typeface = new CustomTypeface(mis);
// clockFont = Font(typeface);
// clockFont.setHeight(30);
totalTime = 0; totalTime = 0;
totalRecordTime = 0; totalRecordTime = 0;
...@@ -339,10 +347,13 @@ ControlPanel::ControlPanel(ProcessorGraph* graph_, AudioComponent* audio_) ...@@ -339,10 +347,13 @@ ControlPanel::ControlPanel(ProcessorGraph* graph_, AudioComponent* audio_)
if (1) if (1)
{ {
MemoryInputStream mis(BinaryData::misoserialized, BinaryData::misoserializedSize, false);
Typeface::Ptr typeface = new CustomTypeface(mis); font = Font("Paragraph", 13, Font::plain);
font = Font(typeface);
font.setHeight(15); // MemoryInputStream mis(BinaryData::misoserialized, BinaryData::misoserializedSize, false);
// Typeface::Ptr typeface = new CustomTypeface(mis);
// font = Font(typeface);
// font.setHeight(15);
} }
audioEditor = (AudioEditor*) graph->getAudioNode()->createEditor(); audioEditor = (AudioEditor*) graph->getAudioNode()->createEditor();
......
...@@ -41,19 +41,22 @@ ProcessorList::ProcessorList() ...@@ -41,19 +41,22 @@ ProcessorList::ProcessorList()
xBuffer(1), yBuffer(1) xBuffer(1), yBuffer(1)
{ {
MemoryInputStream mis1(BinaryData::cpmonolightserialized, listFontLight = Font("Default Light", 25, Font::plain);
BinaryData::cpmonolightserializedSize, listFontPlain = Font("Default", 20, Font::plain);
false);
Typeface::Ptr tp1 = new CustomTypeface(mis1); // MemoryInputStream mis1(BinaryData::cpmonolightserialized,
listFontLight = Font(tp1); // BinaryData::cpmonolightserializedSize,
listFontLight.setHeight(25); // false);
// Typeface::Ptr tp1 = new CustomTypeface(mis1);
MemoryInputStream mis2(BinaryData::cpmonoplainserialized, // listFontLight = Font(tp1);
BinaryData::cpmonoplainserializedSize, // listFontLight.setHeight(25);
false);
Typeface::Ptr tp2 = new CustomTypeface(mis2); // MemoryInputStream mis2(BinaryData::cpmonoplainserialized,
listFontPlain = Font(tp2); // BinaryData::cpmonoplainserializedSize,
listFontPlain.setHeight(20); // false);
// Typeface::Ptr tp2 = new CustomTypeface(mis2);
// listFontPlain = Font(tp2);
// listFontPlain.setHeight(20);
setColour(PROCESSOR_COLOR, Colour(59, 59, 59)); setColour(PROCESSOR_COLOR, Colour(59, 59, 59));
setColour(FILTER_COLOR, Colour(41, 76, 158));//Colour(255, 89, 0)); setColour(FILTER_COLOR, Colour(41, 76, 158));//Colour(255, 89, 0));
......
...@@ -424,12 +424,14 @@ EditorViewportButton::EditorViewportButton(UIComponent* ui) : UI(ui) ...@@ -424,12 +424,14 @@ EditorViewportButton::EditorViewportButton(UIComponent* ui) : UI(ui)
{ {
open = true; open = true;
MemoryInputStream mis1(BinaryData::cpmonolightserialized, buttonFont = Font("Default Light", 25, Font::plain);
BinaryData::cpmonolightserializedSize,
false); // MemoryInputStream mis1(BinaryData::cpmonolightserialized,
Typeface::Ptr tp1 = new CustomTypeface(mis1); // BinaryData::cpmonolightserializedSize,
buttonFont = Font(tp1); // false);
buttonFont.setHeight(25); // Typeface::Ptr tp1 = new CustomTypeface(mis1);
// buttonFont = Font(tp1);
// buttonFont.setHeight(25);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment