src/share/classes/sun/print/PathGraphics.java

Print this page
rev 1297 : [mq]: fontmanager.patch

@@ -30,10 +30,12 @@
 import sun.font.CharToGlyphMapper;
 import sun.font.CompositeFont;
 import sun.font.Font2D;
 import sun.font.Font2DHandle;
 import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.FontUtilities;
 
 import java.awt.Color;
 import java.awt.Font;
 import java.awt.Graphics2D;
 import java.awt.Image;

@@ -696,11 +698,11 @@
         if (flags != 0 && flags != GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) {
             return printGlyphVector(g, x, y);
         }
 
         Font font = g.getFont();
-        Font2D font2D = FontManager.getFont2D(font);
+        Font2D font2D = FontUtilities.getFont2D(font);
         if (font2D.handle.font2D != font2D) {
             /* suspicious, may be a bad font. lets bail */
             return false;
         }
         Hashtable<Font2DHandle,Object> fontMap;

@@ -931,11 +933,11 @@
         /* In some scripts chars drawn individually do not have the
          * same representation (glyphs) as when combined with other chars.
          * The logic here is erring on the side of caution, in particular
          * in including supplementary characters.
          */
-        if (FontManager.isComplexText(chars, 0, chars.length)) {
+        if (FontUtilities.isComplexText(chars, 0, chars.length)) {
             return printGlyphVector(g, x, y);
         }
 
         /* If we reach here we have mapped all the glyphs back
          * one-to-one to simple unicode chars that we know are in the font.