sudara / melatonin_inspector

A JUCE module that gives you the ability to inspect and visually edit (non-destructively) components in your UI.
MIT License
145 stars 17 forks source link

Crashes if the Verdana font is missing #120

Closed ianloic closed 2 months ago

ianloic commented 2 months ago

Hi,

I wanted to give this awesome tool a try but it made my JUCE app crash at startup. I debugged it and traced it down to this assertion because the melatonin_inspector was asking for the "Verdana" font which my Linux machine didn't have. I worked out how to install Verdana and now it works great!

It would be great to either mention in the documentation that you need to have Verdana, or have some kind of fall-back mechanism for font selection (no idea how - I'm very new to JUCE) or use one of the default fonts (juce::font::getDefaultSansSerifFontName()).

Thanks for the great tool!

sudara commented 2 months ago

Thank you for this, I don't personally test on linux, though there are tests on linux. I'll have to make sure those are properly opening the app, I think I recently removed the "run and screenshot" there (or maybe verdana is default on the github runners).

Falling back to juce::font::getDefaultSansSerifFontName() sounds great. Will happily merge a PR for that if you are in the mood! Otherwise I'll take a look next time I'm working on the tool.

Thanks again for the report — hope the tool is worth it so far!

ianloic commented 2 months ago

I'm quite unfamiliar with GitHub workflows. Let me know if the code (and process) looks good.