* @param codePoint The Unicode code point whose width is needed.
* @return The width of {@code codePoint}, in millipoints.
*/
public int getCharWidth(final LineText lineText, final int codePoint) {
final FontUse fontUse = lineText.inlinePrimaryFont();
final Font font = fontUse.getFont();
int fontSize = lineText.inlineFontSize();
int codePointToUse = codePoint;
if (lineText.inlineIsFauxSmallCaps()
&& isLowerCase(codePoint)) {
fontSize = lineText.inlineFauxSmallCapsFontSize();
codePointToUse = java.lang.Character.toUpperCase((char) codePoint);
}
fontUse.registerCharUsed(codePointToUse);
return font.width(codePointToUse, fontSize)
+ lineText.inlineLetterSpacingOptimum();
}