}
    private InlineBox calculateInline( Context c, Node node, int avail, int max_width,            LineBox line, InlineBox prev, Element containing_block, InlineBox prev_align ) {                                // calculate the starting index        int start = 0;        // if this is another box from the same node as the previous one        if ( prev != null && prev.node == node ) {            start = prev.end_index;        }        // get the text of the node        String text = node.getNodeValue();        // transform the text if required (like converting to caps)        // this must be done before any measuring since it might change the        // size of the text        text = TextUtil.transformText( c, node, text );                // u.p("calculating inline: text = " + text);        // u.p("avail space = " + avail + " max = " + max_width + "   start index = " + start);        // get the current font. required for sizing        Font font = FontUtil.getFont( c, node );                // handle each case        if ( LayoutUtil.isReplaced(c, node ) ) {            //u.p("is replaced");            return LineBreaker.generateReplacedInlineBox( c, node, avail, prev, text, prev_align, font );        }        //u.p("calc inline on node : " + node);        if ( LayoutUtil.isFloatedBlock( node, c ) ) {            //u.p("calcinline: is floated block");            return FloatUtil.generateFloatedBlockInlineBox( c, node, avail, prev, text, prev_align, font );        }        if ( LineBreaker.isFirstLetter( c, node, start ) ) {            // u.p("is first letter");            return LineBreaker.generateFirstLetterInlineBox( c, node, start, text, prev, prev_align, avail);        }        if ( c.getRenderingContext().getLayoutFactory().isBreak( node ) ) {            // u.p("is break");            return LineBreaker.generateBreakInlineBox( node );        }        if ( LineBreaker.isWhitespace( c, containing_block ) ) {            // u.p("is whitespace");            return LineBreaker.generateWhitespaceInlineBox( c, node, start, prev, text, prev_align, font );        }        // ==== unbreakable long word =====        if ( LineBreaker.isUnbreakableLine( c, node, start, text, avail, font ) ) {            // u.p("is unbreakable");            return LineBreaker.generateUnbreakableInlineBox( c, node, start, text, prev, prev_align, font );        }        // rest of this string can fit on the line        if ( LineBreaker.canFitOnLine( c, node, start, text, avail, font ) ) {            // u.p("can fit on line");            return LineBreaker.generateRestOfTextNodeInlineBox( c, node, start, text, prev, prev_align, font );        }        // normal multiline break        // u.p("normal multi line break");        return LineBreaker.generateMultilineBreak( c, node, start, text, prev, prev_align, avail );    }