{
try
{
for (int i=0;i<6;i++)
{
COSFloat floatValue = new COSFloat(Float.parseFloat(st.nextToken()));
array.add(floatValue);
}
}
catch (NumberFormatException exception)
{
log.error("Can't read the fontmatrix from embedded font file!");
}
fontMatrix = new PDMatrix(array);
}
}
else
{
// there are fonts where all values are on a separate line, see PDFBOX-1611
COSArray array = new COSArray();
while((line = in.readLine()) != null)
{
if (line.startsWith("["))
{
continue;
}
if (line.endsWith("]"))
{
break;
}
try
{
COSFloat floatValue = new COSFloat(Float.parseFloat(line));
array.add(floatValue);
}
catch (NumberFormatException exception)
{
log.error("Can't read the fontmatrix from embedded font file!");