1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

Font: Deprecate old Font constructors

This commit is contained in:
reuk 2024-03-19 20:32:19 +00:00
parent 2ed9b84070
commit 4f2c287f9b
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
95 changed files with 428 additions and 209 deletions

View file

@ -82,7 +82,7 @@ static void drawTextLayout (Graphics& g, Component& owner, StringRef text, const
AttributedString attributedString { text };
attributedString.setColour (textColour);
attributedString.setFont ((float) textBounds.getHeight() * 0.6f);
attributedString.setFont (FontOptions { (float) textBounds.getHeight() * 0.6f });
attributedString.setJustification (Justification::centredLeft);
attributedString.setWordWrap (AttributedString::WordWrap::none);

View file

@ -109,7 +109,7 @@ void MPEKeyboardComponent::drawWhiteKey (int midiNoteNumber, Graphics& g, Rectan
auto text = MidiMessage::getMidiNoteName (midiNoteNumber, true, true, getOctaveForMiddleC());
g.setColour (findColour (textLabelColourId));
g.setFont (Font (fontHeight).withHorizontalScale (0.8f));
g.setFont (Font (FontOptions { fontHeight }).withHorizontalScale (0.8f));
switch (getOrientation())
{

View file

@ -379,7 +379,7 @@ void MidiKeyboardComponent::drawWhiteNote (int midiNoteNumber, Graphics& g, Rect
auto fontHeight = jmin (12.0f, getKeyWidth() * 0.9f);
g.setColour (textColour);
g.setFont (Font (fontHeight).withHorizontalScale (0.8f));
g.setFont (Font (FontOptions { fontHeight }).withHorizontalScale (0.8f));
switch (currentOrientation)
{