src/java.desktop/share/classes/sun/font/StandardGlyphVector.java
Print this page
*** 1122,1131 ****
--- 1122,1134 ----
font2D.getMapper().charsToGlyphs(count, text, glyphs);
}
private void initFontData() {
font2D = FontUtilities.getFont2D(font);
+ if (font2D instanceof FontSubstitution) {
+ font2D = ((FontSubstitution)font2D).getCompositeFont2D();
+ }
float s = font.getSize2D();
if (font.isTransformed()) {
ftx = font.getTransform();
if (ftx.getTranslateX() != 0 || ftx.getTranslateY() != 0) {
addFlags(FLAG_HAS_POSITION_ADJUSTMENTS);
*** 1740,1750 ****
tx,
sgv.font.getStyle(),
aa, fm);
// Get the strike via the handle. Shouldn't matter
// if we've invalidated the font but its an extra precaution.
! FontStrike strike = sgv.font2D.handle.font2D.getStrike(desc); // !!! getStrike(desc, false)
return new GlyphStrike(sgv, strike, dx, dy);
}
private GlyphStrike(StandardGlyphVector sgv, FontStrike strike, float dx, float dy) {
--- 1743,1758 ----
tx,
sgv.font.getStyle(),
aa, fm);
// Get the strike via the handle. Shouldn't matter
// if we've invalidated the font but its an extra precaution.
! // do we want the CompFont from CFont here ?
! Font2D f2d = sgv.font2D;
! if (f2d instanceof FontSubstitution) {
! f2d = ((FontSubstitution)f2d).getCompositeFont2D();
! }
! FontStrike strike = f2d.handle.font2D.getStrike(desc); // !!! getStrike(desc, false)
return new GlyphStrike(sgv, strike, dx, dy);
}
private GlyphStrike(StandardGlyphVector sgv, FontStrike strike, float dx, float dy) {