mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-25 01:30:10 +00:00
Merge
This commit is contained in:
commit
aa516b42ef
@ -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;
|
||||
|
||||
newFonts = new Font[numOtherFonts + numLogical];
|
||||
System.arraycopy(superFonts,0,newFonts,numLogical,numOtherFonts);
|
||||
|
||||
for (int i = 0; i < numLogical; i++)
|
||||
{
|
||||
Font[] newFonts;
|
||||
Font[] superFonts = super.getAllFonts();
|
||||
|
||||
int numLogical = sLogicalFonts.length;
|
||||
int numOtherFonts = superFonts.length;
|
||||
|
||||
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);
|
||||
}
|
||||
allFontsWithLogical = newFonts;
|
||||
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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user