if (!(content instanceof ReplacedContent)) {
if (!(content instanceof InlineBlockContent)) {
    public static void setupVerticalAlign(Context c, CalculatedStyle style, InlineBox box) {        Content content = box.getContent();        //not used: CalculatedStyle parent_style = c.css.getStyle(LineBreaker.getElement(parent));        Font parent_font = FontUtil.getFont(c, style);        LineMetrics parent_metrics = null;        if (!(content instanceof ReplacedContent)) {            if (!(content instanceof FloatedBlockContent)) {                parent_metrics = parent_font.getLineMetrics(box.getSubstring(), ((Graphics2D) c.getGraphics()).getFontRenderContext());            } else {                parent_metrics = parent_font.getLineMetrics("Test", ((Graphics2D) c.getGraphics()).getFontRenderContext());            }        } else {            parent_metrics = parent_font.getLineMetrics("Test", ((Graphics2D) c.getGraphics()).getFontRenderContext());        }        // the height of the font        float parent_height = parent_metrics.getHeight();        String vertical_align = style.propertyByName("vertical-align").computedValue().asString();        // set the height of the box to the height of the font        if (!(content instanceof ReplacedContent)) {            box.height = FontUtil.lineHeight(c, box);        }        if (vertical_align == null) {            vertical_align = "baseline";        }        box.baseline = 0;        // box.y is relative to the parent's baseline        box.y = 0;                // do nothing for 'baseline'        box.vset = true;        if (vertical_align.equals("baseline")) {            Font font = FontUtil.getFont(c, box);            box.y += FontUtil.getDescent(c, box, font);        }                // works okay i think        if (vertical_align.equals("super")) {            box.y = box.y + (int) (parent_metrics.getStrikethroughOffset() * 2.0);        }        // works okay, i think        if (vertical_align.equals("sub")) {            box.y = box.y - (int) parent_metrics.getStrikethroughOffset();        }        // joshy: this is using the current baseline instead of the parent's baseline        // must fix        if (vertical_align.equals("text-top")) {            // the top of this text is equal to the top of the parent's text            // so we take the parent's height above the baseline and subtract our            // height above the baseline            box.y = -((int) parent_height - box.height);        }        // not implemented correctly yet        if (vertical_align.equals("text-bottom")) {            box.y = 0;        }        // not implemented correctly yet.        if (vertical_align.equals("top")) {            box.y = box.y - box.baseline;            box.top_align = true;            box.vset = false;        }        if (vertical_align.equals("bottom")) {            box.y = box.y - box.baseline;            box.bottom_align = true;            box.vset = false;        }    }