| 1 |
//Copyright 2001-2005 FreeHep |
| 2 |
package org.freehep.graphics2d.font; |
| 3 |
|
| 4 |
/** |
| 5 |
* Provides conversions between unicodes, names, and encodings for any |
| 6 |
* particular encoding. |
| 7 |
* |
| 8 |
* @author Sami Kama |
| 9 |
* @version $Id: freehep-graphics2d/src/main/java/org/freehep/graphics2d/font/CharTable.java 7aee336a8992 2005/11/25 23:19:05 duns $ |
| 10 |
*/ |
| 11 |
public interface CharTable { |
| 12 |
|
| 13 |
/** |
| 14 |
* Converts unicode character to name. |
| 15 |
* |
| 16 |
* @param c unicode character |
| 17 |
* @return name |
| 18 |
*/ |
| 19 |
public String toName(char c); |
| 20 |
|
| 21 |
/** |
| 22 |
* Converts unicode Character object to name. |
| 23 |
* |
| 24 |
* @param c unicode Character object |
| 25 |
* @return name |
| 26 |
*/ |
| 27 |
public String toName(Character c); |
| 28 |
|
| 29 |
/** |
| 30 |
* Converts character code into a name. |
| 31 |
* |
| 32 |
* @param enc code |
| 33 |
* @return name |
| 34 |
*/ |
| 35 |
public String toName(int enc); |
| 36 |
|
| 37 |
/** |
| 38 |
* Converts character code Integer object into a name. |
| 39 |
* |
| 40 |
* @param enc code Integer object |
| 41 |
* @return name |
| 42 |
*/ |
| 43 |
public String toName(Integer enc); |
| 44 |
|
| 45 |
/** |
| 46 |
* Converts name into character code. |
| 47 |
* |
| 48 |
* @param name name of the character |
| 49 |
* @return character code |
| 50 |
*/ |
| 51 |
public int toEncoding(String name); |
| 52 |
|
| 53 |
/** |
| 54 |
* Converts a unicode into a character code. |
| 55 |
* |
| 56 |
* @param unicode unicode character |
| 57 |
* @return character code |
| 58 |
*/ |
| 59 |
public int toEncoding(char unicode); |
| 60 |
|
| 61 |
/** |
| 62 |
* Converts a name to a unicode character. |
| 63 |
* |
| 64 |
* @param name of the character |
| 65 |
* @return unicode character |
| 66 |
*/ |
| 67 |
public char toUnicode(String name); |
| 68 |
|
| 69 |
/** |
| 70 |
* Returns the name of the table. |
| 71 |
* |
| 72 |
* @return table name |
| 73 |
*/ |
| 74 |
public String getName(); |
| 75 |
|
| 76 |
/** |
| 77 |
* Returns the encoding name of the table. |
| 78 |
* |
| 79 |
* @return encoding name |
| 80 |
*/ |
| 81 |
public String getEncoding(); |
| 82 |
} |