Font font = v.getFont(); FontMetrics fm = v.getContainer().getFontMetrics(font); int pos = Utilities.getTabbedTextOffset(txt, fm, (int) x,
int pos = Utilities.getTabbedTextOffset(txt, fontMetrics, (int) x,
    public int getBoundedPosition(GlyphView v, int p0, float x, float len)    {      TabExpander te = v.getTabExpander();      Segment txt = v.getText(p0, v.getEndOffset());      Font font = v.getFont();      FontMetrics fm = v.getContainer().getFontMetrics(font);      int pos = Utilities.getTabbedTextOffset(txt, fm, (int) x,                                              (int) (x + len), te, p0, false);      return pos;    }