*/
    public void prepBox(Context c, InlineBox box, InlineBox prev_align, Font font) {        // u.p("box = " + box);        // u.p("prev align = " + prev_align);        // prepare the font, colors, border, etc        box.setFont(font);        BoxLayout.getBackgroundColor(c,box);        BoxLayout.getBorder(c,box);        BoxLayout.getMargin(c,box);        BoxLayout.getPadding(c,box);        // =========== setup the color        if ( box.node.getNodeType() == box.node.TEXT_NODE ) {            box.color = c.css.getColor( (Element)box.node.getParentNode(), true );        } else {            box.color = c.css.getColor( (Element)box.node, true );        }        // shift left if starting a new line        if(box.break_before) {            box.x = 0;        }                // ============ set x        // use the prev_align to calculate the x if not at start of        // new line        if ( prev_align != null && !prev_align.break_after && !box.break_before ) {            box.x = prev_align.x + prev_align.width;        } else {            box.x = 0;            // trim off leading space only if at start of new line            if(box.getSubstring().startsWith(space)) {                box.setSubstring(box.start_index+1,box.end_index);            }        }                                // =========== set y        // y is  relative to the line, so it's always 0        box.y = 0;                                        // =========== set width                /*        if ( !LayoutUtil.isReplaced(c, node ) ) {            if ( !LayoutUtil.isFloatedBlock( node, c ) ) {                box.width = FontUtil.len( c, node, text.substring( start, end ), font );            } else {                box.width = bounds.width;            }        } else {                */        box.width = FontUtil.len(c , box.node, box.getSubstring(), font);        // u.p("width = " + box.width + " from '"+box.getSubstring() +"'");        /*            box.width = bounds.width;        }        //u.p("box.x = " + box.x);        */                                        // ============= set height                /*        if ( LayoutUtil.isReplaced(c, node ) ) {            box.height = bounds.height;        } else if ( LayoutUtil.isFloatedBlock( node, c ) ) {            box.height = bounds.height;        } else {            */        box.height = FontUtil.lineHeight( c, box.node );            /*        }        */                        //box.break_after = true;        // =========== setup text decorations        if(TextDecoration.isDecoratable(c,box.node)) {            TextDecoration.setupTextDecoration( c, box.node, box );        }                        // =========== setup vertical alignment        // do vertical alignment        VerticalAlign.setupVerticalAlign( c, box.node, box );        //Relative.setupRelative( c, box );                // ============= do special setup for first line        /*        // if first line then do extra setup                if(c.isFirstLine()) {            // if there is a first line pseudo class            CascadedStyle pseudo = c.css.getPseudoElementStyle(getNearestBlockElement(node,c),"first-line");            if(pseudo != null) {                CalculatedStyle normal = c.css.getStyle(box.getRealElement());                CalculatedStyle merged = new CalculatedStyle(normal,pseudo);                styleInlineBox(c,merged,box);            }        }        */                        // adjust width based on borders and padding        box.width += box.totalHorizontalPadding();    }