Win32FontManager.java revision 3348
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* The X11 implementation of {@link FontManager}.
*/
public class Win32FontManager extends SunFontManager {
private static TrueTypeFont eudcFont;
static {
try {
false);
} catch (FontFormatException e) {
}
}
return null;
}
});
}
/* Used on Windows to obtain from the windows registry the name
* of a file containing the system EUFC font. If running in one of
* the locales for which this applies, and one is defined, the font
* defined by this file is appended to all composite fonts as a
* fallback component.
*/
private static native String getEUDCFontFile();
public Win32FontManager() {
super();
/* Register the JRE fonts so that the native platform can
* access them. This is used only on Windows so that when
* printing the printer driver can access the fonts.
*/
return null;
}
});
}
/* Unlike the shared code version, this expects a base file name -
* not a full path name.
* The font configuration file has base file names and the FontConfiguration
* class reports these back to the GraphicsEnvironment, so these
* are the componentFileNames of CompositeFonts.
*/
// REMIND: case compare depends on platform
return;
}
int fontFormat;
} else {
return;
}
}
/* Look in the JRE font directory first.
* This is playing it safe as we would want to find fonts in the
* JRE font directory ahead of those in the system directory
*/
boolean found = false;
try {
found = true;
if (defer) {
fontRank);
} else {
fontRank);
}
break;
}
}
} catch (NoSuchElementException e) {
}
if (!found) {
}
}
protected FontConfiguration createFontConfiguration() {
return fc;
}
boolean preferPropFonts) {
return new WFontConfiguration(this,
}
protected void
}
private static native void
public String[] getDefaultPlatformFont() {
if (defaultPlatformFont != null) {
return defaultPlatformFont;
}
return dirs[i];
}
}
return null;
}
});
}
} else {
}
return defaultPlatformFont;
}
* Because these need to be registed just for use when printing,
* we defer the actual registration and the static initialiser
* for the printing class makes the call to registerJREFontsForPrinting()
*/
}
public static void registerJREFontsForPrinting() {
synchronized (Win32GraphicsEnvironment.class) {
if (fontsForPrinting == null) {
return;
}
}
return null;
}
}
return null;
}
});
}
}