R.Sym modelData = (R.Sym)unmarshalledNode;
String fontName = modelData.getFont();
String textValue = modelData.getChar();
PhysicalFont pf = context.getWmlPackage().getFontMapper().get(fontName);
char chValue = '\0';
Typeface typeface = null;
if (pf != null) {
typeface = pf.getTypeface();
if (typeface != null) {
if (textValue.length() > 1) {
try {
chValue = (char)Integer.parseInt(textValue, 16);
}
catch (NumberFormatException nfe) {
chValue = '\0';
}
}
else {
chValue = textValue.charAt(0);
}
if (chValue != '\0') {
if (chValue > 0xf000) { //let's check first the character in the lower ascii (Pre-process according to ECMA-376 2.3.3.29)
chValue -= 0xf000;
}
if (typeface.mapChar(chValue) == 0) {
chValue += 0xf000;
if (typeface.mapChar(chValue) == 0) {
chValue = '\0';
}
}
if (chValue != '\0') {//character was found
textValue = Character.toString(chValue);