//Copyright 2001 FreeHEP. package org.freehep.graphicsio.font.encoding; /** * Lookup class provides conversion between different encodings and character tables * using character name, encoding index, and unicode. * In order to add new tables original code should be modified. * * @author Sami Kama * @version $Id: Lookup.java,v 1.3 2003/05/09 20:31:03 duns Exp $ */ public class Lookup { private static Lookup instance; private CharTable[] tables; public static Lookup getInstance() { if (instance ==null) { instance= new Lookup(); } return (instance); } private int ntables=8; private Lookup() { tables = new CharTable[ntables]; tables[0] = new Symbol(); tables[1] = new Expert(); tables[2] = new Zapfdingbats(); tables[3] = new STDLatin(); tables[4] = new MACLatin(); tables[5] = new WINLatin(); tables[6] = new PDFLatin(); tables[7] = new ISOLatin(); } /** * Converts a name to unicode. * This method takes name of the character and * returns character as a unicode character. * * @return requested unicode character. */ public char toUnicode(String name) { for (int i=0; i