< prev index next >

src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m

Print this page

        

@@ -563,16 +563,18 @@
      GlyphInfo *info, const CGGI_RenderingMode *mode)
 {
     // clean the canvas
     CGGI_ClearCanvas(canvas, info);
 
+    if (isnan(info->topLeftX) || isnan(info->topLeftY)) {
+        return;
+    }
     // strike the glyph in the upper right corner
     CGContextShowGlyphsAtPoint(canvas->context,
                                -info->topLeftX,
                                canvas->image->height + info->topLeftY,
                                &glyph, 1);
-
     // copy the glyph from the canvas into the info
     (*mode->glyphDescriptor->copyFxnPtr)(canvas, info);
 }
 
 /*

@@ -853,11 +855,10 @@
         UniChar uniChars[len];
 
         CGGI_CreateGlyphsAndScanForComplexities(glyphInfos, strike, &mode,
                                                 rawGlyphCodes, uniChars, glyphs,
                                                 advances, bboxes, len);
-
         return;
     }
 
     // just do one malloc, and carve it up for all the buffers
     void *buffer = malloc(sizeof(CGRect) * sizeof(CGSize) *

@@ -873,8 +874,7 @@
     UniChar *uniChars = (UniChar *)(glyphs + sizeof(UniChar) * len);
 
     CGGI_CreateGlyphsAndScanForComplexities(glyphInfos, strike, &mode,
                                             rawGlyphCodes, uniChars, glyphs,
                                             advances, bboxes, len);
-
     free(buffer);
 }
< prev index next >