Object o = children.get(i);
if ( o instanceof PageNumberInlineArea) {
PageNumberInlineArea pia = (PageNumberInlineArea)o;
- FontState piaFontState = pia.getFontState();
- finalWidth-=piaFontState.getWordWidth(pia.getText());
+ finalWidth-=pia.getContentWidth();
pia.resolve(idReferences);
- finalWidth+=piaFontState.getWordWidth(pia.getText());
+ finalWidth+=pia.getContentWidth();
}
}
}
public PageNumberInlineArea(FontState fontState, float red, float green,
float blue, String refid, int width) {
- super(fontState, red, green, blue, "?", width);
+ super(fontState, red, green, blue, " ", width);
this.pageNumberId = refid;
}
if (text == null) {
text = "";
}
+ contentRectangleWidth = getFontState().getWordWidth(text);
}
}