|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.openpcl.pclrenderimage.softfont.PriFontBase
com.openpcl.pclrenderimage.softfont.PriBitmapFont
public class PriBitmapFont
Field Summary | |
---|---|
protected float |
height
|
protected Hashtable<Integer,PriBitmapCharacter> |
mCharacterMap
|
protected int |
orientation
|
protected int |
resolution
|
Fields inherited from class com.openpcl.pclrenderimage.softfont.PriFontBase |
---|
AGFA_FONT, BITMAP_FONT, cellHeight, cellWidth, characterComplement, isFixedPitch, isPermanent, name, pitch, spaceDisplayable, storage, STORAGE_CARTRIDGE0, STORAGE_CARTRIDGE1, STORAGE_INTERNAL, STORAGE_RAM, STORAGE_SIMM, strokeWeight, style, symbolset, TRUETYPE_FONT, typefaceFamily |
Constructor Summary | |
---|---|
PriBitmapFont(int symbolset,
int[] characterComplement,
int typefaceFamily,
boolean isFixedPitch,
double pitch,
float height,
int cellWidth,
int cellHeight,
int orientation,
int resolution,
int storage)
|
|
PriBitmapFont(int symbolset,
int typefaceFamily,
boolean isFixedPitch,
double pitch,
float height,
int cellWidth,
int cellHeight,
int orientation,
int resolution,
int storage)
|
|
PriBitmapFont(PriBitmapFontHeader h)
Creates new bitmap font (old format). |
Method Summary | |
---|---|
void |
addChar(PriBitmapCharacter ch)
Adds a PriBitmapCharacter to a bitmap font |
boolean |
canDisplay(char charCode)
|
boolean |
equals(Object obj)
true obj is FontBase instance and it's equal to this font
Two fonts are equal if they could not be distinguished ie. |
PriBitmapCharacter |
getChar(int charCode)
Returns PriBitmapCharacter mapped to the code |
float |
getHeight()
Bitmap fonts are available only at one height as opposite to scalable fonts |
int |
getResolution()
Bitmap fonts are designed either at 300dpi or 600dpi Use this method to check at what resolution is designed the font |
void |
removeChar(int code)
Removes character |
int |
type()
Derived classes should implement this method to return the type of the font they represent Type is either BITMAP_FONT or TRUETYPE_FONT or AGFA_FONT |
Methods inherited from class com.openpcl.pclrenderimage.softfont.PriFontBase |
---|
canDisplaySpace, dump, getCellHeight, getCellWidth, getCharacterComplement, getName, getOrientation, getPitch, getStorage, getStrokeWeight, getStyle, getSymbolset, getTypefaceFamily, isFixedPitch, isPermanent, isUnbound, setPermanent, setStorage, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int orientation
protected int resolution
protected float height
protected Hashtable<Integer,PriBitmapCharacter> mCharacterMap
Constructor Detail |
---|
public PriBitmapFont(int symbolset, int[] characterComplement, int typefaceFamily, boolean isFixedPitch, double pitch, float height, int cellWidth, int cellHeight, int orientation, int resolution, int storage)
public PriBitmapFont(int symbolset, int typefaceFamily, boolean isFixedPitch, double pitch, float height, int cellWidth, int cellHeight, int orientation, int resolution, int storage)
public PriBitmapFont(PriBitmapFontHeader h)
See PCL Technical Refence Soft font creation.
h
- The header of the font specified during soft createationMethod Detail |
---|
public int type()
PriFontBase
type
in class PriFontBase
FontBase#BITMAP_FONT
FontBase#type()
public float getHeight()
getHeight
in class PriFontBase
public int getResolution()
public void addChar(PriBitmapCharacter ch)
ch
- characther to addpublic PriBitmapCharacter getChar(int charCode)
charCode
- code of required character
public void removeChar(int code)
code
- code of the character which have to be removedpublic boolean canDisplay(char charCode)
canDisplay
in class PriFontBase
public boolean equals(Object obj)
PriFontBase
true
obj is FontBase instance and it's equal to this font
Two fonts are equal if they could not be distinguished ie. they have
same charactericts ( Symbol set, Spacing, Pitch,... )
equals
in class PriFontBase
obj
-
true
If obj is instance of Bitmap font and
these two fonts are undistinguishable
false
otherwise
Note Only characteristics of both fonts are compared not the
characters they contain. If we have two fonts with same characteriscs
but different characters this method will return true
FontBase#equals(Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |