Text Alignment differences between JUCE 5.4.4 and 5.4.5

Where exactly is that? Thanks.

At root level of the repository:

Just wondering if there is not something wrong there

 label.setText("Doppler", juce::dontSendNotification);
  label.setBounds(100, 100, 74, 22);
  label.setJustificationType(juce::Justification::centred);
  label.setColour(juce::Label::outlineColourId, juce::Colours::red);
  juce::File file("/Users/otristan/Desktop/BugJuce/bugFont/DIN_COND_BOLD.ttf");
  auto pStream(file.createInputStream());
  if (pStream)
  {
    juce::MemoryBlock data;
    pStream->readIntoMemoryBlock(data);
    juce::Font font(juce::Typeface::createSystemTypefaceFor(data.getData(), data.getSize()));
    label.setFont(font);
  }
  addAndMakeVisible(&label);

On OSX the following code renders like that
Screenshot 2020-05-15 at 16.10.16

Doesn’t look very centred vertically.
Using juce6 branch FWIW

Here is the font
DIN_COND_BOLD.ttf (84.5 KB)

in our production code we still use the old FreeTypeAmalgam custom font loading and display from TheVinn (Vinnie Falco) which displays the content centredLeft
Here is an example of the difference between the two
FreeType
Screenshot 2020-05-15 at 16.13.48
Juce with createSystemTypefaceFor
Screenshot 2020-05-15 at 16.14.16

Any ideas ?

Thanks !

2 Likes

I’m hitting that kind of issue with another font in another product on OSX
Screenshot 2020-08-21 at 11.09.29

This is clearly not vertically centred.
Honestly there is something fishy here.

Here is the font used
AvenirLTStd-Heavy.ttf (30.0 KB)

Finally found the issue

3 Likes