Skip to content

[Bug]: juce::Typeface::createSystemTypefaceFor returns no Font with OTF Font Type #1475

@francescopellegrni

Description

@francescopellegrni

Detailed steps on how to reproduce the bug

` auto reloadRegular = juce::Typeface::createSystemTypefaceFor(BinaryData::ReloadRegular_otf, BinaryData::ReloadRegular_otfSize);

auto ff = juce::Font(reloadLight);

            auto fontRescaleSize = juce::jmap<float>(pluginWidth, 763, 1970, 12.f, 30.f);
            
            ff.setSizeAndStyle(fontRescaleSize, "Light", 1.f, -0.01f);
            //ff.setSizeAndStyle(18.f, "Light", 1.f, -0.01f);
            g.setFont(ff);
            g.drawText(juce::String(rswl->getValue(), rswl->getName() == "Gain" ? 1 : rswl->getName() == "Spread" ? 2 : rswl->getName() == "Width" ? 0 : rswl->getName() == "Limiter" && rswl->getValue()<=99.9f ? 1 : 0), 0 + (x * 0.13f), 0 + (y * 0.056f), rw, rw, juce::Justification::centred);`

Working in both JUCE 6 and 7, but stopped working in juce 8.

version 8.0.4 - Xcode 16 - Sequoia

What is the expected behaviour?

Have the text with the off font.

Operating systems

macOS

What versions of the operating systems?

16

Architectures

x86_64, Arm64/aarch64

Stacktrace

No response

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

I have not tested against the develop branch

Code of Conduct

  • I agree to follow the Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions