Skip to content

class "Fonts" has no member "typeface" (Juce 8.0.7) - Solved #5

Description

@gfazzito

Page 260 on the pdf, using Juce 8.0.7, the following code to add the Lato font won't work:
Image

This is because it's written Fonts::typeface instead of Fonts::typeFace. (the difference is on the "F" of "typeFace" being uppercase instead of lowercase).
The correct code then will look like this:

const juce::Typeface::Ptr Fonts::typeFace = juce::Typeface::createSystemTypefaceFor(BinaryData::LatoMedium_ttf, BinaryData::LatoMedium_ttfSize);

juce::Font Fonts::getFont(float height)
{
    return juce::Font(typeFace).withHeight(height);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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