Juce plugin interface

I have a gain plugin with the name on the interface but when i compile it into logic pro the words move upwards here is the code, Does someone no what is wrong ? Thanks

void GainAudioProcessorEditor::paint (juce::Graphics& g)

{

// (Our component is opaque, so we must completely fill the background with a solid colour)





g.fillAll (getLookAndFeel().findColour (juce::ResizableWindow::backgroundColourId));



g.setColour (juce::Colours::white);



background = juce::ImageCache::getFromMemory(BinaryData::Both11_jpg, BinaryData::Both11_jpgSize);

g.drawImageWithin(background, 0, 0, getWidth(), getHeight(), juce::RectanglePlacement::stretchToFit);



g.setFont(juce::FontOptions("Bodoni 72 SmallCaps", 20.5f, juce::Font::plain));

g.drawFittedText("r", getX() +20, getY() -0.5, getWidth(), getHeight(), juce::Justification::topLeft,0);



g.setFont(juce::FontOptions("Rx Script", 27.5f, juce::Font::italic));

g.drawFittedText("R", getX() +10.0, getY() -30.0, getWidth(), getHeight(), juce::Justification::bottomLeft,1);

}

void GainAudioProcessorEditor::resized()

{

// This is generally where you'll want to lay out the positions of any

// subcomponents in your editor..

}

You can remove the calls to getX() and getY() in your drawFittedText calls. The graphics context will already be relative to the location of the component being drawn.

Note, it also seems like you are trying to draw outside the bounds of the component, anything outside the component will be clipped by default.

You might find it useful to use the Rectangle class removeFrom functions to help you avoid this. In this case you would call getLocalBounds() store that in a variable and then call the removeFrom* functions to get the bounds for your fitted text. See this tutorial for some examples Advanced GUI layout techniques - JUCE

Thanks for that.