getLocalBounds can be different depending on the text string. If you actually had a "p" in the string it should reach further down to include the bar-part reaching below the o-part. getGlobalBounds is the same, just transformed into a global coordinate system.
getCharactersize should be the maximum allowed height that cant be drawn outside of when using any character, including "ÂÖgq|".