提交 403eef79 编写于 作者: L lana

Merge

......@@ -200,29 +200,25 @@ public class CGraphicsEnvironment extends SunGraphicsEnvironment {
return true;
}
private Font[] allFontsWithLogical;
static String[] sLogicalFonts = { "Serif", "SansSerif", "Monospaced", "Dialog", "DialogInput" };
@Override
public Font[] getAllFonts() {
if (allFontsWithLogical == null)
{
Font[] newFonts;
Font[] superFonts = super.getAllFonts();
int numLogical = sLogicalFonts.length;
int numOtherFonts = superFonts.length;
Font[] newFonts;
Font[] superFonts = super.getAllFonts();
newFonts = new Font[numOtherFonts + numLogical];
System.arraycopy(superFonts,0,newFonts,numLogical,numOtherFonts);
int numLogical = sLogicalFonts.length;
int numOtherFonts = superFonts.length;
for (int i = 0; i < numLogical; i++)
{
newFonts[i] = new Font(sLogicalFonts[i], Font.PLAIN, 1);
}
allFontsWithLogical = newFonts;
newFonts = new Font[numOtherFonts + numLogical];
System.arraycopy(superFonts,0,newFonts,numLogical,numOtherFonts);
for (int i = 0; i < numLogical; i++)
{
newFonts[i] = new Font(sLogicalFonts[i], Font.PLAIN, 1);
}
return java.util.Arrays.copyOf(allFontsWithLogical, allFontsWithLogical.length);
return newFonts;
}
}
......@@ -1240,7 +1240,7 @@ Java_sun_font_FontConfigManager_getFontConfig
FC_CHARSET, 0, &charset);
if (result != FcResultMatch) {
free(family);
free(family);
free(fullname);
free(styleStr);
free(file);
(*FcPatternDestroy)(pattern);
......
......@@ -409,7 +409,7 @@ Java_sun_font_FileFontStrike__1getGlyphImageFromWindows
*/
imageSize = bytesWidth*height;
glyphInfo = (GlyphInfo*)malloc(sizeof(GlyphInfo)+imageSize);
if (malloc == NULL) {
if (glyphInfo == NULL) {
FREE_AND_RETURN;
}
glyphInfo->cellInfo = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册