|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--com.iproject.wbmpcreator.CustomFont
This class is used for storing User-Defined compiled fonts.
The user-defined font (UDF) is a text file later to be converted into an object understandable to WBMPcreator. This file MUST have the *.udf extension, note the small letters. After a UDF is read it is compiled and stored in file system with *.udfc extension.
The file looks like following:
alphabet x_size y_size here is the font where each symbol consists of y_size lines, each symbol follows another.Here is the sample used by the author for test purposes:
ABC 4 6 --## -#-# #--# #### #--# #--# ###- #--# ###- #--# #--# ###- #### #--- #--- #--- #--- ####You can see that the alphabet consists of 3 symbols, each symbol is 4 points wide and 6 points high. Symbols follow the header. After compiling this font you may remove the *.udf file leaving *.udfc file act as a font.
| Constructor Summary | |
CustomFont()
|
|
| Method Summary | |
java.lang.String |
getAlphabet()
Gets all alphabet symbols as a String |
int |
getElementAt(int index)
Method to get element stored at the given position. |
int[] |
getPointArray()
Gets point array of the font |
int |
getTotalSymbols()
Gets length of the alphabet used. |
int |
getXSize()
Gets X size of a user-defined font |
int |
getYSize()
Gets Y size of a user-defined font |
boolean |
isIsUnicode()
Tests whether the Unicode or normal ASCII encoding used. |
void |
setAlphabet(java.lang.String newAlphabet)
Sets alphabet, i.e. a set of characters used in the font (Unicode is not supported in this version) |
void |
setElementAt(int index,
int newElement)
Method to set element at the given position. |
void |
setIsUnicode(boolean newIsUnicode)
Sets Unicode or normal symbol representation. |
void |
setPointArray(int[] newPointArray)
Explicitly sets the point array for a font. |
void |
setTotalSymbols(int newTotalSymbols)
Sets lenght of an alphabet used. |
void |
setXSize(int newXSize)
Sets X size of a user-defined font |
void |
setYSize(int newYSize)
Sets Y size of a user-defined font |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public CustomFont()
| Method Detail |
public void setXSize(int newXSize)
newXSize - new valuepublic int getXSize()
public void setYSize(int newYSize)
newYSize - new valuepublic int getYSize()
public void setTotalSymbols(int newTotalSymbols)
newTotalSymbols - new valuepublic int getTotalSymbols()
public void setAlphabet(java.lang.String newAlphabet)
newAlphabet - new valuepublic java.lang.String getAlphabet()
Stringpublic void setPointArray(int[] newPointArray)
newPointArray - new valuepublic int[] getPointArray()
public void setIsUnicode(boolean newIsUnicode)
newIsUnicode - new valuepublic boolean isIsUnicode()
public int getElementAt(int index)
index - the index of the element
public void setElementAt(int index,
int newElement)
index - the index of the elementnewElement - the new element
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||