if (cm.baselineIndex == GraphicAttribute.TOP_ALIGNMENT) {
cy = -(textLine.getMetrics().ascent - cm.ascent) + cm.ssOffset;
} else if (cm.baselineIndex == GraphicAttribute.BOTTOM_ALIGNMENT) {
cy = textLine.getMetrics().descent - cm.descent + cm.ssOffset;
} else {
cy = cm.effectiveBaselineOffset(baselineOffsets) + cm.ssOffset;
}
float dy = (cm.descent - cm.ascent) / 2 - cy;
dya = dy * cm.italicAngle;
cy += dy;
ydsq = (cy - y)*(cy - y);