7141914: Draw glyph cause JVM crash
Reviewed-by: bae, igor
This commit is contained in:
parent
d1e88d085e
commit
80e0df803f
@ -163,7 +163,9 @@ public abstract class FileFont extends PhysicalFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scaler.dispose();
|
if (scaler != null) {
|
||||||
|
scaler.dispose();
|
||||||
|
}
|
||||||
scaler = FontScaler.getNullScaler();
|
scaler = FontScaler.getNullScaler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1740,8 +1740,9 @@ public class StandardGlyphVector extends GlyphVector {
|
|||||||
tx,
|
tx,
|
||||||
sgv.font.getStyle(),
|
sgv.font.getStyle(),
|
||||||
aa, fm);
|
aa, fm);
|
||||||
|
// Get the strike via the handle. Shouldn't matter
|
||||||
FontStrike strike = sgv.font2D.getStrike(desc); // !!! getStrike(desc, false)
|
// 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);
|
return new GlyphStrike(sgv, strike, dx, dy);
|
||||||
}
|
}
|
||||||
|
@ -2619,6 +2619,9 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
|
|||||||
physicalFonts.remove(oldFont.fullName);
|
physicalFonts.remove(oldFont.fullName);
|
||||||
fullNameToFont.remove(oldFont.fullName.toLowerCase(Locale.ENGLISH));
|
fullNameToFont.remove(oldFont.fullName.toLowerCase(Locale.ENGLISH));
|
||||||
FontFamily.remove(oldFont);
|
FontFamily.remove(oldFont);
|
||||||
|
if (oldFont instanceof FileFont) {
|
||||||
|
((FileFont)oldFont).deregisterFontAndClearStrikeCache();
|
||||||
|
}
|
||||||
|
|
||||||
if (localeFullNamesToFont != null) {
|
if (localeFullNamesToFont != null) {
|
||||||
Map.Entry[] mapEntries =
|
Map.Entry[] mapEntries =
|
||||||
|
@ -1037,6 +1037,9 @@ public class TrueTypeFont extends FileFont {
|
|||||||
if (head_Table != null && head_Table.capacity() >= 18) {
|
if (head_Table != null && head_Table.capacity() >= 18) {
|
||||||
ShortBuffer sb = head_Table.asShortBuffer();
|
ShortBuffer sb = head_Table.asShortBuffer();
|
||||||
upem = sb.get(9) & 0xffff;
|
upem = sb.get(9) & 0xffff;
|
||||||
|
if (upem < 16 || upem > 16384) {
|
||||||
|
upem = 2048;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteBuffer os2_Table = getTableBuffer(os_2Tag);
|
ByteBuffer os2_Table = getTableBuffer(os_2Tag);
|
||||||
|
Loading…
Reference in New Issue
Block a user