} else {
gp = new GeneralPath ();
}
// calculate the advance
HmtxTable hmtx = (HmtxTable) this.font.getTable ("hmtx");
float advance = hmtx.getAdvance (glyphId) / this.unitsPerEm;
// scale the glyph to match the desired advance
float widthfactor = width / advance;
// the base transform scales the glyph to 1x1