|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.wohenchan.HBFFont
Class hbf_font is used for manipulating HBF (Hanzi Bitmap Font) files for Chinese.
This font format is described in: http://www.ifcss.org/ftp-pub/software/info/HBF-1.1/
Sample HBF files can be downloaded from CND or IFCSS:
Field Summary | |
private java.lang.String |
dirname
|
private HBFByte2Range[] |
m_byte2Ranges
|
private int |
m_byte2RangeTotal
|
private HBFCodeRange[] |
m_codeRange
|
private int |
m_fontAscent
|
private int |
m_fontDescent
|
private int |
m_pixelSize
|
static int |
MAXIMUM_NARROW_CHAR
|
Constructor Summary | |
HBFFont(java.lang.String hbf_filename)
Opens and parses an HBF file. |
Method Summary | |
private int |
calculateRealOffset(char mychar,
int idx)
|
byte[] |
getarr(char mychar)
Returns the bitmap corresponding to a character. |
int |
getFontAscent()
Returns FONT_ASCENT as specified in the HBF file. |
int |
getFontDescent()
Returns FONT_DESCENT as specified in the HBF file. |
int |
getPixelSize()
Returns PIXEL_SIZE as specified in the HBF file. |
private boolean |
isNarrow(char mychar)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private HBFByte2Range[] m_byte2Ranges
private HBFCodeRange[] m_codeRange
private int m_byte2RangeTotal
private int m_pixelSize
private int m_fontAscent
private int m_fontDescent
private java.lang.String dirname
public static final int MAXIMUM_NARROW_CHAR
Constructor Detail |
public HBFFont(java.lang.String hbf_filename) throws java.io.FileNotFoundException
Method Detail |
public final int getPixelSize()
public final int getFontAscent()
public final int getFontDescent()
private int calculateRealOffset(char mychar, int idx) throws HBFByte2NotFoundException
HBFByte2NotFoundException
private boolean isNarrow(char mychar)
public byte[] getarr(char mychar) throws java.io.IOException, HBFByte2NotFoundException
HBFByte2NotFoundException
- ???
java.io.IOException
- codeRange.activateFile() throws this.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |