{
int size = widths.size();
int counter = 0;
while (counter < size)
{
COSNumber firstCode = (COSNumber)widths.getObject( counter++ );
COSBase next = widths.getObject( counter++ );
if( next instanceof COSArray )
{
COSArray array = (COSArray)next;
int startRange = firstCode.intValue();
int arraySize = array.size();
for (int i=0; i<arraySize; i++)
{
COSNumber width = (COSNumber)array.get(i);
widthCache.put(startRange+i, width.floatValue());
}
}
else
{
COSNumber secondCode = (COSNumber)next;
COSNumber rangeWidth = (COSNumber)widths.getObject( counter++ );
int startRange = firstCode.intValue();
int endRange = secondCode.intValue();
float width = rangeWidth.floatValue();
for (int i=startRange; i<=endRange; i++) {
widthCache.put(i,width);
}
}
}