/*
* 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.
*/
/* if running on Solaris and default Locale is ja_JP then
* we map need to remap reverse solidus (backslash) to Yen as
* apparently expected there.
*/
private final boolean needsJAremapping;
private boolean remapJAWaveDash;
int numGlyphs;
try {
} catch (Exception e) {
}
}
needsJAremapping = true;
if (FontUtilities.isSolaris8 &&
remapJAWaveDash = true;
}
} else {
needsJAremapping = false;
}
}
public int getNumGlyphs() {
return numGlyphs;
}
try {
return glyphCode;
} else {
if (FontUtilities.isLogging()) {
(font + " out of range glyph id=" +
}
return (char)missingGlyph;
}
} catch(Exception e) {
return (char) missingGlyph;
}
}
private void handleBadCMAP() {
if (FontUtilities.isLogging()) {
"substituting for this font");
}
/* The next line is not really a solution, but might
* reduce the exceptions until references to this font2D
* are gone.
*/
}
switch (unicode) {
case REVERSE_SOLIDUS:
return JA_YEN;
/* This is a workaround for bug 4533422.
* Japanese wave dash missing from Solaris JA TrueType fonts.
*/
case JA_WAVE_DASH_CHAR:
if (remapJAWaveDash) {
return JA_FULLWIDTH_TILDE_CHAR;
}
default: return unicode;
}
}
switch (unicode) {
case REVERSE_SOLIDUS:
return JA_YEN;
/* This is a workaround for bug 4533422.
* Japanese wave dash missing from Solaris JA TrueType fonts.
*/
case JA_WAVE_DASH_CHAR:
if (remapJAWaveDash) {
return JA_FULLWIDTH_TILDE_CHAR;
}
default: return unicode;
}
}
if (needsJAremapping) {
}
}
return glyph;
}
if (needsJAremapping) {
}
}
return glyph;
}
for (int i=0;i<count;i++) {
if (needsJAremapping) {
} else {
}
if (font.checkUseNatives() &&
}
}
}
for (int i=0; i<count; i++) {
int code;
if (needsJAremapping) {
} else {
}
if (code >= HI_SURROGATE_START &&
if (low >= LO_SURROGATE_START &&
low <= LO_SURROGATE_END) {
i += 1; // Empty glyph slot after surrogate
glyphs[i] = INVISIBLE_GLYPH_ID;
continue;
}
}
if (font.checkUseNatives() &&
}
}
}
/* This variant checks if shaping is needed and immediately
* returns true if it does. A caller of this method should be expecting
* to check the return type because it needs to know how to handle
* the character data for display.
*/
for (int i=0; i<count; i++) {
int code;
if (needsJAremapping) {
} else {
}
if (code >= HI_SURROGATE_START &&
if (low >= LO_SURROGATE_START &&
low <= LO_SURROGATE_END) {
}
}
if (font.checkUseNatives() &&
}
continue;
}
return true;
}
else if (code >= 0x10000) {
i += 1; // Empty glyph slot after surrogate
continue;
}
}
return false;
}
/* A pretty good heuristic is that the cmap we are using
* supports 32 bit character codes.
*/
boolean hasSupplementaryChars() {
return
}
}