JUCE_MAJOR_VERSION still reads 8 on juce9 branch

Been testing the juce9 branch and hit some things that make it hard to properly evaluate. Posting separately since the announcement thread got no response on these.

JUCE_MAJOR_VERSION is still 8

FigBug already pointed this out in the announcement thread and got a bunch of likes, but juce_StandardHeader.h hasn’t been touched since the branch went up over a month ago.

Without this macro being correct, you can’t use #if JUCE_MAJOR_VERSION >= 9 guards to test new APIs while keeping your JUCE 8 code intact. But it goes further than your own code; third-party modules that support JUCE (Gin being the obvious example, ironically maintained by the same FigBug who flagged this) use the same guards to protect against missing or changed functions. With the macro wrong, those modules can’t guard correctly either, which means you’d need to fork and patch every third-party module you depend on just to get a working build. The more modules you use, the worse this gets. Right now it’s not just inconvenient to test the branch, it’s practically impossible if your project has any external dependencies.

It’s a one-line fix.

DrawableComposite is missing setTransformToFit and getOutlineAsPath

SVGs now come back as DrawableComposite instead of Drawable, but the two most useful helpers didn’t make the move. For anyone using SVGs as icons - extracting the path, scaling it, rendering it in any colour - the workaround is an ugly loop through child drawables with manual transform accumulation. These two functions on DrawableComposite would fix that immediately.

Font weight needs a withWeight() call

The font variant demo loops through whatever axes it finds and builds sliders dynamically. Fine for a demo, but not much help when you just want to set a specific weight. font.withHeight() already does exactly this for size; returns a copy with the new value, nothing more to it. Weight is the most common axis anyone will actually use and there’s no equivalent. A withWeight() following the same pattern as withHeight() would be enough.

Has any of this been looked at internally?

3 Likes

I’ve updated JUCE_MAJOR_VERSION on the juce9 branch. We’ll look at the other issues.

Thank you. This motivates me to give it another go.