float descender = fm.getDescender(fontsize) / 1000f;
float capHeight = fm.getCapHeight(fontsize) / 1000f;
float halfLineWidth = (descender / -8f) / 2f;
float endx = (startx + inline.getIPD()) / 1000f;
if (inline.hasUnderline()) {
ColorType ct = (ColorType) inline.getTrait(Trait.UNDERLINE_COLOR);
float y = baseline - descender / 2f;
drawBorderLine(startx / 1000f, (y - halfLineWidth) / 1000f,
endx, (y + halfLineWidth) / 1000f,
true, true, Constants.EN_SOLID, ct);
}
if (inline.hasOverline()) {
ColorType ct = (ColorType) inline.getTrait(Trait.OVERLINE_COLOR);
float y = (float)(baseline - (1.1 * capHeight));
drawBorderLine(startx / 1000f, (y - halfLineWidth) / 1000f,
endx, (y + halfLineWidth) / 1000f,
true, true, Constants.EN_SOLID, ct);
}
if (inline.hasLineThrough()) {
ColorType ct = (ColorType) inline.getTrait(Trait.LINETHROUGH_COLOR);
float y = (float)(baseline - (0.45 * capHeight));
drawBorderLine(startx / 1000f, (y - halfLineWidth) / 1000f,
endx, (y + halfLineWidth) / 1000f,
true, true, Constants.EN_SOLID, ct);
}