is there any font metric like in Java (FontMetrics) ?
Ex:
FontMetrics fm = g2.getFontMetrics();
Rectangle2D rect = fm.getStringBounds(node.getText(), g2);
That would not depend on OpenGL but on the font providing library, since OpenGL does not have native text rendering.