FontSpecification fontSpec = style.getFont(c);
    private static InlineBoxMeasurements calculateInlineMeasurements(LayoutContext c, InlineBox iB,                                                                     VerticalAlignContext vaContext) {        LineMetrics lm = iB.getStyle().getLineMetrics(c);        CalculatedStyle style = iB.getStyle().getCalculatedStyle();        float lineHeight = style.getLineHeight(c);        FontSpecification fontSpec = style.getFont(c);        int halfLeading = Math.round((lineHeight - fontSpec.size) / 2);        iB.setBaseline(Math.round(lm.getAscent()));        alignInlineContent(c, iB, lm.getAscent(), lm.getDescent(), vaContext);        TextDecoration decoration = calculateTextDecoration(iB, iB.getBaseline(), lm);        if (decoration != null) {            iB.setTextDecoration(decoration);        }        InlineBoxMeasurements result = new InlineBoxMeasurements();        result.setBaseline(iB.y + iB.getBaseline());        result.setInlineTop(iB.y - halfLeading);        result.setInlineBottom(Math.round(result.getInlineTop() + lineHeight));        result.setTextTop(iB.y);        result.setTextBottom((int) (result.getBaseline() + lm.getDescent()));                RectPropertySet padding = iB.getStyle().getPaddingWidth(c);        BorderPropertySet border = style.getBorder(c);                result.setPaintingTop((int)Math.floor(iB.y - border.top() - padding.top()));        result.setPaintingBottom((int)Math.ceil(iB.y +                lm.getAscent() + lm.getDescent() +                 border.bottom() + padding.bottom()));        result.setContainsContent(iB.containsContent());        return result;    }