* @throws FOrayException For errors creating the FO Tree.
*/
public void testFontSize001() throws FOrayException {
final FoDocumentReader reader = FoDocumentReader.getInstance();
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));