final FOTreeBuilder foTree = reader.buildFoTree("fo/font-size-001.fo");
final Flow flow = this.getFlow(foTree);
FObj node = flow.getChildAt(0);
assertTrue(node instanceof Block);
Block block = (Block) node;
int fontSize = block.traitFontSize(null);
/* The default font size is 12 points. */
assertEquals(12000, fontSize);
node = flow.getChildAt(1);
assertTrue(node instanceof Block);
block = (Block) node;
fontSize = block.traitFontSize(null);
assertEquals(8000, fontSize);
node = flow.getChildAt(2);
assertTrue(node instanceof Block);
block = (Block) node;
final Font font = node.getPrimaryFont(null).getFont();
assertEquals("Courier", font.getFamilyName());
assertEquals(426, font.getXHeight(1000));
final int nominalFontSize = block.traitFontSize(null);
/* The nominal font-size is 10 pts. */
assertEquals(10000, nominalFontSize);
/* The font-size-adjust is .6. */
final double fontSizeAdjust = block.traitFontSizeAdjust(null);
assertEquals(.6, fontSizeAdjust, .001);
/* Actual font size computation, using a basis factor of 1000.
* 600 / 426 * 10000 = 14085. */
fontSize = block.traitFontSizeActual(null, font);
assertEquals(14085, fontSize);
}