// React to KEYWORD values.
result = getFontSizeFromKeyword((StyleKeyword) value);
} else if (value instanceof StyleLength) {
// React to LENGTH values. Note that percentage/em/ex sizes
// and bolder/lighter are explicitly not handled here.
StyleLength styleLength = (StyleLength) value;
if (styleLength.getUnit() == LengthUnit.PX) {
// Pixels
int pixels = styleLength.pixels();
result = determineFontSize(pixels,
PIXELS_FONT_SIZE_LOOKUP);
} else if (styleLength.getUnit() == LengthUnit.PT) {
// Points.
double point = styleLength.getNumber();
result = determineFontSize(Math.round(point),
POINT_FONT_SIZE_LOOKUP);
}
}
return result;