/*
* 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.
*/
super(fm);
if (FontUtilities.debugFonts()) {
}
initTables();
}
boolean preferLocaleFonts,
boolean preferPropFonts) {
if (FontUtilities.debugFonts()) {
}
initTables();
}
/* Needs to be kept in sync with updates in the languages used in
* the fontconfig files.
*/
protected void initReorderMap() {
reorderMap = new HashMap();
} else {
}
}
private void initReorderMapForSolaris() {
/* Don't create a no-op entry, so we can optimize this case
* i.e. we don't need to do anything so can avoid slower paths in
* the code.
*/
// reorderMap.put("UTF-8", "latin-1");
split("japanese-x0201,japanese-x0208,japanese-x0212"));
if (FontUtilities.isSolaris8) {
} else {
split("chinese-gb18030-0,chinese-gb18030-1"));
}
split("chinese-big5,chinese-hkscs,chinese-gb18030-0,chinese-gb18030-1"));
} else {
}
split("chinese-cns11643-1,chinese-cns11643-2,chinese-cns11643-3"));
split("japanese-x0201,japanese-x0208,japanese-x0212"));
split("japanese-x0201,japanese-x0208,japanese-x0212"));
/* Don't create a no-op entry, so we can optimize this case */
// reorderMap.put("ISO-8859-1", "latin-1");
}
private void initReorderMapForLinux() {
split("japanese-x0201,japanese-x0208"));
}
else {
}
}
/**
* Sets the OS name and version from environment information.
*/
protected void setOsNameAndVersion(){
super.setOsNameAndVersion();
//don't care os name on Solaris
try {
File f;
osName = "Fedora";
osVersion = getVersionString(f);
osName = "RedHat";
osVersion = getVersionString(f);
osName = "Turbo";
osVersion = getVersionString(f);
osName = "SuSE";
osVersion = getVersionString(f);
/* Ubuntu and (perhaps others) use only lsb-release.
* Syntax and encoding is compatible with java properties.
* For Ubuntu the ID is "Ubuntu".
*/
}
} catch (Exception e) {
}
}
return;
}
/**
* Gets the OS version string from a Linux release-specific file.
*/
try {
}
catch (Exception e){
}
return null;
}
return SunFontManager.jreFontDirName
}
return fileName;
}
// overrides FontConfiguration.getFallbackFamilyName
// maintain compatibility with old font.properties files, which
// either had aliases for TimesRoman & Co. or defined mappings for them.
if (compatibilityName != null) {
return compatibilityName;
}
return defaultFallback;
}
// extract encoding field from XLFD
int beginIndex = 0;
}
if (beginIndex == -1) {
return "default";
}
return "sun.awt.motif.X11Dingbats";
return "sun.awt.Symbol";
}
}
encoding = "default";
}
return encoding;
}
}
/* methods for Motif support *********************************************/
assert isLogicalFontFamilyName(fontName);
}
}
return fontSet;
}
if (nameID == 0) {
}
continue;
}
}
}
}
return null;
}
// for X11, component font name is XLFD
// if we have a file name already, just use it; otherwise let's see
// what the graphics environment can provide
return fileName;
}
}
/**
* Get default font for Motif widgets to use, preventing them from
* wasting time accessing inappropriate X resources. This is called
* only from native code.
*
* This is part of a Motif specific performance enhancement. By
* default, when Motif widgets are created and initialized, Motif will
* set up default fonts for the widgets, which we ALWAYS override.
* This set up includes finding the default font in the widget's X
* resources and fairly expensive requests of the X server to identify
* the specific font or fontset. We avoid all of this overhead by
* providing a well known font to use at the creation of widgets, where
* possible.
*
* The X11 fonts are specified by XLFD strings which have %d as a
* marker to indicate where the fontsize should be substituted. [The
* libc function sprintf() is used to replace it.] The value 140
* specifies a font size of 14 points.
*/
String font = ((MFontConfiguration) getFontConfiguration()).getMotifFontSet("sansserif", Font.PLAIN);
int i;
}
}
return font;
}
int start = 0;
while (colon >= 0) {
}
}
}
return fontDirs;
}
/* methods for table setup ***********************************************/
private void initTables() {
// encodingMap maps XLFD encoding component to
// name of corresponding java.nio charset
// use standard converter on Solaris
} else {
}
}
}