< prev index next >
src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m
Print this page
*** 563,578 ****
GlyphInfo *info, const CGGI_RenderingMode *mode)
{
// clean the canvas
CGGI_ClearCanvas(canvas, info);
// 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);
}
/*
--- 563,580 ----
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,863 ****
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) *
--- 855,864 ----
*** 873,880 ****
UniChar *uniChars = (UniChar *)(glyphs + sizeof(UniChar) * len);
CGGI_CreateGlyphsAndScanForComplexities(glyphInfos, strike, &mode,
rawGlyphCodes, uniChars, glyphs,
advances, bboxes, len);
-
free(buffer);
}
--- 874,880 ----
< prev index next >