{
final Graphics2D graphics = file.getGraphics2D();
final MfDcState state = file.getCurrentState();
final MfLogFont lFont = state.getLogFont();
state.prepareDrawText();
final FontMetrics metrics = graphics.getFontMetrics();
final int textWidth = metrics.stringWidth(text);
final Point p = getScaledOrigin();
final int x = p.x + calcDeltaX(state.getVerticalTextAlignment(), textWidth);
int y = p.y + calcDeltaY(state.getHorizontalTextAlignment(), metrics);