Strum / Strums_Mental_VCV_Modules

Strum's Mental Modules for VCV Rack
BSD 3-Clause "New" or "Revised" License
63 stars 15 forks source link

v2 needs font handling update #57

Closed cschol closed 1 day ago

cschol commented 2 years ago

These instances of font handling need update per the v2 API. They currently cause the VST to crash.

References to fonts cannot be stored across frames in v2.

src/MentalCounters.cpp
132-
133-  NumberDisplayWidget3()
134-  {
135:    font = APP->window->loadFont(asset::plugin(pluginInstance, "res/Segment7Standard.ttf"));
136-  };
137-
138-  void draw(const DrawArgs& args) override

src/MentalMasterClock.cpp
229-
230-  NumberDisplayWidget2()
231-  {
232:    font = APP->window->loadFont(asset::plugin(pluginInstance, "res/Segment7Standard.ttf"));
233-  };
234-
235-  void draw(const DrawArgs& args) override

src/MentalKnobs.cpp
161-  std::shared_ptr<Font> font;
162-
163-  NumberDisplayWidget4() {
164:    font = APP->window->loadFont(asset::plugin(pluginInstance, "res/Segment7Standard.ttf"));
165-  };
166-
167-  void draw(const DrawArgs& args) override

src/MentalGateMaker.cpp
160-  std::shared_ptr<Font> font;
161-
162-  NumberDisplayWidget() {
163:    font = APP->window->loadFont(asset::plugin(pluginInstance, "res/Segment7Standard.ttf"));
164-  };
165-
166-  void draw(const DrawArgs& args) override