|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.openpcl.pclrenderimage.render.PriFonts
public class PriFonts
All the Font related. This class creates Java built in Logical Fonts (and not any specific Physcial Font or using any .TTF file). At run time, the Java JVM maps these fonts to the actual font on the running system, be it WinTel or Mac or Unix or Linux or etc.
Constructor Summary | |
---|---|
PriFonts(PclRenderImage pPclRenderImage)
Constructor without passing the Graphics2D. |
|
PriFonts(PclRenderImage pPclRenderImage,
Graphics2D pGraphics2D)
Constructor |
Method Summary | |
---|---|
void |
freeUpMemory()
When the user is done with this rendering session, then free up memory. |
Font |
getCurrentFont()
|
int |
getCurrentFontStylePlanBoldItalic()
|
int |
getCurrentHorizontalPitch()
|
int |
getCurrentJavaBuiltInFont()
|
int |
getCurrentSymbolSet()
|
FontRenderContext |
getFontRenderContext()
|
int |
getInternalPrinterFontPixelWidthFor1Char(char pCharToDraw)
Get the adjusted pixel width of the character in the current font by using the internal printer font character width tables. |
boolean |
getIsMonospacedFont()
|
int |
getPixelWidthFromCharMeasurement(char pCharToDraw)
Get the pixel width of the char from the char measurement instead of from the printer font tables. |
Font |
getPrimaryFont()
|
int |
getScreenFontPixelHeightFor1Char(char pCharToDraw)
Get the Screen Font height of this char. |
Font |
getSecondaryFont()
|
protected void |
makeFontCurrent()
After setting mCurrentJavaBuiltInFont, make that font current |
void |
setCurrentFont(Font pCurrentFont)
Set the current font. |
void |
setFontHeight(float pHeight)
The height (aka point size) of the font |
void |
setFontHorizontalPitch(int pNumCharactersPerInch)
The Horizontal Pitch is the number of characters per inch |
void |
setFontIsPrimary()
Set the font is the Primary Font |
void |
setFontIsSecondary()
Set the font is the Secondary Font |
void |
setFontItalicOrCondensedStyle(int pStyle)
The PCL bytes specified to set Italic or Condensed Style. |
void |
setFontStrokeWeight(int pWeight)
The PCL bytes specified to set the font weight. |
void |
setHorizontalMotionIndexHMI(int pHmiValue)
Set Horizontal Motion Index (HMI). |
void |
setJavaBuiltInFont(int pFontTypefaceNumberFromPclFile)
Pick which Java built in font from the font number read from the original PCL bytes |
protected void |
setMonospacedJavaBuiltInFont(int pStyle,
float pSize)
Set the Monospaced Java built in font on the Graphics2D for the BufferedImage |
void |
setPrimaryFont(Font pPrimaryFont)
Set the primary font. |
protected void |
setSansSerifJavaBuiltInFont(int pStyle,
float pSize)
Set the SansSerif (aka Arial, Univers, Helvetica) Java built in font on the Graphics2D for the BufferedImage |
void |
setSecondaryFont(Font pSecondaryFont)
Set the secondary font |
protected void |
setSerifJavaBuiltInFont(int pStyle,
float pSize)
Set the Serif (aka Times Roman) Java built in font on the Graphics2D for the BufferedImage |
void |
setSymbolSetGroupU(int pSymbolSetInGroupU)
The Symbol Set. |
void |
setSymbolSetIsUnsupported(int pSymbolSetIsUnsupported,
String pCmdTerminator)
This method is for when the parsed PCL has a symbol set that is not supported due to it's not one of: Roman8 = (s8U Windows30Latin1 = (s9U PC8 = (s10U |
void |
setToInitialValues()
Set to initial values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PclRenderImage mPclRenderImage
protected Graphics2D mGraphics2D
protected FontRenderContext mFontRenderContext
protected TextLayout mTextLayout
protected Font mPrimaryFont
protected Font mSecondaryFont
protected static final Font sMonospacedBaseFont
protected static final Font sSansSerifBaseFont
protected static final Font sSerifBaseFont
protected ArrayList<int[]> mCharWidthArrayList
protected int mCurrentHorizontalPitch
protected int mCurrentHorizontalMotionIndexHMI
protected int mCurrentFontStylePlanBoldItalic
protected float mCurrentFontHeight
public static final int sFontIsMonospaced
public static final int sFontIsSansSerif
public static final int sFontIsSerif
protected int mCurrentJavaBuiltInFont
public static final int sFontSymbolSetIsOther
public static final int sFontSymbolSetIsRoman8
public static final int sFontSymbolSetIsWindows30Latin1
public static final int sFontSymbolSetIsPC8
protected int mCurrentSymbolSet
protected static final float sFontToPclUnitsConversion
public static final int sFontIsPrimary
public static final int sFontIsSecondary
protected int mFontIsPrimaryOrSecondary
protected static final int[][] sFontSubstitutionArray
Constructor Detail |
---|
public PriFonts(PclRenderImage pPclRenderImage, Graphics2D pGraphics2D)
PclRenderImage
- pGraphics2D
- public PriFonts(PclRenderImage pPclRenderImage)
Method Detail |
---|
public void setToInitialValues()
setToInitialValues
in interface IPluginHooksPriFonts
public void freeUpMemory()
freeUpMemory
in interface IPluginHooksPriFonts
public Font getCurrentFont()
public Font getPrimaryFont()
public Font getSecondaryFont()
public int getCurrentSymbolSet()
public int getCurrentJavaBuiltInFont()
public FontRenderContext getFontRenderContext()
public int getCurrentFontStylePlanBoldItalic()
public boolean getIsMonospacedFont()
public int getCurrentHorizontalPitch()
public int getInternalPrinterFontPixelWidthFor1Char(char pCharToDraw)
char
- pCharToDraw
public int getPixelWidthFromCharMeasurement(char pCharToDraw)
getPixelWidthFromCharMeasurement
in interface IPluginHooksPriFonts
pCharToDraw
-
public int getScreenFontPixelHeightFor1Char(char pCharToDraw)
getScreenFontPixelHeightFor1Char
in interface IPluginHooksPriFonts
pCharToDraw
-
public void setFontItalicOrCondensedStyle(int pStyle)
pStyle
- public void setFontStrokeWeight(int pWeight)
pWeight
- public void setSymbolSetGroupU(int pSymbolSetInGroupU)
pSymbolSetInGroupU
- public void setSymbolSetIsUnsupported(int pSymbolSetIsUnsupported, String pCmdTerminator)
pSymbolSetIsUnsupported
- pCmdTerminator
- public void setFontHorizontalPitch(int pNumCharactersPerInch)
pNumCharactersPerInch
- public void setHorizontalMotionIndexHMI(int pHmiValue)
pHmiValue
- public void setFontHeight(float pHeight)
pHeight
- public void setFontIsPrimary()
public void setFontIsSecondary()
public void setJavaBuiltInFont(int pFontTypefaceNumberFromPclFile)
pFontTypefaceNumberFromPclFile
- protected void makeFontCurrent()
protected void setMonospacedJavaBuiltInFont(int pStyle, float pSize)
pStyle
- pSize
- protected void setSansSerifJavaBuiltInFont(int pStyle, float pSize)
pStyle
- pSize
- protected void setSerifJavaBuiltInFont(int pStyle, float pSize)
pStyle
- pSize
- public void setCurrentFont(Font pCurrentFont)
pCurrentFont
- public void setPrimaryFont(Font pPrimaryFont)
setPrimaryFont
in interface IPluginHooksPriFonts
pPrimaryFont
- public void setSecondaryFont(Font pSecondaryFont)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |