equal
deleted
inserted
replaced
41 import java.nio.channels.FileChannel; |
41 import java.nio.channels.FileChannel; |
42 import java.util.HashMap; |
42 import java.util.HashMap; |
43 import java.util.HashSet; |
43 import java.util.HashSet; |
44 import java.util.Map; |
44 import java.util.Map; |
45 import java.util.Locale; |
45 import java.util.Locale; |
46 import java.util.logging.Level; |
|
47 import sun.java2d.Disposer; |
46 import sun.java2d.Disposer; |
48 import sun.java2d.DisposerRecord; |
47 import sun.java2d.DisposerRecord; |
49 |
48 |
50 /** |
49 /** |
51 * TrueTypeFont is not called SFntFont because it is not expected |
50 * TrueTypeFont is not called SFntFont because it is not expected |
403 bread = length; |
402 bread = length; |
404 } |
403 } |
405 } |
404 } |
406 } catch (FontFormatException e) { |
405 } catch (FontFormatException e) { |
407 if (FontUtilities.isLogging()) { |
406 if (FontUtilities.isLogging()) { |
408 FontUtilities.getLogger().log(Level.SEVERE, |
407 FontUtilities.getLogger().severe( |
409 "While reading " + platName, e); |
408 "While reading " + platName, e); |
410 } |
409 } |
411 bread = -1; // signal EOF |
410 bread = -1; // signal EOF |
412 deregisterFontAndClearStrikeCache(); |
411 deregisterFontAndClearStrikeCache(); |
413 } catch (ClosedChannelException e) { |
412 } catch (ClosedChannelException e) { |
424 * Other than an attempt to read past the end of the file it |
423 * Other than an attempt to read past the end of the file it |
425 * seems unlikely this would occur as problems opening the |
424 * seems unlikely this would occur as problems opening the |
426 * file are handled as a FontFormatException. |
425 * file are handled as a FontFormatException. |
427 */ |
426 */ |
428 if (FontUtilities.isLogging()) { |
427 if (FontUtilities.isLogging()) { |
429 FontUtilities.getLogger().log(Level.SEVERE, |
428 FontUtilities.getLogger().severe( |
430 "While reading " + platName, e); |
429 "While reading " + platName, e); |
431 } |
430 } |
432 if (bread == 0) { |
431 if (bread == 0) { |
433 bread = -1; // signal EOF |
432 bread = -1; // signal EOF |
434 deregisterFontAndClearStrikeCache(); |
433 deregisterFontAndClearStrikeCache(); |