} public boolean canDisplay(char c) { return getMapper().canDisplay(c); } public boolean canDisplay(int cp) { return getMapper().canDisplay(cp); } public byte getBaselineFor(char c) { return Font.ROMAN_BASELINE; } public float getItalicAngle(Font font, AffineTransform at, Object aaHint, Object fmHint) { /* hardwire psz=12 as that's typical and AA vs non-AA for 'gasp' mode * isn't important for the caret slope of this rarely used API. */ int aa = FontStrikeDesc.getAAHintIntVal(aaHint, this, 12); int fm = FontStrikeDesc.getFMHintIntVal(fmHint); FontStrike strike = getStrike(font, at, aa, fm); StrikeMetrics metrics = strike.getFontMetrics(); if (metrics.ascentY == 0 || metrics.ascentX == 0) { return 0f; } else { /* ascent is "up" from the baseline so its typically * a negative value, so we need to compensate */ return metrics.ascentX/-metrics.ascentY; } } }Lines 501–534 of 534. Previous lines
} public boolean canDisplay(char c) { return getMapper().canDisplay(c); } public boolean canDisplay(int cp) { return getMapper().canDisplay(cp); } public byte getBaselineFor(char c) { return Font.ROMAN_BASELINE; } public float getItalicAngle(Font font, AffineTransform at, Object aaHint, Object fmHint) { /* hardwire psz=12 as that's typical and AA vs non-AA for 'gasp' mode * isn't important for the caret slope of this rarely used API. */ int aa = FontStrikeDesc.getAAHintIntVal(aaHint, this, 12); int fm = FontStrikeDesc.getFMHintIntVal(fmHint); FontStrike strike = getStrike(font, at, aa, fm); StrikeMetrics metrics = strike.getFontMetrics(); if (metrics.ascentY == 0 || metrics.ascentX == 0) { return 0f; } else { /* ascent is "up" from the baseline so its typically * a negative value, so we need to compensate */ return metrics.ascentX/-metrics.ascentY; } } }